Do so because future automake and aclocal versions (starting from 1.13)
drop support for 'configure.in' as the name of the Autoconf input file.
Without this patch, the Autoconf testsuite experiences some spurious
failures when run with the development version of aclocal and automake
installed early enough in $PATH.
* tests/torture.at: Rename 'configure.in' to 'configure.ac' throughout.
Remove an obsolete comment about backward-compatibility.
Helped-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* doc/autoconf.texi (Limitations of Usual Tools) <sed>: Mention
the issue.
* tests/torture.at (Substitute and define special characters):
Detect if sed cannot process 8-bit bytes in the C locale.
* THANKS: Update.
Reported by Rochan.
Signed-off-by: Eric Blake <eblake@redhat.com>
* tests/tools.at (autom4te preselections): Remove minor
redundancies in regular expressions used to grep the output
'automake --version' for test skipping.
* tests/torture.at (Configuring subdirectories)
(Unusual Automake input files): Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
On a fresh default install, MirBSD ships with an automake wrapper
script that has bad behavior:
$ automake --version; echo $?
Provide an AUTOMAKE_VERSION environment variable, please
0
* tests/tools.at (autom4te preselections): Skip, rather than fail,
if 'automake --version' succeeds without printing a version when
an environment variable is not set.
* tests/torture.at (Configuring subdirectories)
(Unusual Automake input files): Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
* tests/torture.at (AC_CONFIG_COMMANDS with temporary directory):
Use a relative path, rather than risking issues with /.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <eblake@redhat.com>
* lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP)
(_AC_OUTPUT_FILES_PREPARE, _AC_OUTPUT_FILE)
(_AC_OUTPUT_HEADERS_PREPARE, _AC_OUTPUT_HEADER): Use $ac_tmp
internally, while preserving $tmp for existing users.
* tests/torture.at (AC_CONFIG_COMMANDS with temporary directory):
New test, that $tmp is available but not essential.
Signed-off-by: Eric Blake <eblake@redhat.com>
In particular, see http://austingroupbugs.net/view.php?id=221
and http://austingroupbugs.net/view.php?id=255.
* doc/autoconf.texi (Shell Substitutions) <${var+value}>: New
subsection.
<${var=literal}>: Tweak wording. Add mention of an ambiguity
allowed by POSIX.
* tests/torture.at (Substitute and define special characters):
Make test more robust; here, the outer "" is in a here-doc, and
does not violate the quoting rules of thumb just documented.
Signed-off-by: Eric Blake <eblake@redhat.com>
* tests/torture.at (Non-literal AC_CONFIG_SUBDIRS): Create a
hand-written aclocal.m4 file, so the -Werror test doesn't fail
over aclocal warnings about errors in third-party macro files.
Simplify test accordingly, calling autoreconf throughout.
Report by Bob Friesenhahn.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/status.m4 (AC_CONFIG_SUBDIRS): Do not assume the
argument is a single word.
* tests/torture.at (Deep Package): Extend test to cover this.
(Non-literal AC_CONFIG_SUBDIRS): New test.
* doc/autoconf.texi (Subdirectories): Add example marker.
* NEWS: Update.
Report by Bruno Haible.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/torture.at (Torturing config.status)
(Substitute a 2000-byte string)
(Substitute and define special characters)
(Substitute a newline): Quote first argument in for list so
that it does not look like an assignment.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Be sure not
to remove references to a subdir of srcdir. Fix treatment of
multiple colon-separated VPATH entries.
* tests/torture.at (VPATH): New test.
Report by Keith Marshall.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Normalize nonzero status to 1 for writing to /dev/full, for HP-UX
11.31 cat which exits 2.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/base.at (AC_CACHE_CHECK): Extend test.
(AC_CACHE_LOAD): New test.
* tests/torture.at (Configuring subdirectories): Also test
--config-cache with AC_CONFIG_SUBDIRS.
* doc/autoconf.texi (Caching Results): Annotate code snippets
which are tested in the test suite.
(Cache Files): Documented cache variables may be used on the
configure command line to override individual entries in the
cache file.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/autoconf.texi (Autoconf Language, Generic Structures):
Do not capitalize the first word in error messages, do not end
them with a period.
* lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS, AC_MSG_FAILURE):
Likewise.
* lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Likewise.
* lib/autotest/general.m4 (AT_INIT, at_fn_group_prepare):
Likewise.
* m4/m4.m4 (AC_PROG_GNU_M4): Likewise.
* tests/base.at (AC_TRY_COMMAND): Likewise.
* tests/torture.at (datarootdir workaround): Adjust expected
message.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP): Ensure we
exit with status 1 rather than with that of 'false', for
reproducibility.
(AC_OUTPUT): Ensure to exit 1 in case of config.status failure.
* tests/torture.at (Missing templates): Also test code path
for $srcdir != '.'.
Report by Tim Rice.
* lib/autoconf/status.m4 (_AC_OUTPUT_LINK): Check $ac_source,
not $srcdir, for being relative or absolute.
* tests/torture.at (AC_CONFIG_LINKS): New test.
(AC_CONFIG_LINKS and identical files): Extend test, avoid some
forks.
Report, patch and testcase example by Peter Breitenlohner.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* bin/autoreconf.in (autoreconf_current_directory): Collapse
newlines in the autoconf trace output, similar to how automake
invokes autoconf, so that newlines do not matter in the argument
to AC_CONFIG_SUBDIRS.
* tests/torture.at (Deep Package): Expose this issue in the
test.
* THANKS: Update.
Report by Nathan Schulte.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): No need to
concatenate an empty second string, when we have exactly 148
characters to substitute.
* tests/torture.at (Substitute a 2000-byte string): Add test
exposure for runs of backslashes near the 148 character limit.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/torture.at (Substitute and define special characters):
Double the backslash before the double-quote in
AC_DEFINE_UNQUOTED, as documented for here-documents.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Implement
--config.
* doc/autoconf.texi (config.status Invocation): Document it.
* NEWS: Update.
* tests/torture.at (configure invocation): Test it.
Suggested several times, by several people, in the past.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/general.m4 (_AC_DEFINE_Q_PRINT): New macro.
(_AC_DEFINE_Q): Use it to avoid forks for all AC_DEFINE and most
AC_DEFINE_UNQUOTED.
* lib/autoconf/fortran.m4 (_AC_FC_WRAPPERS): Properly quote #.
* tests/torture.at (Substitute and define special characters):
(Define to a 2000-byte string): Enhance tests to cover
AC_DEFINE_UNQUOTED.
(@%:@define header templates): Enhance test to cover #.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Flatten
whitespace in $ac_config_files and $ac_config_headers.
* tests/torture.at (Parameterized AC_CONFIG_FILES): New test.
Report by Andreas Schwab and Per Øyvind Karlsen.
* THANKS: Update.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS_PREPARE): For
undefined preprocessor macros that are followed by a comment
in the header template, do not create nested comments in the
output.
* tests/torture.at (@%:@define header templates): Extend test.
* NEWS: Update.
Report by Karsten Hopp <karsten@redhat.com>.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/general.m4 (_AC_ARG_VAR_VALIDATE, AC_MSG_FAILURE):
Output $ac_pwd along with fatal failure.
* tests/torture.at (Deep Package): Extend test.
Reported numerous times against GCC, and probably other packages.
Return back to GPLv2+, until the text of the exceptions is
finalized, reverting the change from 2007-07-03 and the first
part of the change from 2007-07-20.
Also:
* COPYING: Revert to GPLv2.
* COPYINGv3: New file, since some auxiliary build tools, used for
building autoconf and not installed, are GPLv3.
* Makefile.am (EXTRA_DIST): Distribute COPYINGv3.
* NEWS: Remove mention of GPLv3.
* README: Clarify situation regarding GPLv3.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autoconf/general.m4 (_AC_ARG_VAR_VALIDATE): Output
precious variable differences less ambiguous with `ugly-quotes'.
If their settings differ only in whitespace, do not fail, but
reuse the old value.
* tests/torture.at (AT_CHECK_AC_ARG_VAR): Extend macro to allow
an optional status and expected-warning argument. Fix m4
quotation for initial value.
(AC_ARG_VAR): Also test for whitespace-only differences, and
that the old value is retained in this case.
* doc/autoconf.texi (Setting Output Variables): Document this.
* NEWS: Update.
Report and initial patch by Paolo Bonzini.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autotest/general.m4 (_AT_CHECK): Wrap commands in {;}.
* tests/torture.at (AT_CHECK_CONFIG_CREATION_NOWRITE): Test it.
Signed-off-by: Eric Blake <ebb9@byu.net>
* tests/torture.at (Substitute and define special characters):
MinGW awk cannot handle 0xFF, and on MinGW, the test does the
wrong thing for CR.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/torture.at (AT_CHECK_CONFIG_CREATION_NOWRITE): Skip
no-write portion if user has root-like privileges.
Signed-off-by: Eric Blake <ebb9@byu.net>
Before using /dev/full, check that it is a writable character
special device.
Report by Benoit Sigoure and Eric Blake.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Actually check generated file contents for the name of the
generated file, using AC_PROG_FGREP and $FGREP.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/atlocal.in (func_sanitize_file_name)
(func_sanitize_dir_name): New shell functions.
* tests/tools.at (autom4te and whitespace in file names)
(autotools and whitespace in file names): Use them.
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Cover more potentially problemtic file names. Use the new
functions.
Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr>
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
The test suite did not cover this bug because the code was not
quoting properly the arguments of `rm -f' (which "fails" silently)
as well as the arguments of `diff' (whose output was redirected to
/dev/null so we couldn't see its error message).
* lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Properly quote the
file names passed to `rm' and `diff'.
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Add a regression test.
Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr>
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/general.m4 (_AC_INIT_HELP): If, for recursive help
mode, we change to the source directory, also set $ac_pwd so we
do not go back to the build tree for the next config subdir.
* tests/torture.at (Deep Package): Extend test to contain two
config subdirs on the top level.