]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
The argument of AC_COPYRIGHT should be plain text, not an sh
authorAkim Demaille <akim@epita.fr>
Wed, 8 Mar 2000 16:13:32 +0000 (16:13 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 8 Mar 2000 16:13:32 +0000 (16:13 +0000)
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 `# '.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4
libm4.m4

index b5b8f7c145b7d8c124f793e46f8a836b9b4fd432..324d30a9616c98b6e11a1f1464afc32063abdbd6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2000-03-08  Akim Demaille  <akim@epita.fr>
+
+       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  <akim@epita.fr>
 
        * tests/Makefile.am (all-local): Remove.  It wastes time to have
index 78fe31253b7a47c4ec8e83c9910720c7de9479f7..1e870f24d5c30b92cc214fc0c8446e7ce47de340 100644 (file)
@@ -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
index 78fe31253b7a47c4ec8e83c9910720c7de9479f7..1e870f24d5c30b92cc214fc0c8446e7ce47de340 100644 (file)
@@ -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
index ef435a3403c40800fb197b122b22cb96db66c9a9..0de0ceaae3ac29b974614e0864fb0c43872b8ada 100644 (file)
--- 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)