]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Use URLs in --help output, part 2: configure.
authorEric Blake <ebb9@byu.net>
Mon, 26 Jan 2009 23:43:20 +0000 (16:43 -0700)
committerEric Blake <ebb9@byu.net>
Tue, 27 Jan 2009 23:57:52 +0000 (16:57 -0700)
* lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Bump copyright
date.
(_AC_INIT_PACKAGE): Support optional URL parameter, mapped to
AC_PACKAGE_URL.
(_AC_INIT_DEFAULTS, _AC_INIT_PREPARE): Substitute it.
(_AC_INIT_HELP): Use it in './configure --help' output.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise, for
'./config.status --help'.  Bump copyright date.
* doc/autoconf.texi (Initializing configure) <AC_INIT>: Document
new parameter.
* NEWS: Likewise.
* tests/tools.at (autoheader): Adjust test.
* tests/torture.at (@%:@define header templates)
(Torturing config.status): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
NEWS
doc/autoconf.texi
lib/autoconf/general.m4
lib/autoconf/status.m4
tests/tools.at
tests/torture.at

index e676fbdf5fa247a22c3b80ac879880e0ac49332d..a521e0c0bea3e86b30d18a7c493daf5f54da476a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
 2009-01-27  Eric Blake  <ebb9@byu.net>
 
+       Use URLs in --help output, part 2: configure.
+       * lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Bump copyright
+       date.
+       (_AC_INIT_PACKAGE): Support optional URL parameter, mapped to
+       AC_PACKAGE_URL.
+       (_AC_INIT_DEFAULTS, _AC_INIT_PREPARE): Substitute it.
+       (_AC_INIT_HELP): Use it in './configure --help' output.
+       * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise, for
+       './config.status --help'.  Bump copyright date.
+       * doc/autoconf.texi (Initializing configure) <AC_INIT>: Document
+       new parameter.
+       * NEWS: Likewise.
+       * tests/tools.at (autoheader): Adjust test.
+       * tests/torture.at (@%:@define header templates)
+       (Torturing config.status): Likewise.
+
        Use URLs in --help output, part 1: autoconf executables.
        * bin/autoconf.as (usage): Make output consistent with recent
        change in gnulib version-etc module.
diff --git a/NEWS b/NEWS
index d5c7ed286d6e9a5d8ffbc2e7303e859a4c92803f..ba006cd8fa3214a99e7f08e07207c8cb0acfba16 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,10 @@ GNU Autoconf NEWS - User visible changes.
 ** AC_HEADER_ASSERT is fixed so that './configure --enable-assert' no
    longer mistakenly disables assertions.
 
