]> git.ipfire.org Git - thirdparty/autoconf.git/commit
AC_INIT: better handling of unusual arguments (#110349)
authorZack Weinberg <zackw@panix.com>
Wed, 14 Oct 2020 22:03:21 +0000 (18:03 -0400)
committerZack Weinberg <zackw@panix.com>
Mon, 16 Nov 2020 17:06:16 +0000 (12:06 -0500)
commit3b8f293ec21062c55fe2835be6c8af7d58dfe0af
treefe6403911175cd40f060ec361e6fee8ed5395085
parentb7e32b4dc746ea867ed68f41d767178b34cc43a0
AC_INIT: better handling of unusual arguments (#110349)

Fix some subtle quotation bugs in _AC_INIT_PACKAGE that made it
impossible to put ‘,’ or an unbalanced close parenthesis in some of
the arguments to AC_INIT.  Document that arguments to AC_INIT
containing parentheses, square brackets, ‘,’ or ‘#’ may need to be
double-quoted.  Provide more detailed examples and exposition re
computing the arguments to AC_INIT when autoconf is run (e.g. with
git-version-gen).  Add a whole bunch more tests for unusual arguments
to AC_INIT, and a test that the backward-compatibility behavior of
AC_INIT with only one argument is still correct.

This may still break some of the existing configure scripts described
in the threads at
https://lists.gnu.org/r/autoconf/2020-10/msg00013.html and
https://lists.gnu.org/r/bug-autoconf/2020-10/msg00012.html
but, I hope, only in ways covered by the existing warning in NEWS
about pickier M4 quotation.

* lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Redo argument
  normalization and default value selection in a simpler, less
  error-prone fashion.
  (_AC_INIT_PACKAGE_N): New helper subroutine.
  (AC_INIT): Always call _AC_INIT_PACKAGE, but supply no arguments if
  we were called with only one argument.

* tests/base.at (AC_INIT (obsolete invocation)): New test.
  (AC_INIT with unusual version strings): Expand test.

* doc/autoconf.texi (AC_INIT): Revise.
doc/autoconf.texi
lib/autoconf/general.m4
tests/base.at