munge (multiple) white space and other oddities.
* tests/torture.at (AT_CHECK_AC_ARG_VAR): Make sure to M4-escape
single quotes in variable assignment.
(AC_ARG_VAR, configure invocation): Adjust tests to expose this
and similar failures by adding multiple spaces, tabs, and other
special characters.
Report and different test suggested by Francesco Romani
<fromani@gmail.com> and Andrew Church <achurch@achurch.org>.
single quotes, we only need to search for single quotes; this
both simplifies the search pattern, and makes us less
susceptible to `echo' variations for arguments not containing
single quotes.
(_AC_ARG_VAR_VALIDATE): Likewise.
traditional shells like the Solaris one that do not use the
first IFS character for assembling `$*'.
Prompted by a related report from autoconf_bug@nro.ca.
in URLs to improve DVI formatted output (requires texinfo 4.6).
(System Services, Systemology, Shellology): Likewise.
(Limitations of Usual Tools): Rewrite Mac OS X example for nicer
output.
(Integer Overflow, Null Pointers, Buffer Overruns):
(Floating Point Portability, Exiting Portably): New sections.
(Writing Test Programs): Fix some langauge. Recommend exiting
with status 1, not merely nonzero. Clarify exit declaration.
(Run Time): Move C exit status stuff to new Exiting Portably section.
(Systemology): Mention Posix and levenez. Update v7 reference.
(Portable Shell): Mention the Posix shell.
* doc/autoconf.texi (Programming in M4sh): Comment out the
documentation of AS_BASENAME, for now.
(Shell Substitutions): Do not use AS_DIRNAME in an example.
(Limitations of Builtins) <basename>: Do not refer to
AS_BASENAME.
* bin/autoconf.as (me): Don't use AS_BASENAME.
(dir): Remove the unused variable.
* lib/m4sugar/m4sh.m4 (_AS_DETECT_REQUIRED): Renamed from
AS_DETECT_REQUIRED. All uses changed.
(_AS_DETECT_SUGGESTED): Renamed from AS_DETECT_SUGGESTED.
All uses changed.
(_AS_DETECT_BETTER_SHELL): Put ;; at the end of a case.
(AS_BASENAME): Use "basename --" to protect against leading "-".
(_AS_BASENAME_EXPR): Renamed from AS_BASENAME_EXPR. All uses changed.
(_AS_BASENAME_SED): Renamed from AS_BASENAME_SED. All uses changed.
(_AS_BASENAME_PREPARE): Reject implementations that cannot handle "--".
(_AS_DIRNAME_PREPARE): Likewise.
(_AS_DIRNAME_EXPR): Renamed from AS_DIRNAME_EXPR. All uses changed.
(_AS_DIRNAME_SED): Renamed from AS_DIRNAME_SED. All uses changed.
(AS_DIRNAME): Use "dirname --".
of "run time" and "run-time" changed to "runtime", for consistency.
* lib/autoconf/fortran.m4: Likewise (in comment).
* lib/autoconf/functions.m4: Likewise.
* lib/autoconf/general.m4: Likewise.
* lib/autoconf/headers.m4: Likewise.
* doc/autoconf.texi (Programming in M4sh): Remove mention of
AS_VAR_SET_BASENAME, AS_VAR_SET_DIRNAME, and AS_BASENAME.
We have to keep AS_DIRNAME since it was part of a stable Autoconf,
but AS_BASENAME doesn't have to be supported.
and AS_BASENAME.
* lib/m4sugar/m4sh.m4 (AS_BASENAME, AS_DIRNAME): Bring these
back, albeit undocumented. Programs now have a grace period
to switch to AS_VAR_SET_DIRNAME and AS_VAR_SET_BASENAME.
AS_VAR_SET_DIRNAME and AS_VAR_SET_BASENAME.
* doc/autoconf.texi (Programming in M4sh): Document this. All uses
changed. The newer interfaces are more reliable, as they allow
implementations that handle trailing newline correctly. For now,
we're in a freeze, so I did not include the more-reliable
implementations, but I wanted to correct the interface before 2.60
goes out.
* lib/m4sugar/m4sh.m4 (_AS_DETECT_REQUIRED): Renamed from
AS_DETECT_REQUIRED. All uses changed.
(_AS_DETECT_SUGGESTED): Renamed from AS_DETECT_SUGGESTED.
All uses changed.
(_AS_DETECT_BETTER_SHELL): Put ;; at the end of a case.
(_AS_BASENAME): Renamed from AS_BASENAME. All uses changed.
Use "basename --" to protect against leading "-".
(_AS_BASENAME_EXPR): Renamed from AS_BASENAME_EXPR. All uses changed.
(_AS_BASENAME_SED): Renamed from AS_BASENAME_SED. All uses changed.
(_AS_BASENAME_PREPARE): Reject implementations that cannot handle "--".
(_AS_DIRNAME_PREPARE): Likewise.
(_AS_DIRNAME): Renamed from AS_DIRNAME. All uses changed.
(_AS_DIRNAME_EXPR): Renamed from AS_DIRNAME_EXPR. All uses changed.
(_AS_DIRNAME_SED): Renamed from AS_DIRNAME_SED. All uses changed.
Use "dirname --".
(AS_VAR_SET_BASENAME, AS_VAR_SET_DIRNAME): New macros.
* tests/m4sh.at (AS_VAR_SET_DIRNAME): Renamed from AS_DIRNAME.
Test the new API. Don't test internals, since they're probably
going to change anyway.
(AS_VAR_SET_BASENAME): Likewise, renamed from AS_BASENAME.
* bin/autoconf.as: Don't use AS_BASENAME or AS_DIRNAME. This
removes a bootstrapping problem with the changes described above.
The AS_DIRNAME part wasn't used, anyway, and the AS_BASENAME
part can be done portably without all the deep Autoconf magic.
newline from the `trap' code to finish `config.log'; the NetBSD
/bin/sh resets the exit status after an empty command, as
documented in doc/autoconf.texi.
some shells (e.g., Solaris 8 /bin/sh) implement it verrrry slowly.
Instead, just list the shells that we know work.
* tests/local.at (AT_CHECK_SHELL_SYNTAX): Remove 2nd arg. All uses
changed. Be more cautious about the _cv_ variable.
* tests/tools.at (Syntax of the shell scripts): Check the
_cv_ variable once, at first, to avoid an internal autoconf error
when sh -n does not work.
use ">&-" since we're only 99.999% sure that this is portable,
and since the MinGW bug is fixed in a different way.
* lib/autotest/general.m4 (AT_INIT): Likewise.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Handle --recheck
before opening config.log, to avoid hitting a bug on MinGW.
AS_MESSAGE_LOG_FD before reopening it onto the log file.
This works around a MinGW bug reported by Eric Paire.
Make sure that all writes to the log file append to it,
rather than possibly losing data.
* lib/autotest/general.m4 (AT_INIT): Likewise.