This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, GCC] assorted autoconf updates


This patch does several small configure changes in one go, in order to
avoid going insane with all the "Regenerate." ChangeLog entries.

1) When configure fails, it will now output the build directory the
failure happened in; backport of this patch:
<http://lists.gnu.org/archive/html/autoconf-patches/2008-05/msg00004.html>
hopefully helping to lessen the misunderstandings of which config.log to
look into; these are very common on gcc-help and in the bugzilla.

2) Streamline m4_version_prereq usage in override.m4.

3) Force exactly Autoconf 2.59 to be used in the whole tree.  This has
been requested in
<http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00112.html>

NOTE!  Since aclocal and automake use Autoconf (more precisely: the
autom4te program from the Autoconf package) behind the scenes, this
means that whenever you run automake, autom4te 2.59 is needed, too,
otherwise you may run into errors such as

  configure.ac:5: error: Please use exactly Autoconf 2.59 instead of 2.62.
  ../config/override.m4:20: _GCC_AUTOCONF_VERSION_CHECK is expanded from...
  configure.ac:5: the top level
  autom4te: /usr/bin/m4 failed with exit status: 1
  automake: autoconf failed with exit status: 1

The code in override.m4 has been written in such a way that, when
the tree eventually moves to a different version, it can be forced
all at once (by just changing the define in override.m4) or
per-configure.ac by defining the value in that configure.ac before
AC_INIT.  This helps testing newer autotools on part of the tree.

4) In some configure.ac files, move sinclude(../config/...) lines to
before AC_INIT.  This makes semantics of macro overrides match more
closely that with trees which use aclocal, and also it makes the
resulting configure script less dependent upon white space changes
in override.m4.  I confirmed that this part of the diff causes
whitespace and comment line changes in configure scripts only.

5) Where those sinclude lines are used, update maintainer dependencies
of aclocal.m4 or configure in Makefile.in.

The regenerate storm also regenerates some files that needed it from
independent earlier changes (nothing of importance, though).  Also,
the fixincludes directory were already using Autoconf 2.61, wrongly.

bootstrap finished on i686-pc-linux-gnu.  Not sure whether a regtest
is of much use (should suffice to show that generated binaries are
identical).  OK for GCC trunk?

Analogous post for binutils coming up.

