diff --git a/ChangeLog b/ChangeLog index b5b8f7c1..324d30a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2000-03-08 Akim Demaille + + The argument of AC_COPYRIGHT should be plain text, not an sh + comment. + + * libm4.m4 (m4_quote): s/$@/$*/. + * acgeneral.m4 (AC_COPYRIGHT): Prepend `# ' to the lines that goes + on the top of `configure'. Actually, prepend `@%:@ ' so that + there are as many evaluations on both sides. + (_AC_INIT_VERSION): No longer strip `# '. + 2000-03-08 Akim Demaille * tests/Makefile.am (all-local): Remove. It wastes time to have diff --git a/acgeneral.m4 b/acgeneral.m4 index 78fe3125..1e870f24 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -552,13 +552,22 @@ AC_DIVERT_POP()dnl to KILL # AC_COPYRIGHT(TEXT) # ------------------ -# Append Copyright information in the top of `configure'. -# _AC_INIT_VERSION must be run before, exactly like _AC_INIT_BINSH must -# be run before AC_REVISION. + +# 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. +# Had we used `# ', the Copyright sent in the beginning of `configure' +# would have not been evaluated. Another solution, a bit fragile, +# would have be to use m4_quote to force an evaluation: +# +# patsubst(m4_quote($1), [^], [@%:@ ]) +# +# _AC_INIT_VERSION must be run before, exactly like _AC_INIT_BINSH +# must be run before AC_REVISION. AC_DEFUN(AC_COPYRIGHT, [AC_REQUIRE([_AC_INIT_VERSION])dnl AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl -$1 +patsubst([$1], [^], [@%:@ ]) AC_DIVERT_POP()dnl AC_DIVERT_PUSH(AC_DIVERSION_VERSION_BEGIN)dnl $1 @@ -1019,7 +1028,7 @@ AC_DIVERT_POP()dnl AC_DEFUN([_AC_INIT_VERSION], [AC_DIVERT_PUSH(AC_DIVERSION_VERSION_BEGIN)dnl if $ac_init_version; then - sed -e 's/^# *//' <<\EOF + cat <<\EOF AC_DIVERT_POP()dnl AC_DIVERT_PUSH(AC_DIVERSION_VERSION_END)dnl EOF @@ -1220,15 +1229,16 @@ AC_DEFUN(AC_INIT, [m4_sinclude(acsite.m4)dnl m4_sinclude(./aclocal.m4)dnl AC_REQUIRE([_AC_INIT_BINSH])dnl +AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl +# Guess values for system-dependent variables and create Makefiles. +AC_DIVERT_POP()dnl AC_COPYRIGHT( -[# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using Autoconf version ]AC_ACVERSION[. -# Copyright (C) 1992, 93, 94, 95, 96, 98, 99, 2000 -# Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -])dnl +[Generated automatically using Autoconf version ]AC_ACVERSION[. +Copyright (C) 1992, 93, 94, 95, 96, 98, 99, 2000 +Free Software Foundation, Inc. + +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it.])dnl _AC_INIT_DEFAULTS()dnl AC_DIVERT_POP()dnl to NORMAL _AC_INIT_PARSE_ARGS diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 78fe3125..1e870f24 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -552,13 +552,22 @@ AC_DIVERT_POP()dnl to KILL # AC_COPYRIGHT(TEXT) # ------------------ -# Append Copyright information in the top of `configure'. -# _AC_INIT_VERSION must be run before, exactly like _AC_INIT_BINSH must -# be run before AC_REVISION. + +# 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. +# Had we used `# ', the Copyright sent in the beginning of `configure' +# would have not been evaluated. Another solution, a bit fragile, +# would have be to use m4_quote to force an evaluation: +# +# patsubst(m4_quote($1), [^], [@%:@ ]) +# +# _AC_INIT_VERSION must be run before, exactly like _AC_INIT_BINSH +# must be run before AC_REVISION. AC_DEFUN(AC_COPYRIGHT, [AC_REQUIRE([_AC_INIT_VERSION])dnl AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl -$1 +patsubst([$1], [^], [@%:@ ]) AC_DIVERT_POP()dnl AC_DIVERT_PUSH(AC_DIVERSION_VERSION_BEGIN)dnl $1 @@ -1019,7 +1028,7 @@ AC_DIVERT_POP()dnl AC_DEFUN([_AC_INIT_VERSION], [AC_DIVERT_PUSH(AC_DIVERSION_VERSION_BEGIN)dnl if $ac_init_version; then - sed -e 's/^# *//' <<\EOF + cat <<\EOF AC_DIVERT_POP()dnl AC_DIVERT_PUSH(AC_DIVERSION_VERSION_END)dnl EOF @@ -1220,15 +1229,16 @@ AC_DEFUN(AC_INIT, [m4_sinclude(acsite.m4)dnl m4_sinclude(./aclocal.m4)dnl AC_REQUIRE([_AC_INIT_BINSH])dnl +AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl +# Guess values for system-dependent variables and create Makefiles. +AC_DIVERT_POP()dnl AC_COPYRIGHT( -[# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using Autoconf version ]AC_ACVERSION[. -# Copyright (C) 1992, 93, 94, 95, 96, 98, 99, 2000 -# Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -])dnl +[Generated automatically using Autoconf version ]AC_ACVERSION[. +Copyright (C) 1992, 93, 94, 95, 96, 98, 99, 2000 +Free Software Foundation, Inc. + +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it.])dnl _AC_INIT_DEFAULTS()dnl AC_DIVERT_POP()dnl to NORMAL _AC_INIT_PARSE_ARGS diff --git a/libm4.m4 b/libm4.m4 index ef435a34..0de0ceaa 100644 --- a/libm4.m4 +++ b/libm4.m4 @@ -462,6 +462,7 @@ define(_m4_foreach, ## Text processing. ## ## ----------------- ## + # m4_quote(STRING) # ---------------- # Return STRING quoted. @@ -470,7 +471,7 @@ define(_m4_foreach, # `[exp]': in the first case you obtain the quoted *result* of the # expansion of EXP, while in the latter you just obtain the string # `exp'. -define([m4_quote], [[$@]]) +define([m4_quote], [[$*]]) # m4_noquote(STRING)