autoconf/doc
Zack Weinberg 6a0c023944
Trim whitespace from arguments of AC_INIT (#107986)
Specifically, all five arguments, if present, are passed through
m4_normalize before doing anything else with them.  For instance,
AC_INIT([  GNU  Hello  ], [1.0]) is now equivalent to
AC_INIT([GNU Hello], [1.0]).

As a consequence, newlines in the arguments to AC_INIT are now
converted to spaces and no longer trigger warnings.

Also, diagnose inappropriate contents of the fourth and fifth
arguments as well as the first three.  The fifth argument should be
“usable as-is in single- and double-quoted strings and quoted and
unquoted here-docs,” like the first three.  (This is the check
performed by _AC_INIT_LITERAL.)  The fourth argument (TARNAME) is used
to construct filenames, so apply an even more stringent test, namely
AS_LITERAL_WORD_IF.

Suggested by David A. Wheeler, who submitted a patch, but I didn’t
wind up using any of his code.

* lib/autoconf/general.m4 (_AC_INIT_LITERAL): Not necessary to check
  for newlines anymore.
  (_AC_INIT_PACKAGE): Pass all five arguments through m4_normalize
  before doing anything else with them.  New warning: apply
  _AC_INIT_LITERAL to fifth argument (URL).  New warning: complain
  if fourth argument (TARNAME) is not a literal word according to
  AS_LITERAL_WORD_IF.  Simplify a conditional by using m4_default.

* tests/base.at (AC_INIT with unusual version strings): Adjust to
  match above changes, add more subtests.
2020-08-18 08:24:00 -04:00
..
autoconf.texi Trim whitespace from arguments of AC_INIT (#107986) 2020-08-18 08:24:00 -04:00
fdl.texi make fetch 2020-06-29 17:08:26 -07:00
gendocs_template make fetch 2020-06-29 17:08:26 -07:00
gnu-oids.texi make fetch 2020-07-11 11:10:39 -04:00
install.texi maint: make update-copyright 2020-01-01 11:45:50 -08:00
local.mk maint: make update-copyright 2020-01-01 11:45:50 -08:00
make-stds.texi make fetch 2020-06-29 17:08:26 -07:00
standards.texi make fetch 2020-06-29 17:42:16 -07:00