]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Invoking AC_COPYRIGHT before AC_INIT fails.
authorAkim Demaille <akim@epita.fr>
Wed, 6 Jun 2001 08:49:33 +0000 (08:49 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 6 Jun 2001 08:49:33 +0000 (08:49 +0000)
* 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.

ChangeLog
Makefile.am
Makefile.in
acgeneral.m4
lib/autoconf/general.m4

index c27daf93891f78734101ef606dcd2ba7f3665a3d..3b9b2db82bfdffef0d15c0fa74d886028173a4ed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2001-06-06  Akim Demaille  <akim@epita.fr>
+
+       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  <akim@epita.fr>
 
        * tests/semantics.at (AC_CHECK_LIB): Strengthen to reflect
index 9c6c3cfb0e7b1ccd321fda455f9852d0e7b29ebc..0a9b13884ac83b9cdcfdbaa5760643294ce617a7 100644 (file)
@@ -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; \
index 6046784853f967585044a24db172c4d57d6608c3..ce9564802bb1cc7f0fc642239d291729023daf21 100644 (file)
@@ -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; \
index e8ef1be5709fbf2ccc064cec57a58451b33917b5..1ad2e7b1f5d41bc8ba176200b64179f27fcc7325 100644 (file)
 #   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
index e8ef1be5709fbf2ccc064cec57a58451b33917b5..1ad2e7b1f5d41bc8ba176200b64179f27fcc7325 100644 (file)
 #   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