]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Require m4 1.4.6, and fix testsuite to support this version.
authorEric Blake <ebb9@byu.net>
Sat, 25 Jul 2009 23:17:41 +0000 (17:17 -0600)
committerEric Blake <ebb9@byu.net>
Sat, 25 Jul 2009 23:24:47 +0000 (17:24 -0600)
* m4/m4.m4 (AC_PROG_GNU_M4): Reject m4 1.4.5, now that we use
regexp it can't handle.
* NEWS: Mention minimum version bump.
* README: Likewise.
* README-hacking: Likewise.
* doc/autoconf.texi (Introduction, Why GNU M4): Likewise.
* tests/tools.at (autom4te --trace and whitespace): Update test so
still work with older m4 line numbers.
* tests/m4sugar.at (m4@&t@_require: nested): Likewise.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
NEWS
README
README-hacking
doc/autoconf.texi
m4/m4.m4
tests/m4sugar.at
tests/tools.at

index 4ecd0d822ce6132c5531483f3f8a51529a4ee785..81499131c5ec33c3545178c4c23185fdcb6c5386 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2009-07-25  Eric Blake  <ebb9@byu.net>
+
+       Require m4 1.4.6, and fix testsuite to support this version.
+       * m4/m4.m4 (AC_PROG_GNU_M4): Reject m4 1.4.5, now that we use
+       regexp it can't handle.
+       * NEWS: Mention minimum version bump.
+       * README: Likewise.
+       * README-hacking: Likewise.
+       * doc/autoconf.texi (Introduction, Why GNU M4): Likewise.
+       * tests/tools.at (autom4te --trace and whitespace): Update test so
+       still work with older m4 line numbers.
+       * tests/m4sugar.at (m4@&t@_require: nested): Likewise.
+       Reported by Ralf Wildenhues.
+
 2009-07-25  Bruno Haible  <bruno@clisp.org>
 
        Clarify autom4te debugging tips.
diff --git a/NEWS b/NEWS
index 3830fc0bbfcd1061a88be4b56d6d51e9fcac9878..8bf819e52cd4414ac6ea152bce0ffa15c1dd286c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,11 @@ GNU Autoconf NEWS - User visible changes.
 * Major changes in Autoconf 2.64 (2009-??-??) [stable]
   Released by Eric Blake, based on git versions 2.63b.*.
 
+** Autoconf now requires GNU M4 1.4.6 or later.  Earlier versions of M4
+   have a bug in regular expression handling that interferes with some
+   of the speedups provided since Autoconf 2.63.  GNU M4 1.4.13 or
+   later is recommended.
+
 ** AS_IF and AS_CASE have been taught to avoid syntax errors even when
    given arguments that expand to just whitespace.
 
diff --git a/README b/README
index 1e35ff78c89e73d1dafde0e374693bae1a33545a..4b048a9d4f74878fbcbfe28c5454ca2640835dbb 100644 (file)
--- a/README
+++ b/README
@@ -11,7 +11,7 @@ operating system features that the package can use, in the form of M4
 macro calls.
 
 Producing configuration scripts using Autoconf requires GNU M4 and
