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>
+
+ 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.
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])])
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
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
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
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
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
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
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
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!
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])])
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
.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"
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
`#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