I intend to post two sets of further changes (when done; don't hold your
breath, I'm not throwing a lot of time at it), the first to introduce
all those changes which are compatible with recent Autoconf/Automake as
well as 2.59/1.9.6; and a hopefully small second one to actually do the
switch and remaining changes incompatible with 2.59/1.9.6.

Thanks,
Ralf

config/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* override.m4: Use m4_version_prereq throughout.
	(_AC_ARG_VAR_VALIDATE, AC_MSG_FAILURE): Backport from git
	Autoconf: output pwd along with fatal errors, so the right
	config.log file is hinted at more prominently.
	(_GCC_AUTOCONF_VERSION, _GCC_AUTOCONF_VERSION_CHECK): New
	macros, require use of Autoconf 2.59 throughout the tree.

ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.tpl ($(srcdir)/configure): Update dependencies.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

libgcc/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* configure.ac: sinclude override.m4.
	* configure: Regenerate.

gnattools/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* configure.ac: move sinclude of acx.m4 before AC_INIT,
	also sinclude override.m4.
	* Makefile.in ($(srcdir)/configure): Update dependencies.
	* configure: Regenerate.

libada/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* configure.ac: move sinclude of acx.m4 before AC_INIT,
	also sinclude override.m4.
	* Makefile.in ($(srcdir)/configure): Update dependencies.
	* configure: Regenerate.

intl/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* configure: Regenerate.

libiberty/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* configure: Regenerate.

boehm-gc/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* include/Makefile.in: Regenerate.
	* include/gc_config.h.in: Regenerate.

fixincludes/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* configure: Regenerate.

gcc/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* configure: Regenerate.

libcpp/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
	* configure: Regenerate.

libdecnumber/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
	* configure: Regenerate.

libffi/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* configure: Regenerate.
	* include/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libgfortran/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* configure: Regenerate.

libgomp/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* configure: Regenerate.

libjava/classpath/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
	* doc/api/Makefile.in: Regenerate.
	* examples/Makefile.in: Regenerate.
	* external/Makefile.in: Regenerate.
	* external/jsr166/Makefile.in: Regenerate.
	* external/relaxngDatatype/Makefile.in: Regenerate.
	* external/sax/Makefile.in: Regenerate.
	* external/w3c_dom/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* lib/Makefile.in: Regenerate.
	* native/Makefile.in: Regenerate.
	* native/fdlibm/Makefile.in: Regenerate.
	* native/jawt/Makefile.in: Regenerate.
	* native/jni/Makefile.in: Regenerate.
	* native/jni/classpath/Makefile.in: Regenerate.
	* native/jni/gconf-peer/Makefile.in: Regenerate.
	* native/jni/gstreamer-peer/Makefile.in: Regenerate.
	* native/jni/gtk-peer/Makefile.in: Regenerate.
	* native/jni/java-io/Makefile.in: Regenerate.
	* native/jni/java-lang/Makefile.in: Regenerate.
	* native/jni/java-net/Makefile.in: Regenerate.
	* native/jni/java-nio/Makefile.in: Regenerate.
	* native/jni/java-util/Makefile.in: Regenerate.
	* native/jni/midi-alsa/Makefile.in: Regenerate.
	* native/jni/midi-dssi/Makefile.in: Regenerate.
	* native/jni/native-lib/Makefile.in: Regenerate.
	* native/jni/qt-peer/Makefile.in: Regenerate.
	* native/jni/xmlj/Makefile.in: Regenerate.
	* native/plugin/Makefile.in: Regenerate.
	* resource/Makefile.in: Regenerate.
	* scripts/Makefile.in: Regenerate.
	* tools/Makefile.in: Regenerate.

libjava/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* configure: Regenerate.
	* gcj/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libjava/libltdl/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.in: Regenerate.
	* configure: Regenerate.

libmudflap/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.in: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libobjc/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* configure: Regenerate.

libssp/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.in: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.

libstdc++-v3/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* configure: Regenerate.

zlib/ChangeLog:
2008-06-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.in: Regenerate.
	* configure: Regenerate.

Index: config/override.m4
===================================================================
RCS file: /cvs/src/src/config/override.m4,v
retrieving revision 1.2
diff -u -r1.2 override.m4
--- config/override.m4	23 Apr 2008 10:24:41 -0000	1.2
+++ config/override.m4	4 Jun 2008 16:19:02 -0000
@@ -2,10 +2,11 @@
 dnl Autoconf macros with backports of the 2.60+ fix.
 dnl - AC_CONFIG_SUBDIRS whitespace mangling,
 dnl - more lenient precious variable checks
+dnl - better configure error message
 dnl
-dnl This file should be a no-op for Autoconf versions != 2.59.
-dnl It can be removed once the complete tree has moved to a
-dnl newer Autoconf version.
+dnl This file should be a no-op for the newest Autoconf version.
+dnl Its bits can be removed once the complete tree has moved to a
+dnl new enough Autoconf version.
 
 dnl m4_PACKAGE_VERSION is an undocumented Autoconf macro.
 dnl We use it because this fix is intended for 2.59 only.
@@ -22,7 +23,27 @@
 AC_DEFUN([AC_PREREQ], [frob])
 m4_copy([_AC_PREREQ], [AC_PREREQ])
 
-ifelse(m4_PACKAGE_VERSION, [2.59], [
+
+dnl Ensure exactly this Autoconf version is used
+m4_define([_GCC_AUTOCONF_VERSION], [2.59])
+
+dnl Test for the exact version when AC_INIT is expanded.
+dnl This allows to update the tree in steps (for testing)
+dnl by putting
+dnl   m4_define([_GCC_AUTOCONF_VERSION], [X.Y])
+dnl in configure.ac before AC_INIT,
+dnl without rewriting this file.
+dnl Or for updating the whole tree at once with the definition above.
+AC_DEFUN([_GCC_AUTOCONF_VERSION_CHECK],
+[m4_if(m4_defn([_GCC_AUTOCONF_VERSION]),
+  m4_defn([m4_PACKAGE_VERSION]), [],
+  [m4_fatal([Please use exactly Autoconf ]_GCC_AUTOCONF_VERSION[ instead of ]m4_defn([m4_PACKAGE_VERSION])[.])])
+])
+m4_define([AC_INIT], m4_defn([AC_INIT])[
+_GCC_AUTOCONF_VERSION_CHECK
+])
+
+m4_version_prereq([2.60],, [
 
 # _AC_OUTPUT_SUBDIRS
 # ------------------
@@ -128,12 +149,13 @@
 ])# _AC_OUTPUT_SUBDIRS
 ])
 
-ifelse(m4_PACKAGE_VERSION, [2.62],, [
+m4_version_prereq([2.62],, [
 
 # _AC_ARG_VAR_VALIDATE
 # --------------------
 # The code is the same as autoconf 2.59, but with a more lenient check
-# on precious variables that has been added in autoconf 2.62.
+# on precious variables and an output of pwd that have been added in
+# autoconf 2.62.
 m4_define([_AC_ARG_VAR_VALIDATE],
 [# Check that the precious variables saved in the cache have kept the same
 # value.
@@ -184,8 +206,21 @@
   fi
 done
 if $ac_cache_corrupted; then
+  AS_MESSAGE([error: in `$ac_pwd':], 2)
   AS_MESSAGE([error: changes in the environment can compromise the build], 2)
   AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over])
 fi
 ])# _AC_ARG_VAR_VALIDATE
-])])
+])
+
+m4_version_prereq([2.62],, [
+
+# AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1])
+# ----------------------------------------
+# This is the same code as in 2.59 and 2.61, except it also outputs pwd.
+m4_define([AC_MSG_FAILURE],
+[{ AS_MESSAGE([error: in `$ac_pwd':], 2)
+AC_MSG_ERROR([$1
+See `config.log' for more details.], [$2]); }])
+])
+])
diff --git a/Makefile.tpl b/Makefile.tpl
index ea2676f..5648621 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -1643,7 +1643,8 @@ config.status: configure
 
 # Rebuilding configure.
 AUTOCONF = autoconf
-$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4
+$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4 \
+	$(srcdir)/config/override.m4 $(srcdir)/config/proginstall.m4
 	cd $(srcdir) && $(AUTOCONF)
 
 # ------------------------------
diff --git a/gnattools/Makefile.in b/gnattools/Makefile.in
index 46da2df..efc5f75 100644
--- a/gnattools/Makefile.in
+++ b/gnattools/Makefile.in
@@ -314,7 +314,8 @@ Makefile: $(srcdir)/Makefile.in config.status
 config.status: $(srcdir)/configure
 	$(SHELL) ./config.status --recheck
 
-$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac
+$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac \
+	$(srcdir)/../config/acx.m4 $(srcdir)/../config/override.m4
 	cd $(srcdir) && autoconf
 
 # Don't export variables to the environment, in order to not confuse
diff --git a/gnattools/configure.ac b/gnattools/configure.ac
index 25de225..969723b 100644
--- a/gnattools/configure.ac
+++ b/gnattools/configure.ac
@@ -15,6 +15,9 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+sinclude(../config/acx.m4)
+sinclude(../config/override.m4)
+
 AC_INIT
 AC_PREREQ([2.59])
 
@@ -43,7 +46,6 @@ AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
 
-sinclude(../config/acx.m4)
 ACX_NONCANONICAL_TARGET
 
 # Need to pass this down for now :-P
diff --git a/libada/Makefile.in b/libada/Makefile.in
index 8375078..23d6713 100644
--- a/libada/Makefile.in
+++ b/libada/Makefile.in
@@ -152,7 +152,8 @@ Makefile: $(srcdir)/Makefile.in config.status
 config.status: $(srcdir)/configure
 	$(SHELL) ./config.status --recheck
 
-$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac
+$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac \
+	$(srcdir)/../config/acx.m4 $(srcdir)/../config/override.m4
 	cd $(srcdir) && autoconf
 
 # Don't export variables to the environment, in order to not confuse
diff --git a/libada/configure.ac b/libada/configure.ac
index 837e083..a266812 100644
--- a/libada/configure.ac
+++ b/libada/configure.ac
@@ -15,13 +15,14 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+sinclude(../config/acx.m4)
+sinclude(../config/override.m4)
+
 AC_INIT
 AC_PREREQ([2.59])
 
 AC_CONFIG_SRCDIR([Makefile.in])
 
-sinclude(../config/acx.m4)
-
 # Determine the host, build, and target systems
 AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
diff --git a/libdecnumber/Makefile.in b/libdecnumber/Makefile.in
index b175059..da58241 100644
--- a/libdecnumber/Makefile.in
+++ b/libdecnumber/Makefile.in
@@ -95,7 +95,7 @@ $(srcdir)/configure: @MAINT@ $(srcdir)/aclocal.m4
 	cd $(srcdir) && $(AUTOCONF)
 
 $(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../config/stdint.m4 \
-	$(srcdir)/../config/warnings.m4 \
+	$(srcdir)/../config/warnings.m4 $(srcdir)/../config/override.m4 \
 	$(srcdir)/configure.ac
 	cd $(srcdir) && $(ACLOCAL) -I ../config
 
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
index 81bf06e..e3eb80a 100644
--- a/libgcc/configure.ac
+++ b/libgcc/configure.ac
@@ -4,6 +4,7 @@ sinclude(../config/enable.m4)
 sinclude(../config/tls.m4)
 sinclude(../config/acx.m4)
 sinclude(../config/no-executables.m4)
+sinclude(../config/override.m4)
 
 AC_PREREQ(2.59)
 AC_INIT([GNU C Runtime Library], 1.0,,[libgcc])
diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
index e4d6a48..3b1a0d6 100644
--- a/libcpp/Makefile.in
+++ b/libcpp/Makefile.in
@@ -109,6 +109,7 @@ $(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../config/acx.m4 \
 	$(srcdir)/../config/gettext-sister.m4 $(srcdir)/../config/iconv.m4 \
 	$(srcdir)/../config/codeset.m4 $(srcdir)/../config/lib-ld.m4 \
 	$(srcdir)/../config/lib-link.m4 $(srcdir)/../config/lib-prefix.m4 \
+	$(srcdir)/../config/override.m4 $(srcdir)/../config/proginstall.m4 \
 	$(srcdir)/configure.ac
 	cd $(srcdir) && $(ACLOCAL) -I ../config
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]