From: Akim Demaille Date: Sat, 29 Jan 2000 09:51:17 +0000 (+0000) Subject: 1999-11-10 Akim Demaille X-Git-Tag: autoconf-2.50~1263 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a47826499c97c2ea93a7afe8ad1698b8d63403ca;p=thirdparty%2Fautoconf.git 1999-11-10 Akim Demaille Require GNU m4 1.4 (well 1.3 in fact). Because we are ready to handle the case where there are no frozen files, we *have* to pass a -I, which is dangerous in conjunction with the silent including of `aclocal.m4': you may include things that were not expected. Since anyway handling pre 1.3 complicates the task, just require an m4 which supports reloading of frozen files. * acspecific.m4 (AC_PROG_GNU_M4): Check for --reload. * autoconf.sh: Likewise * autoheader.sh: Likewise. * configure.in: Explicitly state the m4 version you want. --- diff --git a/ChangeLog b/ChangeLog index 74b93a808..aca15b694 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +1999-11-10 Akim Demaille + + Require GNU m4 1.4 (well 1.3 in fact). + + Because we are ready to handle the case where there are no frozen + files, we *have* to pass a -I, which is dangerous in conjunction + with the silent including of `aclocal.m4': you may include things + that were not expected. Since anyway handling pre 1.3 complicates + the task, just require an m4 which supports reloading of frozen + files. + + * acspecific.m4 (AC_PROG_GNU_M4): Check for --reload. + * autoconf.sh: Likewise + * autoheader.sh: Likewise. + * configure.in: Explicitly state the m4 version you want. + 1999-11-10 Akim Demaille No need for foo="`bar`", foo=`bar` is fine. diff --git a/acspecific.m4 b/acspecific.m4 index d06eacb33..956bb9e67 100644 --- a/acspecific.m4 +++ b/acspecific.m4 @@ -564,14 +564,14 @@ esac dnl AC_PROG_GNU_M4 dnl -------------- -dnl Check for GNU m4. +dnl Check for GNU m4, at least 1.3 (supports frozen files). AC_DEFUN(AC_PROG_GNU_M4, [AC_PATH_PROGS(M4, gm4 gnum4 m4, m4) -AC_CACHE_CHECK(whether we are using GNU m4, ac_cv_prog_gnu_m4, +AC_CACHE_CHECK(whether m4 supports frozen files, 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 - *traditional*) ac_cv_prog_gnu_m4=yes ;; + *reload-state*) ac_cv_prog_gnu_m4=yes ;; esac fi])]) diff --git a/autoconf.in b/autoconf.in index 59aa325d8..a3e6f8b95 100644 --- a/autoconf.in +++ b/autoconf.in @@ -165,15 +165,12 @@ else use_localdir= fi -# Use the frozen version of Autoconf if available. -r= f= # Some non-GNU m4's don't reject the --help option, so give them /dev/null. case `$M4 --help < /dev/null 2>&1` in -*reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;; -*traditional*) ;; -*) echo Autoconf requires GNU m4 1.1 or later >&2; exit 1 ;; +*reload-state*);; +*) echo Autoconf requires GNU m4 1.4 or later >&2; exit 1 ;; esac -run_m4="$M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f" +run_m4="$M4 --reload $AC_MACRODIR/autoconf.m4f $use_localdir" # Output is produced into FD 4. Prepare it. case "x$outfile" in diff --git a/autoconf.sh b/autoconf.sh index 59aa325d8..a3e6f8b95 100644 --- a/autoconf.sh +++ b/autoconf.sh @@ -165,15 +165,12 @@ else use_localdir= fi -# Use the frozen version of Autoconf if available. -r= f= # Some non-GNU m4's don't reject the --help option, so give them /dev/null. case `$M4 --help < /dev/null 2>&1` in -*reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;; -*traditional*) ;; -*) echo Autoconf requires GNU m4 1.1 or later >&2; exit 1 ;; +*reload-state*);; +*) echo Autoconf requires GNU m4 1.4 or later >&2; exit 1 ;; esac -run_m4="$M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f" +run_m4="$M4 --reload $AC_MACRODIR/autoconf.m4f $use_localdir" # Output is produced into FD 4. Prepare it. case "x$outfile" in diff --git a/autoheader.in b/autoheader.in index 57939bd1b..16da87529 100644 --- a/autoheader.in +++ b/autoheader.in @@ -132,19 +132,17 @@ else use_localdir= fi -# Use the frozen version of Autoconf if available. -r= f= # Some non-GNU m4's don't reject the --help option, so give them /dev/null. case `$M4 --help < /dev/null 2>&1` in -*reload-state*) test -r $AC_MACRODIR/autoheader.m4f && { r=--reload f=f; } ;; -*traditional*) ;; -*) echo Autoconf requires GNU m4 1.1 or later >&2; exit 1 ;; +*reload-state*);; +*) echo Autoconf requires GNU m4 1.4 or later >&2; exit 1 ;; esac +run_m4="$M4 --reload $AC_MACRODIR/autoheader.m4f $use_localdir" # Extract assignments of `ah_verbatim_SYMBOL' and `syms' from the # modified autoconf processing of the input file. The sed hair is # necessary to win for multi-line macro invocations. -$M4 -I$AC_MACRODIR $use_localdir $r autoheader.m4$f $infile | +$run_m4 $infile | sed -n -e ' : again /^@@@.*@@@$/s/^@@@\(.*\)@@@$/\1/p diff --git a/autoheader.sh b/autoheader.sh index 57939bd1b..16da87529 100644 --- a/autoheader.sh +++ b/autoheader.sh @@ -132,19 +132,17 @@ else use_localdir= fi -# Use the frozen version of Autoconf if available. -r= f= # Some non-GNU m4's don't reject the --help option, so give them /dev/null. case `$M4 --help < /dev/null 2>&1` in -*reload-state*) test -r $AC_MACRODIR/autoheader.m4f && { r=--reload f=f; } ;; -*traditional*) ;; -*) echo Autoconf requires GNU m4 1.1 or later >&2; exit 1 ;; +*reload-state*);; +*) echo Autoconf requires GNU m4 1.4 or later >&2; exit 1 ;; esac +run_m4="$M4 --reload $AC_MACRODIR/autoheader.m4f $use_localdir" # Extract assignments of `ah_verbatim_SYMBOL' and `syms' from the # modified autoconf processing of the input file. The sed hair is # necessary to win for multi-line macro invocations. -$M4 -I$AC_MACRODIR $use_localdir $r autoheader.m4$f $infile | +$run_m4 $infile | sed -n -e ' : again /^@@@.*@@@$/s/^@@@\(.*\)@@@$/\1/p diff --git a/bin/autoconf.in b/bin/autoconf.in index 59aa325d8..a3e6f8b95 100644 --- a/bin/autoconf.in +++ b/bin/autoconf.in @@ -165,15 +165,12 @@ else use_localdir= fi -# Use the frozen version of Autoconf if available. -r= f= # Some non-GNU m4's don't reject the --help option, so give them /dev/null. case `$M4 --help < /dev/null 2>&1` in -*reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;; -*traditional*) ;; -*) echo Autoconf requires GNU m4 1.1 or later >&2; exit 1 ;; +*reload-state*);; +*) echo Autoconf requires GNU m4 1.4 or later >&2; exit 1 ;; esac -run_m4="$M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f" +run_m4="$M4 --reload $AC_MACRODIR/autoconf.m4f $use_localdir" # Output is produced into FD 4. Prepare it. case "x$outfile" in diff --git a/bin/autoheader.in b/bin/autoheader.in index 57939bd1b..16da87529 100644 --- a/bin/autoheader.in +++ b/bin/autoheader.in @@ -132,19 +132,17 @@ else use_localdir= fi -# Use the frozen version of Autoconf if available. -r= f= # Some non-GNU m4's don't reject the --help option, so give them /dev/null. case `$M4 --help < /dev/null 2>&1` in -*reload-state*) test -r $AC_MACRODIR/autoheader.m4f && { r=--reload f=f; } ;; -*traditional*) ;; -*) echo Autoconf requires GNU m4 1.1 or later >&2; exit 1 ;; +*reload-state*);; +*) echo Autoconf requires GNU m4 1.4 or later >&2; exit 1 ;; esac +run_m4="$M4 --reload $AC_MACRODIR/autoheader.m4f $use_localdir" # Extract assignments of `ah_verbatim_SYMBOL' and `syms' from the # modified autoconf processing of the input file. The sed hair is # necessary to win for multi-line macro invocations. -$M4 -I$AC_MACRODIR $use_localdir $r autoheader.m4$f $infile | +$run_m4 $infile | sed -n -e ' : again /^@@@.*@@@$/s/^@@@\(.*\)@@@$/\1/p diff --git a/configure b/configure index d5fa6ea3a..c63b49b2b 100755 --- a/configure +++ b/configure @@ -915,7 +915,7 @@ fi fi echo "$ac_t""$ac_cv_prog_gnu_m4" 1>&6 if test x"$ac_cv_prog_gnu_m4" != xyes; then - { echo "configure: error: GNU m4 is required" 1>&2; exit 1; } + { echo "configure: error: GNU m4 1.4 is required" 1>&2; exit 1; } fi for ac_prog in mawk gawk nawk awk diff --git a/configure.in b/configure.in index fbb7d8c17..be435bb73 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ dnl first and get that path embedded in the installed autoconf and dnl autoheader scripts. AC_PROG_GNU_M4 if test x"$ac_cv_prog_gnu_m4" != xyes; then - AC_MSG_ERROR([GNU m4 is required]) + AC_MSG_ERROR([GNU m4 1.4 is required]) fi dnl This is needed because Automake does not seem to realize there is dnl an AC_SUBST inside AC_PROG_GNU_M4. Grmph! diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index d06eacb33..956bb9e67 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -564,14 +564,14 @@ esac dnl AC_PROG_GNU_M4 dnl -------------- -dnl Check for GNU m4. +dnl Check for GNU m4, at least 1.3 (supports frozen files). AC_DEFUN(AC_PROG_GNU_M4, [AC_PATH_PROGS(M4, gm4 gnum4 m4, m4) -AC_CACHE_CHECK(whether we are using GNU m4, ac_cv_prog_gnu_m4, +AC_CACHE_CHECK(whether m4 supports frozen files, 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 - *traditional*) ac_cv_prog_gnu_m4=yes ;; + *reload-state*) ac_cv_prog_gnu_m4=yes ;; esac fi])]) diff --git a/man/autoheader.1 b/man/autoheader.1 index 90654584c..39428cb1b 100644 --- a/man/autoheader.1 +++ b/man/autoheader.1 @@ -10,6 +10,12 @@ Create a template file of C `#define' statements for `configure' to use. To this end, scan TEMPLATE-FILE, or `configure.in' if none given. .TP +\fB\-h\fR, \fB\-\-help\fR +print this help, then exit +.TP +\fB\-\-version\fR +print version number, then exit +.TP \fB\-d\fR, \fB\-\-debug\fR don't remove temporary files .TP @@ -21,12 +27,6 @@ directory storing `aclocal.m4' and `acconfig.h' .TP \fB\-v\fR, \fB\-\-verbose\fR verbosely report processing -.TP -\fB\-h\fR, \fB\-\-help\fR -print this help, then exit -.TP -\fB\-\-version\fR -print version number, then exit .SH AUTHOR Written by Roland McGrath. .SH "REPORTING BUGS" diff --git a/man/autoupdate.1 b/man/autoupdate.1 index 59bbd0b73..d602ec918 100644 --- a/man/autoupdate.1 +++ b/man/autoupdate.1 @@ -11,7 +11,7 @@ the syntax of the current version of `autoconf'. The original file is backed up. .TP \fB\-m\fR, \fB\-\-macrodir\fR=\fIDIR\fR -directory storing macro files +directory storing Autoconf's files .TP \fB\-h\fR, \fB\-\-help\fR print this help, then exit diff --git a/man/ifnames.1 b/man/ifnames.1 index eea73cf79..2b2891e09 100644 --- a/man/ifnames.1 +++ b/man/ifnames.1 @@ -12,9 +12,6 @@ identifiers that appear in those files in `#if', `#elif', `#ifdef', or `#ifndef' directives. Print each identifier on a line, followed by a space-separated list of the files in which that identifier occurs. .TP -\fB\-m\fR, \fB\-\-macrodir\fR=\fIDIR\fR -directory storing macro files -.TP \fB\-v\fR, \fB\-\-verbose\fR verbosely report processing .TP