+** AC_INIT now takes an optional fifth parameter that can be used to
+   set AC_PACKAGE_URL, a URL for the package's home page; the URL is
+   used in `configure --help' and is also available via AC_DEFINE.
+
 ** Autotest testsuites accept an option --jobs[=N] for parallel testing.
 
 ** Autotest testsuites do not attempt to write startup error messages
index fc7d42b20a28f88a89463200da6665e00243e9ec..8a5dc2ed97c514c077dbde00298753ce24d1e1dc 100644 (file)
@@ -1756,7 +1756,7 @@ anything else.  The only other required macro is @code{AC_OUTPUT}
 
 @anchor{AC_INIT}
 @defmac AC_INIT (@var{package}, @var{version}, @ovar{bug-report}, @
-  @ovar{tarname})
+  @ovar{tarname}, @ovar{url})
 @acindex{INIT}
 Process any command-line arguments and perform various initializations
 and verifications.
@@ -1769,7 +1769,8 @@ the email to which users should send bug reports.  The package
 package name (e.g., @samp{GNU Autoconf}), while the former is meant for
 distribution tar ball names (e.g., @samp{autoconf}).  It defaults to
 @var{package} with @samp{GNU } stripped, lower-cased, and all characters
-other than alphanumerics and underscores are changed to @samp{-}.
+other than alphanumerics and underscores are changed to @samp{-}.  If
+provided, @var{url} should be the home page for the package.
 
 It is preferable that the arguments of @code{AC_INIT} be static, i.e.,
 there should not be any shell computation, but they can be computed by
@@ -1790,7 +1791,7 @@ Exactly @var{package}.
 @acindex{PACKAGE_TARNAME}
 @ovindex PACKAGE_TARNAME
 @cvindex PACKAGE_TARNAME
-Exactly @var{tarname}.
+Exactly @var{tarname}, possibly generated from @var{package}.
 
 @item @code{AC_PACKAGE_VERSION}, @code{PACKAGE_VERSION}
 @acindex{PACKAGE_VERSION}
@@ -1808,7 +1809,16 @@ Exactly @samp{@var{package} @var{version}}.
 @acindex{PACKAGE_BUGREPORT}
 @ovindex PACKAGE_BUGREPORT
 @cvindex PACKAGE_BUGREPORT
-Exactly @var{bug-report}.
+Exactly @var{bug-report}, if one was provided.
+
+@item @code{AC_PACKAGE_URL}, @code{PACKAGE_URL}
+@acindex{PACKAGE_URL}
+@ovindex PACKAGE_URL
+@cvindex PACKAGE_URL
+Exactly @var{url}, if one was provided.  If @var{url} was empty, but
+@var{package} begins with @samp{GNU }, then this defaults to
+@samp{http://@/www.gnu.org/@/software/@/@var{tarname}/}, otherwise, no URL is
+assumed.
 @end table
 @end defmac
 
index bcf87206c7ff95f3efff9df97a01f41fd4894dc9..b1c41ba0304911045d33c1714e3f2a859d149f2e 100644 (file)
@@ -1,7 +1,8 @@
 # This file is part of Autoconf.                       -*- Autoconf -*-
 # Parameterized macros.
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+# Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -245,8 +246,8 @@ AU_ALIAS([AC_HELP_STRING], [AS_HELP_STRING])
 
 
 
-# _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME])
-# --------------------------------------------------------------
+# _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME], [URL])
+# ---------------------------------------------------------------------
 m4_define([_AC_INIT_PACKAGE],
 [AS_LITERAL_IF([$1], [], [m4_warn([syntax], [AC_INIT: not a literal: $1])])
 AS_LITERAL_IF([$2], [],  [m4_warn([syntax], [AC_INIT: not a literal: $2])])
@@ -266,6 +267,11 @@ m4_ifndef([AC_PACKAGE_STRING],
          [m4_define([AC_PACKAGE_STRING],    [$1 $2])])
 m4_ifndef([AC_PACKAGE_BUGREPORT],
          [m4_define([AC_PACKAGE_BUGREPORT], [$3])])
+m4_ifndef([AC_PACKAGE_URL],
+         [m4_define([AC_PACKAGE_URL],
+  m4_if([$5], [], [m4_if(m4_index([$1], [GNU ]), [0],
+         [[http://www.gnu.org/software/]m4_defn([AC_PACKAGE_TARNAME])[/]])],
+       [[$5]]))])
 ])
 
 
@@ -364,7 +370,8 @@ m4_ifset([AC_PACKAGE_BUGREPORT],
 m4_define([_AC_INIT_COPYRIGHT],
 [AC_COPYRIGHT(
 [Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.],
              [VERSION_FSF])dnl
@@ -431,6 +438,8 @@ AC_SUBST([PACKAGE_STRING],
         [m4_ifdef([AC_PACKAGE_STRING],    ['AC_PACKAGE_STRING'])])dnl
 AC_SUBST([PACKAGE_BUGREPORT],
         [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
+AC_SUBST([PACKAGE_URL],
+        [m4_ifdef([AC_PACKAGE_URL],       ['AC_PACKAGE_URL'])])dnl
 
 m4_divert_pop([DEFAULTS])dnl
 m4_wrap_lifo([m4_divert_text([DEFAULTS],
@@ -1117,8 +1126,13 @@ m4_ifset([AC_PACKAGE_STRING],
   cat <<\_ACEOF
 m4_divert_pop([HELP_ENABLE])dnl
 m4_divert_push([HELP_END])dnl
-m4_ifset([AC_PACKAGE_BUGREPORT], [
-Report bugs to <AC_PACKAGE_BUGREPORT>.])
+
+Report bugs to m4_ifset([AC_PACKAGE_BUGREPORT], [<AC_PACKAGE_BUGREPORT>],
+  [the package provider]).dnl
+m4_ifdef([AC_PACKAGE_NAME], [m4_ifset([AC_PACKAGE_URL], [
+AC_PACKAGE_NAME home page: <AC_PACKAGE_URL>.])dnl
+m4_if(m4_index(m4_defn([AC_PACKAGE_NAME]), [GNU ]), [0], [
+General help using GNU software: <http://www.gnu.org/gethelp/>.])])
 _ACEOF
 ac_status=$?
 fi
@@ -1343,6 +1357,8 @@ AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"],
 AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
                   [Define to the address where bug reports for this package
                    should be sent.])dnl
+AC_DEFINE_UNQUOTED([PACKAGE_URL], ["$PACKAGE_URL"],
+                  [Define to the home page for this package.])
 
 # Let the site file select an alternate cache file if it wants to.
 AC_SITE_LOAD
@@ -1362,10 +1378,17 @@ AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
 ])
 
 
-# AC_INIT([PACKAGE, VERSION, [BUG-REPORT])
-# ----------------------------------------
+# AC_INIT([PACKAGE, VERSION, [BUG-REPORT], [TARNAME], [URL])
+# ----------------------------------------------------------
 # Include the user macro files, prepare the diversions, and output the
 # preamble of the `configure' script.
