[patch] Remove leftover ADAC usages

Nathanael Nerode neroden@twcny.rr.com
Mon Nov 17 19:00:00 GMT 2003


Proposed change to eliminate ADAC.  Please review for accuracy.
Tested i686-pc-linux-gnu.

	* Makefile.in: Remove (now unused) ADAC.
	* aclocal.m4 (gcc_AC_PROG_GNAT): Remove.
	* configure.in: Remove ADAC references; convert remaining uses
	of gcc_AC_PROG_GNAT into tests for GNATBIND.
	* configure: Regenerate.
	* doc/install.texi: Remove ADAC reference and make accurate.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1196
diff -u -r1.1196 Makefile.in
--- Makefile.in	16 Nov 2003 19:10:05 -0000	1.1196
+++ Makefile.in	17 Nov 2003 18:50:01 -0000
@@ -202,7 +202,6 @@
 X_CPPFLAGS =
 T_CPPFLAGS =
 
-ADAC = @ADAC@
 AWK = @AWK@
 CC = @CC@
 BISON = @BISON@
@@ -3390,7 +3387,6 @@
 # the context of the stage_x rule.
 
 POSTSTAGE1_FLAGS_TO_PASS = \
-	ADAC="\$$(CC)" \
	ADAFLAGS="$(BOOT_ADAFLAGS)" \
 	CFLAGS="$(BOOT_CFLAGS)" \
 	LDFLAGS="$(BOOT_LDFLAGS)" \
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.749
diff -u -r1.749 configure.in
--- configure.in	31 Oct 2003 09:58:46 -0000	1.749
+++ configure.in	17 Nov 2003 18:50:05 -0000
@@ -281,32 +281,16 @@
 # Find Ada compiler
 # -----------------
 
-# See if GNAT has been installed
-gcc_AC_PROG_GNAT
-
-if test x$have_gnat != xno ; then 
-AC_CACHE_CHECK(whether ${ADAC} accepts -Wno-long-long,
-ac_cv_prog_adac_no_long_long,
-[cat >conftest.adb <<EOF
-procedure conftest is begin null; end conftest;
-EOF
-if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
-  ac_cv_prog_adac_no_long_long=yes
-else
-  ac_cv_prog_adac_no_long_long=no
-fi
-rm -f conftest*])
-else
-  ac_cv_prog_adac_no_long_long=yes
-fi
+# We require the gnatbind program to build ada.
+AC_CHECK_TOOL_PREFIX
+AC_CHECK_TOOL(GNATBIND, gnatbind, no)
 
 # ---------------------
 # Warnings and checking
 # ---------------------
 
 strict1_warn=
-if test $ac_cv_prog_cc_no_long_long = yes && \
-    test $ac_cv_prog_adac_no_long_long = yes ; then
+if test $ac_cv_prog_cc_no_long_long = yes ; then
   strict1_warn="-pedantic -Wno-long-long"
 fi
 AC_SUBST(strict1_warn)
@@ -2663,7 +2647,7 @@
 	  if test x"${add_this_lang}" = xyes; then
 		case $lang in
 		    ${srcdir}/ada/config-lang.in)
-			if test x$have_gnat = xyes ; then
+			if test x$GNATBIND != xno ; then
 				subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
 			fi
 			;;
Index: aclocal.m4
===================================================================
RCS file: /cvs/gcc/gcc/gcc/aclocal.m4,v
retrieving revision 1.81
diff -u -r1.81 aclocal.m4
--- aclocal.m4	1 Nov 2003 02:34:58 -0000	1.81
+++ aclocal.m4	17 Nov 2003 18:50:06 -0000
@@ -316,54 +316,6 @@
 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
-dnl Sets the shell variable have_gnat to yes or no as appropriate, and
-dnl substitutes GNATBIND and ADAC.
-AC_DEFUN([gcc_AC_PROG_GNAT],
-[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])
-AC_CHECK_TOOL(GNATBIND, gnatbind, no)
-AC_CACHE_CHECK([for compiler driver that understands Ada],
-		 gcc_cv_prog_adac,
-[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
-rm -f conftest.*])
-ADAC=$gcc_cv_prog_adac
-AC_SUBST(ADAC)
-
-if test x$GNATBIND != xno && test x$ADAC != xno; then
-  have_gnat=yes
-else
-  have_gnat=no
-fi
-])
-
 dnl GCC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]])
 dnl like AC_PATH_PROG but use other cache variables
 AC_DEFUN([GCC_PATH_PROG],
@@ -547,7 +499,7 @@
 dnl Note C89 requires CHAR_BIT >= 8.
 dnl
 AC_DEFUN([gcc_AC_C_CHAR_BIT],
-[AC_CACHE_CHECK(for CHAR_BIT, gcc_cv_decl_char_bit,
+[AC_CACHE_CHECK([for CHAR_BIT], gcc_cv_decl_char_bit,
 [AC_EGREP_CPP(found,
 [#ifdef HAVE_LIMITS_H
 #include <limits.h>
Index: doc/install.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/install.texi,v
retrieving revision 1.235
diff -u -r1.235 install.texi
--- doc/install.texi	16 Nov 2003 18:13:56 -0000	1.235
+++ doc/install.texi	17 Nov 2003 18:50:12 -0000
@@ -1419,11 +1419,9 @@
 However, you do not need a full installation of GNAT, just the GNAT
 binary @file{gnat1}, a copy of @file{gnatbind}, and a compiler driver
 which can deal with Ada input (by invoking the @file{gnat1} binary).
-You can specify this compiler driver by setting the @env{ADAC}
-environment variable at the configure step.  @command{configure} can
-detect the driver automatically if it has got a common name such as
-@command{gcc} or @command{gnatgcc}.  Of course, you still need a working
-C compiler (the compiler driver can be different or not).
+Of course, you still need a working C compiler, with the same compiler
+driver.
+
 @command{configure} does not test whether the GNAT installation works
 and has a sufficiently recent version; if too old a GNAT version is
 installed, the build will fail unless @option{--enable-languages} is

-- 
Nathanael Nerode  <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html



More information about the Gcc-patches mailing list