aboutsummaryrefslogtreecommitdiff
path: root/gcc/aclocal.m4
diff options
context:
space:
mode:
authorNathanael Nerode <neroden@gcc.gnu.org>2003-11-26 19:17:49 +0000
committerNathanael Nerode <neroden@gcc.gnu.org>2003-11-26 19:17:49 +0000
commite0520fa7fb093b71bffb6cc76ec680b3b1730c69 (patch)
tree116fb2fad498ee108bfbb3431620c8ed6aaabaeb /gcc/aclocal.m4
parent6ad5e5856c6b68bcb3d42c6ca11d0ab4441e5963 (diff)
downloadgcc-e0520fa7fb093b71bffb6cc76ec680b3b1730c69.zip
gcc-e0520fa7fb093b71bffb6cc76ec680b3b1730c69.tar.gz
gcc-e0520fa7fb093b71bffb6cc76ec680b3b1730c69.tar.bz2
aclocal.m4 (gcc_AC_PROG_GNAT): Rewrite to account for removal of ADAC.
* aclocal.m4 (gcc_AC_PROG_GNAT): Rewrite to account for removal of ADAC. * configure: Regenerate. From-SVN: r73960
Diffstat (limited to 'gcc/aclocal.m4')
-rw-r--r--gcc/aclocal.m447
1 files changed, 17 insertions, 30 deletions
diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4
index 9829363..22025e1 100644
--- a/gcc/aclocal.m4
+++ b/gcc/aclocal.m4
@@ -318,46 +318,33 @@ AC_SUBST(INSTALL_DATA)dnl
dnl Test for GNAT.
dnl We require the gnatbind program, and a compiler driver that
-dnl understands Ada. The user may set the driver name explicitly
-dnl with ADAC; also, the user's CC setting is tried. Failing that,
-dnl we try gcc and cc, then a sampling of names known to be used for
-dnl the Ada driver on various systems.
+dnl understands Ada. We use the user's CC setting, already found.
dnl
dnl Sets the shell variable have_gnat to yes or no as appropriate, and
-dnl substitutes GNATBIND and ADAC.
+dnl substitutes GNATBIND.
AC_DEFUN([gcc_AC_PROG_GNAT],
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])
+AC_REQUIRE([AC_PROG_CC])
AC_CHECK_TOOL(GNATBIND, gnatbind, no)
-AC_CACHE_CHECK([for compiler driver that understands Ada],
- gcc_cv_prog_adac,
+AC_CACHE_CHECK([whether compiler driver understands Ada],
+ gcc_cv_cc_supports_ada,
[cat >conftest.adb <<EOF
procedure conftest is begin null; end conftest;
EOF
-gcc_cv_prog_adac=no
-# Have to do ac_tool_prefix and user overrides by hand.
-for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \
- ${ac_tool_prefix}gcc gcc \
- ${ac_tool_prefix}cc cc \
- ${ac_tool_prefix}gnatgcc gnatgcc \
- ${ac_tool_prefix}gnatcc gnatcc \
- ${ac_tool_prefix}adagcc adagcc \
- ${ac_tool_prefix}adacc adacc ; do
- # There is a bug in all released versions of GCC which causes the
- # driver to exit successfully when the appropriate language module
- # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
- # Therefore we must check for the error message as well as an
- # unsuccessful exit.
- errors=`($cand -c conftest.adb) 2>&1 || echo failure`
- if test x"$errors" = x; then
- gcc_cv_prog_adac=$cand
- break
- fi
-done
+gcc_cv_cc_supports_ada=no
+# There is a bug in old released versions of GCC which causes the
+# driver to exit successfully when the appropriate language module
+# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
+# Therefore we must check for the error message as well as an
+# unsuccessful exit.
+errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
+if test x"$errors" = x; then
+ gcc_cv_cc_supports_ada=yes
+ break
+fi
rm -f conftest.*])
-ADAC=$gcc_cv_prog_adac
-AC_SUBST(ADAC)
-if test x$GNATBIND != xno && test x$ADAC != xno; then
+if test x$GNATBIND != xno && test x$gcc_cv_supports_ada != xno; then
have_gnat=yes
else
have_gnat=no