+#
+# If BUG-REPORT is omitted, do without (unless the user previously
+# defined the m4 macro AC_PACKAGE_BUGREPORT).  If TARNAME is omitted,
+# use PACKAGE to seed it.  If URL is omitted, use
+# `http://www.gnu.org/software/TARNAME/' if PACKAGE begins with `GNU',
+# otherwise, do without.
+#
 # Note that the order is important: first initialize, then set the
 # AC_CONFIG_SRCDIR.
 m4_define([AC_INIT],
index bfd7a79660d78d96b25552022dbb2bdbf1780b73..6ed33a0aec85b18b103167e14245534348884e0f 100644 (file)
@@ -1,7 +1,8 @@
 # This file is part of Autoconf.                       -*- Autoconf -*-
 # Parameterizing and creating config.status.
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+# Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -1428,7 +1429,12 @@ m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
 $config_commands
 
 ])dnl
-Report bugs to <bug-autoconf@gnu.org>."
+Report bugs to m4_ifset([AC_PACKAGE_BUGREPORT], [<AC_PACKAGE_BUGREPORT>],
+  [the package provider]).dnl
+m4_ifdef([AC_PACKAGE_NAME], [m4_ifset([AC_PACKAGE_URL], [
+AC_PACKAGE_NAME home page: <AC_PACKAGE_URL>.])dnl
+m4_if(m4_index(m4_defn([AC_PACKAGE_NAME]), [GNU ]), [0], [
+General help using GNU software: <http://www.gnu.org/gethelp/>.])])"
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
@@ -1438,7 +1444,7 @@ m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
 configured by $[0], generated by m4_PACKAGE_STRING,
   with options \\"`AS_ECHO(["$ac_configure_args"]) | sed 's/^ //; s/[[\\""\`\$]]/\\\\&/g'`\\"
 
-Copyright (C) 2008 Free Software Foundation, Inc.
+Copyright (C) 2009 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
index 9282e88f9ec729dc1b98b8e991ce9c9fcb3b92bf..871d2671998196b482e63a77d22339b2acbebd25 100644 (file)
@@ -604,6 +604,9 @@ AT_CHECK([cat config.hin], 0,
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
 
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 ]])
@@ -682,6 +685,9 @@ The Mouse in a h@t.
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
 
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
index 4779e215504465914918037ef621c580d5e3b416..9d58e51f6d30b6bc6395c2b7d23b057cda5e9b32 100644 (file)
@@ -1,7 +1,7 @@
 #                                                      -*- Autotest -*-
 
-# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+# 2009 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -560,7 +560,7 @@ AT_CHECK([cat config.h], 0, expout)
 
 # Check the value of DEFS.
 AT_DATA([expout],
-[[-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -Dfoo=toto -Dbar=tata -Dbaz=titi -Dfubar=tutu -Da=A -Daaa=AAA -Daa=AA -Dmultiline=line1line2line3\ line4 -Dmultiline_args\(ARG1,\ ARG2\)=ARG2\ ARG1 -Dpaste\(a,b\)=a\#\#b
+[[-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -Dfoo=toto -Dbar=tata -Dbaz=titi -Dfubar=tutu -Da=A -Daaa=AAA -Daa=AA -Dmultiline=line1line2line3\ line4 -Dmultiline_args\(ARG1,\ ARG2\)=ARG2\ ARG1 -Dpaste\(a,b\)=a\#\#b
 ]])
 
 # Because we strip trailing spaces in `testsuite' we can't leave one in
@@ -684,6 +684,9 @@ for awk_arg in FOO= AWK=awk; do
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME ""
 
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
 /* Define to the version of this package. */
 #define PACKAGE_VERSION ""
 m4_for(AT_Count, 1, 100, 1,