]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Warn if the
authorAkim Demaille <akim@epita.fr>
Mon, 20 Aug 2001 14:46:59 +0000 (14:46 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 20 Aug 2001 14:46:59 +0000 (14:46 +0000)
arguments are not literals.
* doc/autoconf.texi (Input) <AC_INIT>: Arguments must be literals.
Specify the output variables, and macros defined.

ChangeLog
NEWS
doc/autoconf.texi
lib/autoconf/general.m4

index 9268ce313b448c2175133485e8f9646188b40a86..f0464a29ab281cc463dc4f2b4bd7816989078732 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-08-20  Akim Demaille  <akim@epita.fr>
+
+       * lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Warn if the
+       arguments are not literals.
+       * doc/autoconf.texi (Input) <AC_INIT>: Arguments must be literals.
+       Specify the output variables, and macros defined.
+
 2001-08-20  Akim Demaille  <akim@epita.fr>
 
        * doc/autoconf.texi (Examining Declarations) <AC_TRY_CPP>:
diff --git a/NEWS b/NEWS
index c2c37ba99ee01dd38b40fc365296a695ef628379..bfb9ff1145545d8cd626c43462dff8efdc8574cc 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,15 @@
 * Major changes in Autoconf 2.52c                       -*- outline -*-
 ** Licensing
-  The autoconf manual is now distributed under the terms of the GNU FDL.
+  The Autoconf manual is now distributed under the terms of the GNU FDL.
 ** Requirements
   Perl 5.005 is now required to run Autoconf.
+** Documentation
+- AC_INIT
+  Argument requirements, output variables, defined macros.
+- Autotest
+  First sketch of its documentation.
+- Double quoting macros
+  AC_TRY_CPP, AC_TRY_COMPILE, AC_TRY_LINK and AC_TRY_RUN.
 ** autom4te
   New executable, used by the Autoconf suite to cache and speed up
   some processing.
index 20fc4047ad6cde1fe59d535e5c3efd05df3e9165..ec30acd732ead94f6767d0fcb1bbcaf315b295d3 100644 (file)
@@ -1591,6 +1591,37 @@ 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.
+
+These three arguments must be @emph{static}, i.e., there must not be any
+shell computation, but they can be computed by M4.  The following macros
+and output variables are then defined:
+
+@table @asis
+@item @code{AC_PACKAGE_NAME}, @code{PACKAGE_NAME}
+@acindex PACKAGE_NAME
+@ovindex PACKAGE_NAME
+Exactly @var{package}.
+
+@item @code{AC_PACKAGE_TARNAME}, @code{PACKAGE_TARNAME}
+@acindex PACKAGE_TARNAME
+@ovindex PACKAGE_TARNAME
+@var{package} once @samp{GNU } strip, and lower cased.
+
+@item @code{AC_PACKAGE_VERSION}, @code{PACKAGE_VERSION}
+@acindex PACKAGE_VERSION
+@ovindex PACKAGE_VERSION
+Exactly @var{version}.
+
+@item @code{AC_PACKAGE_STRING}, @code{PACKAGE_STRING}
+@acindex PACKAGE_STRING
+@ovindex PACKAGE_STRING
+Exactly @samp{@var{package} @var{version}}.
+
+@item @code{AC_PACKAGE_BUGREPORT}, @code{PACKAGE_BUGREPORT}
+@acindex PACKAGE_BUGREPORT
+@ovindex PACKAGE_BUGREPORT
+Exactly @var{bug-report-address}.
+@end table
 @end defmac
 
 @defmac AC_CONFIG_SRCDIR (@var{unique-file-in-source-dir})
index cada686df48dc0d4895b1e95c1e3195508ee3cbb..bf0279c793387588568ad8f7d818b045fc35fc0d 100644 (file)
@@ -452,12 +452,13 @@ m4_popdef([AC_Prefix])dnl
 
 
 
-# _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION,
-#                  [BUG-REPORT],
-#                  [TAR-NAME = unGNU'd lower case PACKAGE-NAME])
-# --------------------------------------------------------------
+# _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT)
+# ---------------------------------------------------
 m4_define([_AC_INIT_PACKAGE],
-[m4_define([AC_PACKAGE_NAME],     [$1])
+[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])])
+AS_LITERAL_IF([$3], [],  [m4_warn([syntax], [AC_INIT: not a literal: $3])])
+m4_define([AC_PACKAGE_NAME],     [$1])
 m4_define([AC_PACKAGE_TARNAME],
           m4_tolower(m4_patsubst([[[$1]]], [GNU ])))
 m4_define([AC_PACKAGE_VERSION],   [$2])