* 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>
+
+ 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
# 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; \
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; \
# 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; \
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; \
# 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.
#
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)
])
-# 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.
[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
# _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
])
_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
# 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.
#
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)
])
-# 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.
[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
# _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
])
_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