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>
+
+ * 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>:
* 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.
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})
-# _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])