From: Akim Demaille Date: Wed, 6 Jun 2001 08:49:33 +0000 (+0000) Subject: Invoking AC_COPYRIGHT before AC_INIT fails. X-Git-Tag: AUTOCONF-2.50a~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afa5be9dbe386983c8b4360b493083d062fba9ee;p=thirdparty%2Fautoconf.git Invoking AC_COPYRIGHT before AC_INIT fails. * Makefile.am (.m4.m4f): Pass --fatal-warnings to m4. * acgeneral.m4 (_m4_divert(VERSION_FSF)) (_m4_divert(VERSION_USER)): New. (AC_COPYRIGHT): $2 is the diversion to use. (_AC_INIT_COPYRIGHT): Use the FSF diversion. (AC_INIT): Remove dead comments as now it's commutative. --- diff --git a/ChangeLog b/ChangeLog index c27daf938..3b9b2db82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2001-06-06 Akim Demaille + + Invoking AC_COPYRIGHT before AC_INIT fails. + + * Makefile.am (.m4.m4f): Pass --fatal-warnings to m4. + * acgeneral.m4 (_m4_divert(VERSION_FSF)) + (_m4_divert(VERSION_USER)): New. + (AC_COPYRIGHT): $2 is the diversion to use. + (_AC_INIT_COPYRIGHT): Use the FSF diversion. + (AC_INIT): Remove dead comments as now it's commutative. + 2001-06-06 Akim Demaille * tests/semantics.at (AC_CHECK_LIB): Strengthen to reflect diff --git a/Makefile.am b/Makefile.am index 9c6c3cfb0..0a9b13884 100644 --- a/Makefile.am +++ b/Makefile.am @@ -178,7 +178,8 @@ autoscan: $(srcdir)/autoscan.in $(srcdir)/configure.in # It may happen that the output does not end with a end of line, hence # force an end of line when reporting errors. .m4.m4f: - $(M4) -I $(srcdir) -D divert $(srcdir)/$*.m4 | \ + $(M4) --include $(srcdir) --fatal-warning --define divert \ + $(srcdir)/$*.m4 | \ sed 's/#.*//;/^$$/d' >process.log if grep . process.log >/dev/null 2>&1; then \ echo "Processing $(srcdir)/$*.m4 produced output:" >&2; \ @@ -188,7 +189,8 @@ autoscan: $(srcdir)/autoscan.in $(srcdir)/configure.in else \ rm -f process.log; \ fi - $(M4) -I $(srcdir) --freeze-state=$*.m4f $(srcdir)/$*.m4 >freeze.log + $(M4) --include $(srcdir) --fatal-warning --freeze-state=$*.m4f \ + $(srcdir)/$*.m4 >freeze.log if grep . freeze.log >/dev/null 2>&1; then \ echo "Freezing $(srcdir)/$*.m4 produced output:" >&2; \ sed "s,^,$(srcdir)/$*.m4: ," < freeze.log >&2; \ diff --git a/Makefile.in b/Makefile.in index 604678485..ce9564802 100644 --- a/Makefile.in +++ b/Makefile.in @@ -481,7 +481,8 @@ autoscan: $(srcdir)/autoscan.in $(srcdir)/configure.in # It may happen that the output does not end with a end of line, hence # force an end of line when reporting errors. .m4.m4f: - $(M4) -I $(srcdir) -D divert $(srcdir)/$*.m4 | \ + $(M4) --include $(srcdir) --fatal-warning --define divert \ + $(srcdir)/$*.m4 | \ sed 's/#.*//;/^$$/d' >process.log if grep . process.log >/dev/null 2>&1; then \ echo "Processing $(srcdir)/$*.m4 produced output:" >&2; \ @@ -491,7 +492,8 @@ autoscan: $(srcdir)/autoscan.in $(srcdir)/configure.in else \ rm -f process.log; \ fi - $(M4) -I $(srcdir) --freeze-state=$*.m4f $(srcdir)/$*.m4 >freeze.log + $(M4) --include $(srcdir) --fatal-warning --freeze-state=$*.m4f \ + $(srcdir)/$*.m4 >freeze.log if grep . freeze.log >/dev/null 2>&1; then \ echo "Freezing $(srcdir)/$*.m4 produced output:" >&2; \ sed "s,^,$(srcdir)/$*.m4: ," < freeze.log >&2; \ diff --git a/acgeneral.m4 b/acgeneral.m4 index e8ef1be57..1ad2e7b1f 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -91,7 +91,11 @@ # Tail of the handling of --help. # # - VERSION_BEGIN -# Copyright notice for --version. +# Head of the handling of --version. +# - VERSION_FSF +# FSF copyright notice for --version. +# - VERSION_USER +# User copyright notice for --version. # - VERSION_END # Tail of the handling of --version. # @@ -124,7 +128,9 @@ m4_define([_m4_divert(HELP_VAR_END)], 15) m4_define([_m4_divert(HELP_END)], 16) m4_define([_m4_divert(VERSION_BEGIN)], 20) -m4_define([_m4_divert(VERSION_END)], 21) +m4_define([_m4_divert(VERSION_FSF)], 21) +m4_define([_m4_divert(VERSION_USER)], 22) +m4_define([_m4_divert(VERSION_END)], 23) m4_define([_m4_divert(INIT_PREPARE)], 30) @@ -449,8 +455,8 @@ m4_define([AC_PACKAGE_BUGREPORT], [$3]) ]) -# AC_COPYRIGHT(TEXT) -# ------------------ +# AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER]) +# ------------------------------------------------------ # Append Copyright information in the top of `configure'. TEXT is # evaluated once, hence TEXT can use macros. Note that we do not # prepend `# ' but `@%:@ ', since m4 does not evaluate the comments. @@ -463,7 +469,7 @@ m4_define([AC_COPYRIGHT], [m4_divert_text([NOTICE], [m4_patsubst([ $1], [^], [@%:@ ])])dnl -m4_divert_text([VERSION_BEGIN], +m4_divert_text(m4_default([$2], [VERSION_USER]), [ $1])dnl ])# AC_COPYRIGHT @@ -542,12 +548,15 @@ m4_ifset([AC_PACKAGE_BUGREPORT], # _AC_INIT_COPYRIGHT # ------------------ +# We dump to VERSION_FSF to make sure we are inserted before the +# user copyrights, and after the setup of the --version handling. m4_define([_AC_INIT_COPYRIGHT], [AC_COPYRIGHT( [Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it.])dnl +gives unlimited permission to copy, distribute and modify it.], + [VERSION_FSF])dnl ]) @@ -1410,8 +1419,6 @@ _AC_INIT_HELP _AC_INIT_VERSION _AC_INIT_CONFIG_LOG _AC_INIT_PREPARE -dnl _AC_INIT_COPYRIGHT must be called after _AC_INIT_VERSION, since -dnl it dumps into a diversion prepared by _AC_INIT_VERSION. _AC_INIT_NOTICE _AC_INIT_COPYRIGHT m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index e8ef1be57..1ad2e7b1f 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -91,7 +91,11 @@ # Tail of the handling of --help. # # - VERSION_BEGIN -# Copyright notice for --version. +# Head of the handling of --version. +# - VERSION_FSF +# FSF copyright notice for --version. +# - VERSION_USER +# User copyright notice for --version. # - VERSION_END # Tail of the handling of --version. # @@ -124,7 +128,9 @@ m4_define([_m4_divert(HELP_VAR_END)], 15) m4_define([_m4_divert(HELP_END)], 16) m4_define([_m4_divert(VERSION_BEGIN)], 20) -m4_define([_m4_divert(VERSION_END)], 21) +m4_define([_m4_divert(VERSION_FSF)], 21) +m4_define([_m4_divert(VERSION_USER)], 22) +m4_define([_m4_divert(VERSION_END)], 23) m4_define([_m4_divert(INIT_PREPARE)], 30) @@ -449,8 +455,8 @@ m4_define([AC_PACKAGE_BUGREPORT], [$3]) ]) -# AC_COPYRIGHT(TEXT) -# ------------------ +# AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER]) +# ------------------------------------------------------ # Append Copyright information in the top of `configure'. TEXT is # evaluated once, hence TEXT can use macros. Note that we do not # prepend `# ' but `@%:@ ', since m4 does not evaluate the comments. @@ -463,7 +469,7 @@ m4_define([AC_COPYRIGHT], [m4_divert_text([NOTICE], [m4_patsubst([ $1], [^], [@%:@ ])])dnl -m4_divert_text([VERSION_BEGIN], +m4_divert_text(m4_default([$2], [VERSION_USER]), [ $1])dnl ])# AC_COPYRIGHT @@ -542,12 +548,15 @@ m4_ifset([AC_PACKAGE_BUGREPORT], # _AC_INIT_COPYRIGHT # ------------------ +# We dump to VERSION_FSF to make sure we are inserted before the +# user copyrights, and after the setup of the --version handling. m4_define([_AC_INIT_COPYRIGHT], [AC_COPYRIGHT( [Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it.])dnl +gives unlimited permission to copy, distribute and modify it.], + [VERSION_FSF])dnl ]) @@ -1410,8 +1419,6 @@ _AC_INIT_HELP _AC_INIT_VERSION _AC_INIT_CONFIG_LOG _AC_INIT_PREPARE -dnl _AC_INIT_COPYRIGHT must be called after _AC_INIT_VERSION, since -dnl it dumps into a diversion prepared by _AC_INIT_VERSION. _AC_INIT_NOTICE _AC_INIT_COPYRIGHT m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl