summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2020-08-06 14:51:32 -0400
committerZack Weinberg <zackw@panix.com>2020-08-18 08:24:00 -0400
commit6a0c0239449a98181c5dd7e505cddbc0840471a4 (patch)
treec784675154478f6432d0c89bf11e4ea315ed0ea6 /NEWS
parent508225174b29b27a5d3a4b9ba9fdddd9a4627dda (diff)
downloadautoconf-6a0c0239449a98181c5dd7e505cddbc0840471a4.tar.gz
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.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS11
1 files changed, 11 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 000570e0..e0cdd069 100644
--- a/NEWS
+++ b/NEWS
@@ -194,6 +194,17 @@ GNU Autoconf NEWS - User visible changes.
- AC_FC_LINE_LENGTH now documents the maximum portable length of
"unlimited" Fortran source code lines to be 250 columns, not 254.
+- AC_INIT now trims extra white space from its arguments. For instance,
+
+ AC_INIT([ GNU Hello ], [1.0])
+
+ will set PACKAGE_NAME to “GNU Hello”.
+
+- AC_INIT will now issue warnings (in the “syntax” category) for a
+ non-literal URL argument, and for a TARNAME argument which is either
+ non-literal or contains characters that should not be used in file
+ names (e.g. ‘*’).
+
* Noteworthy changes in release 2.69 (2012-04-24) [stable]
** Autoconf now requires perl 5.6 or better (but generated configure