Commit e0520fa7 by Nathanael Nerode

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
parent 6ad5e585
2003-11-26 Nathanael Nerode <neroden@gcc.gnu.org> 2003-11-26 Nathanael Nerode <neroden@gcc.gnu.org>
* aclocal.m4 (gcc_AC_PROG_GNAT): Rewrite to account for removal
of ADAC.
* configure: Regenerate.
* Makefile.in: Remove references to ADAC. * Makefile.in: Remove references to ADAC.
* configure.in: Remove check for whether ${ADAC} accepts -Wno-long-long. * configure.in: Remove check for whether ${ADAC} accepts -Wno-long-long.
......
...@@ -318,46 +318,33 @@ AC_SUBST(INSTALL_DATA)dnl ...@@ -318,46 +318,33 @@ AC_SUBST(INSTALL_DATA)dnl
dnl Test for GNAT. dnl Test for GNAT.
dnl We require the gnatbind program, and a compiler driver that dnl We require the gnatbind program, and a compiler driver that
dnl understands Ada. The user may set the driver name explicitly dnl understands Ada. We use the user's CC setting, already found.
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 dnl
dnl Sets the shell variable have_gnat to yes or no as appropriate, and 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_DEFUN([gcc_AC_PROG_GNAT],
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX]) [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])
AC_REQUIRE([AC_PROG_CC])
AC_CHECK_TOOL(GNATBIND, gnatbind, no) AC_CHECK_TOOL(GNATBIND, gnatbind, no)
AC_CACHE_CHECK([for compiler driver that understands Ada], AC_CACHE_CHECK([whether compiler driver understands Ada],
gcc_cv_prog_adac, gcc_cv_cc_supports_ada,
[cat >conftest.adb <<EOF [cat >conftest.adb <<EOF
procedure conftest is begin null; end conftest; procedure conftest is begin null; end conftest;
EOF EOF
gcc_cv_prog_adac=no gcc_cv_cc_supports_ada=no
# Have to do ac_tool_prefix and user overrides by hand. # There is a bug in old released versions of GCC which causes the
for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \ # driver to exit successfully when the appropriate language module
${ac_tool_prefix}gcc gcc \ # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
${ac_tool_prefix}cc cc \ # Therefore we must check for the error message as well as an
${ac_tool_prefix}gnatgcc gnatgcc \ # unsuccessful exit.
${ac_tool_prefix}gnatcc gnatcc \ errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
${ac_tool_prefix}adagcc adagcc \ if test x"$errors" = x; then
${ac_tool_prefix}adacc adacc ; do gcc_cv_cc_supports_ada=yes
# There is a bug in all released versions of GCC which causes the break
# driver to exit successfully when the appropriate language module fi
# 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
rm -f conftest.*]) 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 have_gnat=yes
else else
have_gnat=no have_gnat=no
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment