From: Eric Blake Date: Fri, 2 Feb 2007 14:07:38 +0000 (+0000) Subject: * m4/m4.m4 (AC_PROG_GNU_M4): Reject M4 1.4 through 1.4.4 as X-Git-Tag: v2.62~361 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6386a5ae722cde1d2db552f5d302ae5eb11ca96;p=thirdparty%2Fautoconf.git * 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 --- diff --git a/ChangeLog b/ChangeLog index aab1fadf..285f4cee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-02-02 Eric Blake + + * 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 * THANKS (people): Update. diff --git a/NEWS b/NEWS index 9fac7c4a..3bc2b631 100644 --- 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 diff --git a/configure b/configure index 6b5f1c11..583be144 100755 --- 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 diff --git a/configure.ac b/configure.ac index fa25c72d..baacdedd 100644 --- a/configure.ac +++ b/configure.ac @@ -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 ## ----------- ## diff --git a/m4/m4.m4 b/m4/m4.m4 index b6fb9eab..70b99f89 100644 --- 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],