]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
add freezing to autoheader
authorDavid MacKenzie <djm@djmnet.org>
Tue, 30 Aug 1994 20:24:50 +0000 (20:24 +0000)
committerDavid MacKenzie <djm@djmnet.org>
Tue, 30 Aug 1994 20:24:50 +0000 (20:24 +0000)
Makefile.in
acgeneral.m4
autoconf.m4
autoheader.in
autoheader.sh
bin/autoheader.in
doc/Makefile.in
lib/autoconf/autoconf.m4
lib/autoconf/general.m4

index 62542d840b1f262133d7ee7495f2ee2e815f1982..c2619f5082018c6e8b0f3c39b3f6204ed03f7802 100644 (file)
@@ -52,7 +52,7 @@ SHELL = /bin/sh
 
 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
@@ -129,7 +129,9 @@ installdirs:
 
 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
index edf4abb9f56961861b69c2bf627b04cc3d68d6a6..bba3c8c77ef6b3ccc8bbc5e614f427a64e62121d 100644 (file)
@@ -416,7 +416,8 @@ AC_DEFUN(AC_INIT_BINSH,
 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
index 4517dbe53c2e81b3e8541c0e94779aafb614beaa..2b17435591ba061b836a649cca9602315c00eb6f 100644 (file)
@@ -22,5 +22,6 @@ dnl
 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.
index dc0e6b461beba74bed3086a73ca74f6924a40b1b..2e28af524ff9a1706b1ca16b8f9ecff44044db2b 100644 (file)
@@ -79,46 +79,6 @@ case $# in
   *) 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=
@@ -126,11 +86,19 @@ funcs=
 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
index dc0e6b461beba74bed3086a73ca74f6924a40b1b..2e28af524ff9a1706b1ca16b8f9ecff44044db2b 100644 (file)
@@ -79,46 +79,6 @@ case $# in
   *) 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=
@@ -126,11 +86,19 @@ funcs=
 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
index dc0e6b461beba74bed3086a73ca74f6924a40b1b..2e28af524ff9a1706b1ca16b8f9ecff44044db2b 100644 (file)
@@ -79,46 +79,6 @@ case $# in
   *) 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=
@@ -126,11 +86,19 @@ funcs=
 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
index 62542d840b1f262133d7ee7495f2ee2e815f1982..c2619f5082018c6e8b0f3c39b3f6204ed03f7802 100644 (file)
@@ -52,7 +52,7 @@ SHELL = /bin/sh
 
 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
@@ -129,7 +129,9 @@ installdirs:
 
 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
index 4517dbe53c2e81b3e8541c0e94779aafb614beaa..2b17435591ba061b836a649cca9602315c00eb6f 100644 (file)
@@ -22,5 +22,6 @@ dnl
 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.
index edf4abb9f56961861b69c2bf627b04cc3d68d6a6..bba3c8c77ef6b3ccc8bbc5e614f427a64e62121d 100644 (file)
@@ -416,7 +416,8 @@ AC_DEFUN(AC_INIT_BINSH,
 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