Hi!
Sometimes, you'd like the ability to insert comments at the top of
`configure'. The following patch implements this with a new diversion and a
new macro, AC_COMMENT.
BTW, I noticed that AC_PACKAGE is not documented. Is it intentional ?
2000-05-05 Didier Verna <[EMAIL PROTECTED]>
* acgeneral.m4 (COMMENT): new diversion.
(AC_COMMENT): new macro (add comments at the top of `configure').
* doc/autoconf.texi (Notices): document it.
Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.443
diff -u -r1.443 acgeneral.m4
--- acgeneral.m4 2000/05/05 14:58:44 1.443
+++ acgeneral.m4 2000/05/09 08:51:21
@@ -71,6 +71,8 @@
# AC_REQUIRE'd #! /bin/sh line
# - NOTICE
# copyright notice(s)
+# - COMMENT
+# additional comment(s) appearing at the top of the `configure' script
# - DEFAULTS
# early initializations (defaults)
# - INIT_PARSE_ARGS
@@ -119,8 +121,9 @@
define([_AC_DIVERT(BINSH)], 0)
define([_AC_DIVERT(NOTICE)], 1)
-define([_AC_DIVERT(DEFAULTS)], 2)
-define([_AC_DIVERT(INIT_PARSE_ARGS)], 3)
+define([_AC_DIVERT(COMMENT)], 2)
+define([_AC_DIVERT(DEFAULTS)], 3)
+define([_AC_DIVERT(INIT_PARSE_ARGS)], 4)
define([_AC_DIVERT(HELP_BEGIN)], 10)
define([_AC_DIVERT(HELP_CANON)], 11)
@@ -736,6 +739,19 @@
AC_DEFUN(AC_REVISION,
[AC_REQUIRE([AC_INIT])dnl
AC_DIVERT([BINSH], [@%:@ From configure.in translit([$1], $")])dnl "
+])
+
+
+# AC_COMMENT(TEXT)
+# ----------------
+# Similar to AC_COPYRIGHT, except that TEXT is really just a comment inserted
+# at the top of `configure': it is not output by any command-line argument.
+# AC_INIT must be run before, exactly like for AC_REVISION.
+AC_DEFUN(AC_COMMENT,
+[AC_REQUIRE([AC_INIT])dnl
+AC_DIVERT([COMMENT],
+[patsubst([
+$1], [^], [@%:@ ])])dnl
])
Index: doc/autoconf.texi
===================================================================
RCS file: /cvs/autoconf/doc/autoconf.texi,v
retrieving revision 1.261
diff -u -r1.261 autoconf.texi
--- doc/autoconf.texi 2000/05/04 09:25:43 1.261
+++ doc/autoconf.texi 2000/05/09 08:57:42
@@ -1178,6 +1178,15 @@
@end defmac
+@defmac AC_COMMENT(@var{header-text})
+@maindex COMMENT
+@cindex Header Comment
+Add additional comments at the top of @code{configure}. These comments
+will appear just after the copyright notices. You don't have to comment
+the text by yourself, @code{autoconf} will do it for you.
+@end defmac
+
+
@defmac AC_REVISION (@var{revision-info})
@maindex REVISION
@cindex Revision
--
/ / _ _ Didier Verna http://www.inf.enst.fr/~verna/
- / / - / / /_/ / EPITA / LRDE mailto:[EMAIL PROTECTED]
/_/ / /_/ / /__ / 14-16 rue Voltaire Tel. +33 (1) 44 08 01 77
94276 Kremlin-Bicêtre cedex Fax. +33 (1) 44 08 01 99