autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: m4 1.4.7 trace line number differences


From: Eric Blake
Subject: Re: m4 1.4.7 trace line number differences
Date: Sat, 25 Jul 2009 17:24:42 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 Thunderbird/2.0.0.22 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Ralf Wildenhues on 7/25/2009 11:34 AM:
>> Since 1.4.6 is now
>> 2 years and 11 months old (and only one month newer than 1.4.5), I'm okay
>> with raising our minimum requirement, at the same time as fixing the
>> testsuite to tolerate 1.4.6.  I'll be committing something shortly, once a
>> testsuite completes successfully under m4 1.4.6...
> 
> Sounds like a good plan to me, thanks.

Done as follows:

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkprlDkACgkQ84KuGfSFAYD9qQCeNMOvmdx4AlmaZumQQXwjnN7s
hC4AoImyo42OvyJSIJwud31q30m2HHfk
=4iaA
-----END PGP SIGNATURE-----
>From 2043f859d91c72d5c0df941bd8abf91a9edae238 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Sat, 25 Jul 2009 17:17:41 -0600
Subject: [PATCH] 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@&address@hidden: nested): Likewise.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog         |   13 +++++++++++++
 NEWS              |    5 +++++
 README            |    2 +-
 README-hacking    |    2 +-
 doc/autoconf.texi |    4 ++--
 m4/m4.m4          |   18 ++++++++++--------
 tests/m4sugar.at  |   11 ++++++-----
 tests/tools.at    |   11 +++++++----
 8 files changed, 45 insertions(+), 21 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4ecd0d8..5caec55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2009-07-25  Eric Blake  <address@hidden>
+
+       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@&address@hidden: nested): Likewise.
+
 2009-07-25  Bruno Haible  <address@hidden>

        Clarify autom4te debugging tips.
diff --git a/NEWS b/NEWS
index 3830fc0..8bf819e 100644
--- 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 1e35ff7..4b048a9 100644
--- 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
diff --git a/README-hacking b/README-hacking
index 6eb8c44..c957086 100644
--- a/README-hacking
+++ b/README-hacking
@@ -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/>

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 39286fd..347e0f2 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -728,7 +728,7 @@ Introduction
 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 @@ Why GNU M4
 __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
diff --git a/m4/m4.m4 b/m4/m4.m4
index d637e92..096fb28 100644
--- 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.
@@ -10,13 +10,14 @@

 # 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],
diff --git a/tests/m4sugar.at b/tests/m4sugar.at
index 04f06b9..2e89cc5 100644
--- a/tests/m4sugar.at
+++ b/tests/m4sugar.at
@@ -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@&address@hidden: `a' was expanded before it was 
required
+[[script.4s:15: warning: m4@&address@hidden: `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
diff --git a/tests/tools.at b/tests/tools.at
index e54ed69..cba570e 100644
--- a/tests/tools.at
+++ b/tests/tools.at
@@ -228,14 +228,17 @@ AT_CLEANUP

 AT_SETUP([autom4te --trace and whitespace])

-AT_DATA([file.m4],
-[[m4@&address@hidden([  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@&address@hidden' file.m4], [0],
-[[file.m4:1:m4@&address@hidden: a b c :d
+[[file.m4:5:m4@&address@hidden: a b c :d
 ]])

 AT_CLEANUP
-- 
1.6.3.3.334.g916e1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]