autoconf-patches
[Top][All Lists]
Advanced

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

require M4 1.4.5 or later


From: Eric Blake
Subject: require M4 1.4.5 or later
Date: Thu, 1 Feb 2007 23:59:53 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Is this patch acceptable?  The issue of broken m4 combined with recent 
autoconf/automake interaction means that it is time that we help platforms 
recognize that they need to provide a more recent m4.

2007-02-01  Eric Blake  <address@hidden>

        * m4/m4.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

Index: NEWS
===================================================================
RCS file: /sources/autoconf/autoconf/NEWS,v
retrieving revision 1.422
diff -u -r1.422 NEWS
--- NEWS        19 Dec 2006 05:41:18 -0000      1.422
+++ NEWS        1 Feb 2007 23:53:55 -0000
@@ -1,5 +1,10 @@
 * Major changes in Autoconf 2.61b (????-??-??)
 
+** Autoconf now has a hard dependency on 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
Index: configure.ac
===================================================================
RCS file: /sources/autoconf/autoconf/configure.ac,v
retrieving revision 1.86
diff -u -r1.86 configure.ac
--- configure.ac        16 Dec 2006 19:09:51 -0000      1.86
+++ configure.ac        1 Feb 2007 23:53:55 -0000
@@ -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 @@
 # 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: m4/m4.m4
===================================================================
RCS file: /sources/autoconf/autoconf/m4/m4.m4,v
retrieving revision 1.6
diff -u -r1.6 m4.m4
--- m4/m4.m4    20 Sep 2006 03:08:08 -0000      1.6
+++ m4/m4.m4    1 Feb 2007 23:53:55 -0000
@@ -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 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],






reply via email to

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