]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
1999-11-10 Akim Demaille <akim@epita.fr>
authorAkim Demaille <akim@epita.fr>
Sat, 29 Jan 2000 09:51:17 +0000 (09:51 +0000)
committerAkim Demaille <akim@epita.fr>
Sat, 29 Jan 2000 09:51:17 +0000 (09:51 +0000)
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.

14 files changed:
ChangeLog
acspecific.m4
autoconf.in
autoconf.sh
autoheader.in
autoheader.sh
bin/autoconf.in
bin/autoheader.in
configure
configure.in
lib/autoconf/specific.m4
man/autoheader.1
man/autoupdate.1
man/ifnames.1

index 74b93a8088fc5872a8e2e5a0a636782c38178f53..aca15b6949a994eaf61bcd3ec4f73de907f77d9d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+1999-11-10  Akim Demaille  <akim@epita.fr>
+
+       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  <akim@epita.fr>
 
        No need for foo="`bar`", foo=`bar` is fine.
index d06eacb3396b0b52c60ff0006f7a41f74946df5d..956bb9e677a32a8a0bb6a3191d41ab42f4cb8955 100644 (file)
@@ -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])])
 
index 59aa325d8070c23e13b562ff88a143940d8c0d9a..a3e6f8b95f08793512493bab3c1d0ed849bf8403 100644 (file)
@@ -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
index 59aa325d8070c23e13b562ff88a143940d8c0d9a..a3e6f8b95f08793512493bab3c1d0ed849bf8403 100644 (file)
@@ -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
index 57939bd1b2b5d88df6bf70849d26c33e3ee33df0..16da8752908e01e85a8799f08d0d3eecf5e4da35 100644 (file)
@@ -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
index 57939bd1b2b5d88df6bf70849d26c33e3ee33df0..16da8752908e01e85a8799f08d0d3eecf5e4da35 100644 (file)
@@ -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
index 59aa325d8070c23e13b562ff88a143940d8c0d9a..a3e6f8b95f08793512493bab3c1d0ed849bf8403 100644 (file)
@@ -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
index 57939bd1b2b5d88df6bf70849d26c33e3ee33df0..16da8752908e01e85a8799f08d0d3eecf5e4da35 100644 (file)
@@ -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
index d5fa6ea3a5d9d7fd5a17ef3d3164574f098f876d..c63b49b2b22401ddd2b645f6537464a7a8091627 100755 (executable)
--- 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
index fbb7d8c174b49801308580fe6eb9e31e3e5a0a3c..be435bb7359d52157127f5246863c9cfc80613b9 100644 (file)
@@ -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!
index d06eacb3396b0b52c60ff0006f7a41f74946df5d..956bb9e677a32a8a0bb6a3191d41ab42f4cb8955 100644 (file)
@@ -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])])
 
index 90654584cd54035e0550e36aaba0b07007736b5f..39428cb1bffb7b5505858a5224a564a8ced0ba83 100644 (file)
@@ -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"
index 59bbd0b730223e66b92842a5b656a13afbf34deb..d602ec9189a570a7d6c707a0a06018e9edc326de 100644 (file)
@@ -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
index eea73cf797a3c7beebf9571141df95b4005e2688..2b2891e09c0be6aa7447353a087645d58d57b2ca 100644 (file)
@@ -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