-Perl.  You should install GNU M4 (version 1.4.5 or later is required;
+Perl.  You should install GNU M4 (version 1.4.6 or later is required;
 1.4.13 or later is recommended) and Perl (5.005_03 or later) before
 configuring Autoconf, so that Autoconf's configure script can find
 them.  The configuration scripts produced by Autoconf are
index 6eb8c4447e9f82b50de7c09c882a4d258e33ebc4..c95708611dc4a0617f414075d8ccfb9e5f6ddebe 100644 (file)
@@ -17,7 +17,7 @@ tools we depend upon, including:
 - Autoconf 2.60+ <http://www.gnu.org/software/autoconf/>
 - Automake 1.10+ <http://www.gnu.org/software/automake/>
 - Help2man 1.29+ <http://www.gnu.org/software/help2man/>
-- M4 1.4.5+ <http://www.gnu.org/software/m4/>
+- M4 1.4.6+ <http://www.gnu.org/software/m4/>
 - Perl 5.005_03+ <http://www.cpan.org/>
 - Texinfo 4.8+ <http://www.gnu.org/software/texinfo/>
 
index 39286fd4997672d5504bd768926ec3aecd5b59bf..347e0f2c479a2236e138a1585df54be4c3bc96db 100644 (file)
@@ -728,7 +728,7 @@ for more information.
 Autoconf imposes some restrictions on the names of macros used with
 @code{#if} in C programs (@pxref{Preprocessor Symbol Index}).
 
-Autoconf requires @acronym{GNU} M4 version 1.4.5 or later in order to
+Autoconf requires @acronym{GNU} M4 version 1.4.6 or later in order to
 generate the scripts.  It uses features that some versions of M4,
 including @acronym{GNU} M4 1.3, do not have.  Autoconf works better
 with @acronym{GNU} M4 version 1.4.13 or later, though this is not
@@ -23234,7 +23234,7 @@ __file__
 __line__
 @end example
 
-Autoconf requires version 1.4.5 or later of @acronym{GNU} M4.
+Autoconf requires version 1.4.6 or later of @acronym{GNU} M4.
 
 Since only software maintainers need to use Autoconf, and since @acronym{GNU}
 M4 is simple to configure and install, it seems reasonable to require
index d637e926eb0fc574733dab98884f345553dcaf7c..096fb287a34421e162c1076d513daf51b49e717c 100644 (file)
--- a/m4/m4.m4
+++ b/m4/m4.m4
@@ -1,4 +1,4 @@
-# m4.m4 serial 8
+# m4.m4 serial 9
 
 # Copyright (C) 2000, 2006, 2007, 2008, 2009 Free Software Foundation,
 # Inc.
 
 # AC_PROG_GNU_M4
 # --------------
-# 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)
+# Check for GNU M4, at least 1.4.6 (all earlier versions had bugs in
+# trace support and regexp support):
+# http://lists.gnu.org/archive/html/bug-gnu-utils/2006-11/msg00096.html
+# http://lists.gnu.org/archive/html/bug-autoconf/2009-07/msg00023.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_ARG_VAR([M4], [Location of GNU M4 1.4.5 or later.  Defaults to the first
+  [AC_ARG_VAR([M4], [Location of GNU M4 1.4.6 or later.  Defaults to the first
     program of `m4', `gm4', or `gnum4' on PATH that meets Autoconf needs.])
   AC_CACHE_CHECK([for GNU M4 that supports accurate traces], [ac_cv_path_M4],
     [rm -f conftest.m4f
@@ -24,15 +25,16 @@ ac_had_posixly_correct=${POSIXLY_CORRECT:+yes}
 AS_UNSET([POSIXLY_CORRECT])
 AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4 gnum4],
       [dnl Creative quoting here to avoid raw dnl and ifdef in configure.
-      # Root out GNU M4 1.4.4, as well as non-GNU m4 that ignore -t, -F.
-      ac_snippet=change'quote(<,>)in''dir(<if''def>,mac,bug)d'nl
+      # Root out GNU M4 1.4.5, as well as non-GNU m4 that ignore -t, -F.
+      ac_snippet=change'quote(<,>)in''dir(<if''def>,mac,bug)'
+      ac_snippet=${ac_snippet}pat'subst(a,\(b\)\|\(a\),\1)d'nl
       test -z "`$ac_path_M4 -F conftest.m4f </dev/null 2>&1`" \
       && test -z "`echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \
       && test -f conftest.m4f \
       && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:
       rm -f conftest.m4f],
       [AC_MSG_ERROR([no acceptable m4 could be found in \$PATH.
-GNU M4 1.4.5 or later is required; 1.4.13 is recommended])])])
+GNU M4 1.4.6 or later is required; 1.4.13 is recommended])])])
   M4=$ac_cv_path_M4
   AC_CACHE_CHECK([whether $ac_cv_path_M4 accepts --gnu],
     [ac_cv_prog_gnu_m4_gnu],
index 04f06b9aa1fc0d66a7eca7e143f26bba08ee8aba..2e89cc538b988ea008839d79706558ab28cca780 100644 (file)
@@ -581,13 +581,14 @@ AT_CHECK_M4SUGAR_TEXT([[dnl
 m4_defun([a], [[a]])dnl
 m4_defun([b], [[b]m4_require([a])])dnl
 m4_defun([c], [[c]m4_require([b])])dnl
-m4_defun([outer],
+dnl the extra macro layer works around line number differences in older m4
+m4_define([foo], [m4_defun([outer],
 [pre
 a
 c
 a
 c
-post])dnl
+post])])foo[]dnl
 outer
 ]],
 [[a
@@ -599,11 +600,11 @@ a
 c
 post
 ]],
-[[script.4s:14: warning: m4@&t@_require: `a' was expanded before it was required
+[[script.4s:15: warning: m4@&t@_require: `a' was expanded before it was required
 script.4s:5: b is expanded from...
 script.4s:6: c is expanded from...
-script.4s:7: outer is expanded from...
-script.4s:14: the top level
+script.4s:14: outer is expanded from...
+script.4s:15: the top level
 ]])
 
 dnl Direct invocation, expand-before-require but no nested require.  As this
index e54ed6995e195738f8572c569ea53c84f356b5a2..cba570eb699a888a884077a0bf086991a254b2f9 100644 (file)
@@ -228,14 +228,17 @@ AT_CLEANUP
 
 AT_SETUP([autom4te --trace and whitespace])
 
-AT_DATA([file.m4],
-[[m4@&t@_echo([  a
+dnl line numbering differs between m4 1.4.6 and 1.4.13 if we don't
+dnl go through a single line wrapper
+AT_DATA_M4SUGAR([file.m4],
+[[m4_define([foo], [m4_echo([  a
 b      c  ], [\
 d\
-])
+])])
+foo
 ]])
 AT_CHECK_AUTOM4TE([--language=m4sugar -t 'm4@&t@_echo' file.m4], [0],
-[[file.m4:1:m4@&t@_echo: a b c :d
+[[file.m4:5:m4@&t@_echo: a b c :d
 ]])
 
 AT_CLEANUP