Hi!
I propose the following patch (against the latest CVS archive). The
main purpose of this patch is to actually use AC_BUGREPORT somewhere ;-). I
also took the opportunity to slightly improve different strings output by
Autoconf, in the configure script itself as well as `configure --help' and
`configure --version'.
The only potentially controversal part is that IMHO,
AC_PACKAGE_BUGREPORT (as an email address only) is too rigid to satisfy
package developpers, even in the world of GNU packages. Makeinfo, for
instance, likes to display more:
,----
| Email bug reports to [EMAIL PROTECTED],
| general questions and discussion to [EMAIL PROTECTED]
`-----
... that's why I propose to let people specify such a short line or
paragraph (as a consequence, I renamed AC_PACKAGE_BUGREPORT to
AC_PACKAGE_CONTACT, but that's transparent because these are internal macros
set thanks to the 3rd argument of AC_INIT).
As an example of how the output now looks, consider the following package:
Package `toto':
===============
,----
| AC_PREREQ(2.14a)
|
| AC_INIT([Toto], [1.0], [Bug reports: <[EMAIL PROTECTED]>
| General discussion: <[EMAIL PROTECTED]>])
| AC_COPYRIGHT([Copyright (C) 2000 Toto.])
| AC_REVISION($Revision: 1$)
|
| AC_OUTPUT()
`-----
head -18 configure:
,----
| #! /bin/sh
| # From configure.in Revision: 1
| # Guess values for system-dependent variables and create Makefiles.
| # Generated by Autoconf 2.14a for Toto 1.0.
| #
| # Bug reports: <[EMAIL PROTECTED]>
| # General discussion: <[EMAIL PROTECTED]>
| #
| # 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.
| #
| # Copyright (C) 2000 Toto.
|
| #
| # Initializations.
| #
`-----
configure --help:
,----
| `configure' configures Toto 1.0 to adapt to many kinds of systems.
|
| Usage: ./configure [OPTION]... [VAR=VALUE]...
| [...]
|
| Bug reports: <[EMAIL PROTECTED]>
| General discussion: <[EMAIL PROTECTED]>
`-----
configure --version:
,----
| Configure script for Toto 1.0, generated by Autoconf 2.14a.
|
| 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.
|
| Copyright (C) 2000 Toto.
`-----
2000-07-31 Didier Verna <[EMAIL PROTECTED]>
* doc/autoconf.texi (Input): update the doc for `AC_INIT'.
* acgeneral.m4 (AC_PACKAGE_BUGREPORT): renamed to
`AC_PACKAGE_CONTACT' (in `_AC_INIT_PACKAGE').
(_AC_INIT_HELP): output the contents of `AC_PACKAGE_CONTACT' at
the end of `configure --help'.
(_AC_INIT_VERSION): outputs a clearer message with both autoconf
and package versions.
(_AC_INIT_NOTICE): ditto, plus the contents of
`AC_PACKAGE_CONTACT'.
(AC_ARG_ENABLE): insert a blank line before real `--enable-*'
options listing.
Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.535
diff -u -r1.535 acgeneral.m4
--- acgeneral.m4 2000/07/31 09:22:47 1.535
+++ acgeneral.m4 2000/07/31 10:02:39
@@ -1054,10 +1054,10 @@
# _AC_INIT_PACKAGE(PACKAGE, VERSION, [BUG-REPORT])
# ------------------------------------------------
define([_AC_INIT_PACKAGE],
-[define([AC_PACKAGE_NAME], [$1])dnl
-define([AC_PACKAGE_VERSION], [$2])dnl
-define([AC_PACKAGE_STRING], [$1 $2])dnl
-define([AC_PACKAGE_BUGREPORT], [$3])dnl
+[define([AC_PACKAGE_NAME], [$1])dnl
+define([AC_PACKAGE_VERSION], [$2])dnl
+define([AC_PACKAGE_STRING], [$1 $2])dnl
+define([AC_PACKAGE_CONTACT], [$3])dnl
])
@@ -1735,6 +1735,8 @@
cat <<\EOF
AC_DIVERT_POP()dnl
AC_DIVERT_PUSH([HELP_END])dnl
+ifset([AC_PACKAGE_CONTACT], [
+AC_PACKAGE_CONTACT])
EOF
fi
@@ -1782,9 +1784,9 @@
[AC_DIVERT([VERSION_BEGIN],
[if $ac_init_version; then
cat <<\EOF])dnl
-ifset([AC_PACKAGE_STRING],
-[AC_DIVERT([VERSION_BEGIN],
- [configure (AC_PACKAGE_STRING) AC_ACVERSION])])
+AC_DIVERT([VERSION_BEGIN], [Configure script dnl
+ifset([AC_PACKAGE_STRING], [for AC_PACKAGE_STRING, ])dnl
+generated by Autoconf AC_ACVERSION.])
AC_DIVERT([VERSION_END],
[EOF
exit 0
@@ -1934,8 +1936,14 @@
define([_AC_INIT_NOTICE],
[AC_DIVERT([NOTICE],
[# Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by Autoconf AC_ACVERSION.])dnl
-])
+@%:@ Generated by Autoconf dnl
+ifset([AC_PACKAGE_STRING],
+[AC_ACVERSION for AC_PACKAGE_STRING.],
+[AC_ACVERSION.])dnl
+ifset([AC_PACKAGE_CONTACT], [
+]patsubst([
+]AC_PACKAGE_CONTACT, [^], [@%:@ ]))dnl
+])])
# _AC_INIT_COPYRIGHT
@@ -2004,7 +2012,8 @@
[AC_DIVERT_ONCE([HELP_ENABLE], [[
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]]])dnl
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+]])dnl
AC_DIVERT_ONCE([HELP_ENABLE], [$2])dnl
# Check whether --enable-$1 or --disable-$1 was given.
if test "[${enable_]patsubst([$1], -, _)+set}" = set; then
Index: doc/autoconf.texi
===================================================================
RCS file: /cvs/autoconf/doc/autoconf.texi,v
retrieving revision 1.348
diff -u -r1.348 autoconf.texi
--- doc/autoconf.texi 2000/07/28 07:41:53 1.348
+++ doc/autoconf.texi 2000/07/31 10:03:12
@@ -1290,12 +1290,14 @@
anything else. The only other required macro is @code{AC_OUTPUT}
(@pxref{Output}).
-@defmac AC_INIT (@var{package}, @var{version}, @ovar{bug-report-address})
+@defmac AC_INIT (@var{package}, @var{version}, @ovar{contact})
@maindex INIT
Process any command-line arguments and perform various initializations
and verifications. Set the name of the @var{package} and its
-@var{version}. The optional argument @var{bug-report-address} should be
-the email to which users should send bug reports.
+@var{version}. The optional argument @var{contact} should be a short
+line or paragraph giving email adresses for bug reports, mailing lists
+etc. It will be displayed at the end of a @code{configure --help}
+output.
@end defmac
@defmac AC_CONFIG_SRCDIR (@var{unique-file-in-source-dir})
--
/ / _ _ 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