SUBDIRS = testsuite
-M4FILES = autoconf.m4 acgeneral.m4 acoldnames.m4 acspecific.m4
+M4FILES = autoconf.m4 acgeneral.m4 acoldnames.m4 acspecific.m4 autoheader.m4
# Files that can be generated, but should be up to date for a distribution.
DISTDEP = info Makefile
install: all $(M4FILES) acconfig.h installdirs install-info
@case `$(M4) --help < /dev/null 2>&1` in \
- *reload-state*) $(M4) -F $(acdatadir)/autoconf.m4f autoconf.m4 ;; \
+ *reload-state*) echo installing frozen m4 files; \
+ $(M4) -F $(acdatadir)/autoconf.m4f autoconf.m4 ; \
+ $(M4) -F $(acdatadir)/autoheader.m4f autoheader.m4 ;; \
*traditional*) ;; \
*) echo Error: Autoconf requires GNU m4 1.1 or later; exit 1 ;; \
esac
dnl
dnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR)
AC_DEFUN(AC_INIT,
-[sinclude(./aclocal.m4)dnl
+[sinclude(acsite.m4)dnl
+sinclude(./aclocal.m4)dnl
AC_REQUIRE([AC_INIT_BINSH])dnl
AC_INIT_NOTICE
AC_DIVERT_POP()dnl to NORMAL
include(acgeneral.m4)dnl
builtin(include, acspecific.m4)dnl
builtin(include, acoldnames.m4)dnl
-sinclude(acsite.m4)dnl
+dnl Do not sinclude acsite.m4 here, because it may not be installed
+dnl yet when Autoconf is frozen.
dnl Do not sinclude ./aclocal.m4 here, to prevent it from being frozen.
*) echo "$usage" >&2; exit 1 ;;
esac
-# These are the alternate definitions of the acgeneral.m4 macros we want to
-# redefine. They produce strings in the output marked with "@@@" so we can
-# easily extract the information we want. The `#' at the end of the first
-# line of each definition seems to be necessary to prevent m4 from eating
-# the newline, which makes the @@@ not always be at the beginning of a line.
-frob='define([AC_DEFINE],[#
-@@@syms="$syms $1"@@@
-])dnl
-define([AC_DEFINE_UNQUOTED],[#
-@@@syms="$syms $1"@@@
-])dnl
-define([AC_SIZEOF_TYPE],[#
-@@@types="$types,$1"@@@
-])dnl
-define([AC_CHECK_FUNCS],[#
-@@@funcs="$funcs $1"@@@
-])dnl
-define([AC_CHECK_HEADERS],[#
-@@@headers="$headers $1"@@@
-])dnl
-define([AC_CONFIG_HEADER],[#
-@@@config_h=$1@@@
-])dnl
-define([AC_CHECK_LIB], [#
-changequote(/,/)dnl
-define(/libname/, dnl
-patsubst(patsubst($1, /lib\([^\.]*\)\.a/, /\1/), /-l/, //))dnl
-changequote([,])dnl
- ifelse([$3], , [
-@@@libs="$libs libname"@@@
-], [
-# If it was found, we do:
-$3
-# If it was not found, we do:
-$4
-])
-])dnl
-dnl
-'
-
config_h=config.h
syms=
types=
headers=
libs=
-# We extract assignments of SYMS, TYPES, FUNCS, HEADERS, and LIBS from the
+# 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; rm -f $tmpin; exit 1 ;;
+esac
+
+# Extract assignments of SYMS, TYPES, FUNCS, HEADERS, and LIBS from the
# modified autoconf processing of the input file. The sed hair is
# necessary to win for multi-line macro invocations.
-eval "`echo \"$frob\" |
- $M4 -I$AC_MACRODIR $print_version autoconf.m4 - $infile |
+eval "`$M4 -I$AC_MACRODIR $print_version $r autoheader.m4$f $infile |
sed -n -e '
: again
/^@@@.*@@@$/s/^@@@\(.*\)@@@$/\1/p
*) echo "$usage" >&2; exit 1 ;;
esac
-# These are the alternate definitions of the acgeneral.m4 macros we want to
-# redefine. They produce strings in the output marked with "@@@" so we can
-# easily extract the information we want. The `#' at the end of the first
-# line of each definition seems to be necessary to prevent m4 from eating
-# the newline, which makes the @@@ not always be at the beginning of a line.
-frob='define([AC_DEFINE],[#
-@@@syms="$syms $1"@@@
-])dnl
-define([AC_DEFINE_UNQUOTED],[#
-@@@syms="$syms $1"@@@
-])dnl
-define([AC_SIZEOF_TYPE],[#
-@@@types="$types,$1"@@@
-])dnl
-define([AC_CHECK_FUNCS],[#
-@@@funcs="$funcs $1"@@@
-])dnl
-define([AC_CHECK_HEADERS],[#
-@@@headers="$headers $1"@@@
-])dnl
-define([AC_CONFIG_HEADER],[#
-@@@config_h=$1@@@
-])dnl
-define([AC_CHECK_LIB], [#
-changequote(/,/)dnl
-define(/libname/, dnl
-patsubst(patsubst($1, /lib\([^\.]*\)\.a/, /\1/), /-l/, //))dnl
-changequote([,])dnl
- ifelse([$3], , [
-@@@libs="$libs libname"@@@
-], [
-# If it was found, we do:
-$3
-# If it was not found, we do:
-$4
-])
-])dnl
-dnl
-'
-
config_h=config.h
syms=
types=
headers=
libs=
-# We extract assignments of SYMS, TYPES, FUNCS, HEADERS, and LIBS from the
+# 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; rm -f $tmpin; exit 1 ;;
+esac
+
+# Extract assignments of SYMS, TYPES, FUNCS, HEADERS, and LIBS from the
# modified autoconf processing of the input file. The sed hair is
# necessary to win for multi-line macro invocations.
-eval "`echo \"$frob\" |
- $M4 -I$AC_MACRODIR $print_version autoconf.m4 - $infile |
+eval "`$M4 -I$AC_MACRODIR $print_version $r autoheader.m4$f $infile |
sed -n -e '
: again
/^@@@.*@@@$/s/^@@@\(.*\)@@@$/\1/p
*) echo "$usage" >&2; exit 1 ;;
esac
-# These are the alternate definitions of the acgeneral.m4 macros we want to
-# redefine. They produce strings in the output marked with "@@@" so we can
-# easily extract the information we want. The `#' at the end of the first
-# line of each definition seems to be necessary to prevent m4 from eating
-# the newline, which makes the @@@ not always be at the beginning of a line.
-frob='define([AC_DEFINE],[#
-@@@syms="$syms $1"@@@
-])dnl
-define([AC_DEFINE_UNQUOTED],[#
-@@@syms="$syms $1"@@@
-])dnl
-define([AC_SIZEOF_TYPE],[#
-@@@types="$types,$1"@@@
-])dnl
-define([AC_CHECK_FUNCS],[#
-@@@funcs="$funcs $1"@@@
-])dnl
-define([AC_CHECK_HEADERS],[#
-@@@headers="$headers $1"@@@
-])dnl
-define([AC_CONFIG_HEADER],[#
-@@@config_h=$1@@@
-])dnl
-define([AC_CHECK_LIB], [#
-changequote(/,/)dnl
-define(/libname/, dnl
-patsubst(patsubst($1, /lib\([^\.]*\)\.a/, /\1/), /-l/, //))dnl
-changequote([,])dnl
- ifelse([$3], , [
-@@@libs="$libs libname"@@@
-], [
-# If it was found, we do:
-$3
-# If it was not found, we do:
-$4
-])
-])dnl
-dnl
-'
-
config_h=config.h
syms=
types=
headers=
libs=
-# We extract assignments of SYMS, TYPES, FUNCS, HEADERS, and LIBS from the
+# 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; rm -f $tmpin; exit 1 ;;
+esac
+
+# Extract assignments of SYMS, TYPES, FUNCS, HEADERS, and LIBS from the
# modified autoconf processing of the input file. The sed hair is
# necessary to win for multi-line macro invocations.
-eval "`echo \"$frob\" |
- $M4 -I$AC_MACRODIR $print_version autoconf.m4 - $infile |
+eval "`$M4 -I$AC_MACRODIR $print_version $r autoheader.m4$f $infile |
sed -n -e '
: again
/^@@@.*@@@$/s/^@@@\(.*\)@@@$/\1/p
SUBDIRS = testsuite
-M4FILES = autoconf.m4 acgeneral.m4 acoldnames.m4 acspecific.m4
+M4FILES = autoconf.m4 acgeneral.m4 acoldnames.m4 acspecific.m4 autoheader.m4
# Files that can be generated, but should be up to date for a distribution.
DISTDEP = info Makefile
install: all $(M4FILES) acconfig.h installdirs install-info
@case `$(M4) --help < /dev/null 2>&1` in \
- *reload-state*) $(M4) -F $(acdatadir)/autoconf.m4f autoconf.m4 ;; \
+ *reload-state*) echo installing frozen m4 files; \
+ $(M4) -F $(acdatadir)/autoconf.m4f autoconf.m4 ; \
+ $(M4) -F $(acdatadir)/autoheader.m4f autoheader.m4 ;; \
*traditional*) ;; \
*) echo Error: Autoconf requires GNU m4 1.1 or later; exit 1 ;; \
esac
include(acgeneral.m4)dnl
builtin(include, acspecific.m4)dnl
builtin(include, acoldnames.m4)dnl
-sinclude(acsite.m4)dnl
+dnl Do not sinclude acsite.m4 here, because it may not be installed
+dnl yet when Autoconf is frozen.
dnl Do not sinclude ./aclocal.m4 here, to prevent it from being frozen.
dnl
dnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR)
AC_DEFUN(AC_INIT,
-[sinclude(./aclocal.m4)dnl
+[sinclude(acsite.m4)dnl
+sinclude(./aclocal.m4)dnl
AC_REQUIRE([AC_INIT_BINSH])dnl
AC_INIT_NOTICE
AC_DIVERT_POP()dnl to NORMAL