]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* m4/m4.m4 (AC_PROG_GNU_M4): Reject M4 1.4 through 1.4.4 as
authorEric Blake <ebb9@byu.net>
Fri, 2 Feb 2007 14:07:38 +0000 (14:07 +0000)
committerEric Blake <ebb9@byu.net>
Fri, 2 Feb 2007 14:07:38 +0000 (14:07 +0000)
broken.
* configure.ac: Update error message.
* NEWS: Note that M4 1.4.5 or later is now a hard dependency.
Reported by Gary Vaughan and Jim Meyering, and problem analyzed
by Stepan Kasal:
http://lists.gnu.org/archive/html/bug-autoconf/2006-11/msg00025.html

ChangeLog
NEWS
configure
configure.ac
m4/m4.m4

index aab1fadf4372194bf9469e5314606cdd3be3d456..285f4cee3613f92be3dfe96d08b5ad69c5509bff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-02-02  Eric Blake  <ebb9@byu.net>
+
+       * m4/m4.m4 (AC_PROG_GNU_M4): Reject M4 1.4 through 1.4.4 as
+       broken.
+       * configure.ac: Update error message.
+       * NEWS: Note that M4 1.4.5 or later is now a hard dependency.
+       Reported by Gary Vaughan and Jim Meyering, and problem analyzed
+       by Stepan Kasal:
+       http://lists.gnu.org/archive/html/bug-autoconf/2006-11/msg00025.html
+
 2007-01-31  Eric Blake  <ebb9@byu.net>
 
        * THANKS (people): Update.
diff --git a/NEWS b/NEWS
index 9fac7c4a7f1de142aaa00f1b2b0914022fcaf2e1..3bc2b63114e489b91753234ef3947251d1b34f4c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,17 @@
 * Major changes in Autoconf 2.61b (????-??-??)
 
+** Autoconf now requires GNU M4 1.4.5 or later.  Earlier versions of M4 have
+   a bug in macro tracing that interferes with the interaction between
+   Autoconf and Automake.  GNU M4 1.4.8 or later is recommended.
+
 ** Warnings are now generated by default when an installer invokes
    'configure' with an unknown --enable-* or --with-* option.
    These warnings can be disabled with the new AC_DISABLE_OPTION_CHECKING
    macro, or by invoking 'configure' with --disable-option-checking.
 
+** For portability with the eventual M4 2.0, macros should no longer use
+   anything larger than $9 to refer to arguments.
+
 * Major changes in Autoconf 2.61a (2006-12-11)
 
 ** AC_FUNC_FSEEKO was broken in 2.61; it didn't make fseeko and ftello visible
index 6b5f1c112239daa74ad2ffa2017352324e33cde9..583be14457f92b1c8696fdfb049c56ae9061a18c 100755 (executable)
--- a/configure
+++ b/configure
@@ -660,6 +660,7 @@ MAKEINFO
 install_sh
 STRIP
 INSTALL_STRIP_PROGRAM
+MKDIR_P
 mkdir_p
 AWK
 SET_MAKE
@@ -2382,16 +2383,15 @@ fi
 done
 test -n "$M4" || M4="m4"
 
-{ $as_echo "$as_me:$LINENO: checking whether m4 supports frozen files" >&5
-$as_echo_n "checking whether m4 supports frozen files... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether m4 supports accurate traces" >&5
+$as_echo_n "checking whether m4 supports accurate traces... " >&6; }
 if test "${ac_cv_prog_gnu_m4+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_gnu_m4=no
-if test x"$M4" != x; then
-  case `$M4 --help < /dev/null 2>&1` in
-    *reload-state*) ac_cv_prog_gnu_m4=yes ;;
-  esac
+if test x"$M4" != x \
+    && test -z "`echo if'def(mac,bug)d'nl | $M4 --trace=mac 2>&1`" ; then
+  ac_cv_prog_gnu_m4=yes
 fi
 fi
 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_m4" >&5
@@ -2414,8 +2414,8 @@ $as_echo "$ac_cv_prog_gnu_m4_debugfile" >&6; }
 fi
 
 if test x"$ac_cv_prog_gnu_m4" != xyes; then
-  { { $as_echo "$as_me:$LINENO: error: GNU M4 1.4 is required" >&5
-$as_echo "$as_me: error: GNU M4 1.4 is required" >&2;}
+  { { $as_echo "$as_me:$LINENO: error: GNU M4 1.4.5 or later is required; 1.4.8 is recommended" >&5
+$as_echo "$as_me: error: GNU M4 1.4.5 or later is required; 1.4.8 is recommended" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
index fa25c72d570d6cb6f46f2419a987794119e5fcc0..baacdedd1bc073a0da6781535355313d1dee264a 100644 (file)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 # Copyright (C) 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2003,
-# 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -85,7 +85,7 @@ AC_PATH_PROG([EXPR], [expr])
 # autoheader scripts.
 AC_PROG_GNU_M4
 if test x"$ac_cv_prog_gnu_m4" != xyes; then
-  AC_MSG_ERROR([GNU M4 1.4 is required])
+  AC_MSG_ERROR([GNU M4 1.4.5 or later is required; 1.4.8 is recommended])
 fi
 
 ## ----------- ##
index b6fb9eab1d80578b0101c09dc5f3efd05db8d361..70b99f898918524d467a811dfb36d9e5499e6eb0 100644 (file)
--- a/m4/m4.m4
+++ b/m4/m4.m4
@@ -1,22 +1,24 @@
-# m4.m4 serial 2
-dnl Copyright (C) 2000, 2006 Free Software Foundation, Inc.
+# m4.m4 serial 3
+dnl Copyright (C) 2000, 2006, 2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 # AC_PROG_GNU_M4
 # --------------
-# Check for GNU m4, at least 1.3 (supports frozen files).
+# Check for GNU M4, at least 1.4.5 (all earlier versions had a bug in
+# trace support:
+# http://lists.gnu.org/archive/html/bug-gnu-utils/2006-11/msg00096.html)
 # Also, check whether --error-output (through 1.4.x) or --debugfile (2.0)
 # is supported, and AC_SUBST M4_DEBUGFILE accordingly.
 AC_DEFUN([AC_PROG_GNU_M4],
 [AC_PATH_PROGS([M4], [gm4 gnum4 m4], [m4])
-AC_CACHE_CHECK([whether m4 supports frozen files], [ac_cv_prog_gnu_m4],
+AC_CACHE_CHECK([whether m4 supports accurate traces], [ac_cv_prog_gnu_m4],
 [ac_cv_prog_gnu_m4=no
-if test x"$M4" != x; then
-  case `$M4 --help < /dev/null 2>&1` in
-    *reload-state*) ac_cv_prog_gnu_m4=yes ;;
-  esac
+dnl Creative quoting here to avoid raw dnl and ifdef in configure.
+if test x"$M4" != x \
+    && test -z "`echo if'def(mac,bug)d'nl | $M4 --trace=mac 2>&1`" ; then
+  ac_cv_prog_gnu_m4=yes
 fi])
 if test $ac_cv_prog_gnu_m4 = yes ; then
   AC_CACHE_CHECK([how m4 supports trace files], [ac_cv_prog_gnu_m4_debugfile],