source: rtems/c/src/ada-tests/aclocal/prog-gnat.m4 @ 32c8960

4.115
Last change on this file since 32c8960 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on May 3, 2012 at 3:09:24 PM

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.4 KB
Line 
1##
2## Partially borrowed from gcc-3.2
3##
4## WARNING: All the stuff below is pretty immature.
5
6AC_DEFUN([RTEMS_PROG_GNAT],
7[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])
8AC_REQUIRE([RTEMS_PROG_CC_FOR_TARGET])
9
10AC_CHECK_TOOL([GNATMAKE],[gnatmake],[])
11AC_CACHE_CHECK([for compiler driver that understands Ada],
12  [rtems_cv_prog_CCADA],
13[cat >conftest.adb <<EOF
14procedure conftest is begin null; end conftest;
15EOF
16rtems_cv_prog_CCADA=
17# Have to do ac_tool_prefix and user overrides by hand.
18user_ccada=$CCADA
19user_cc=$CC
20for cand in ${ac_tool_prefix}$user_ccada        $user_ccada     \
21            ${ac_tool_prefix}$user_cc           $user_cc        \
22            ${ac_tool_prefix}gcc                gcc             \
23            ${ac_tool_prefix}cc                 cc              \
24            ${ac_tool_prefix}gnatgcc            gnatgcc         \
25            ${ac_tool_prefix}gnatcc             gnatcc          \
26            ${ac_tool_prefix}adagcc             adagcc          \
27            ${ac_tool_prefix}adac               adac            ; do
28  # There is a bug in all released versions of GCC which causes the
29  # driver to exit successfully when the appropriate language module
30  # has not been installed.  This is fixed in 2.95.4, 3.0.2, and 3.1.
31  # Therefore we must check for the error message as well as an
32  # unsuccessful exit.
33  errors=`($cand -c conftest.adb) 2>&1 || echo failure`
34  AS_IF([test -z "$errors"],
35    [rtems_cv_prog_CCADA=$cand
36     break])
37done
38rm -f conftest.*])
39AC_SUBST([CCADA],[$rtems_cv_prog_CCADA])
40
41AS_IF([test -n "$GNATMAKE" && test -n "$CCADA"],
42  [HAVE_GNAT=yes],
43  [HAVE_GNAT=no])
44])
Note: See TracBrowser for help on using the repository browser.