Commit Graph

148 Commits

Author SHA1 Message Date
Stefano Lattarini
e56b990931 tests: use configure.ac, not configure.in, with aclocal/automake involved
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>
2012-07-21 19:45:48 +02:00
Paul Eggert
b69f4c2834 maint: update copyright year
All files changed to add 2012, via 'make update-copyright'.
2012-01-04 00:20:24 -08:00
Eric Blake
1864b1a3c4 maint: update copyright year
All files changed to add 2011, via 'make update-copyright'.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-01-04 16:34:06 -07:00
Eric Blake
d07f81f1ce tests: XFAIL in the face of a MacOS X bug
* 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>
2010-09-21 14:16:30 -06:00
Stefano Lattarini
9144856609 tests: simplify grepping of 'automake --version'.
* 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>
2010-09-13 13:29:10 -06:00
Eric Blake
d8e7417c13 tests: skip broken automake wrapper on MirBSD
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>
2010-09-13 10:08:58 -06:00
Eric Blake
35b14d5e35 tests: avoid trashing /
* 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>
2010-08-30 11:59:40 -06:00
Eric Blake
d97d8a7d04 config.status: minimize use of $tmp
* 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>
2010-08-30 10:43:31 -06:00
Eric Blake
b292f282e2 docs: mention another issue with variable expansion
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>
2010-08-26 11:27:49 -06:00
Eric Blake
cb27df430d docs: mention cost of globbing during variable expansion
* doc/autoconf.texi (Shell Substitutions) <${var=literal}>:
Recommend quoting substitutions that might trigger globbing.
(Limitations of Builtins) <:>: Likewise.
* bin/autoconf.as: Follow our own advice.
* lib/autoconf/functions.m4 (AC_FUNC_SELECT_ARGTYPES): Likewise.
* lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Likewise.
* lib/autoconf/status.m4 (AC_OUTPUT): Likewise.
* lib/autotest/general.m4 (_AT_FINISH): Likewise.
* lib/m4sugar/m4sh.m4 (AS_TMPDIR): Likewise.
* tests/autotest.at (parallel autotest and signal handling):
Likewise.
* tests/c.at (AC_OPENMP and C, AC_OPENMP and C++): Likewise.
* tests/foreign.at (shtool): Likewise.
* tests/fortran.at: Likewise.
* tests/tools.at (autom4te preselections): Likewise.
* tests/torture.at (VPATH): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-08-25 17:22:18 -06:00
Ralf Wildenhues
c40eb4bc72 Fix testsuite failure due to bugs in third-party aclocal macros.
* 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>
2010-08-05 06:21:09 +02:00
Eric Blake
82f7cdadbb Another empty argument through expr workaround.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Detect empty
arguments.  Reject empty file argument.
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Check for missing argument.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-07-20 09:03:11 -06:00
Ralf Wildenhues
49a6f8a8b5 Fix regression of AC_CONFIG_SUBDIRS with multiple arguments.
* 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>
2010-07-08 06:43:33 +02:00
Ralf Wildenhues
b33f7cab06 Fix testsuite to not trigger Solaris sh for bug.
* 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>
2010-07-04 20:22:29 +02:00
Ralf Wildenhues
7eccc094e8 Improve VPATH handling in config.status for non-Automake projects.
* 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>
2010-06-23 22:21:50 +02:00
Ralf Wildenhues
ae8dbe8995 Accept any nonzero exit status upon config.status write failure.
* 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>
2010-06-23 19:17:24 +02:00
Ralf Wildenhues
a535b586ad Testsuite coverage for AC_CACHE_VAL and caching semantics.
* 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>
2010-06-08 06:49:55 +02:00
Ralf Wildenhues
5dc7189c00 Error and warning message formatting cleanups.
* 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>
2010-04-26 20:34:14 +02:00
Ralf Wildenhues
8638bebc97 Fix placing of ellipses in English text.
* lib/autoconf/general.m4 (_AC_INIT_HELP): Be sure to add a
space before `...' in natural language text.
* lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL_BODY):
Likewise.
* lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF): Likewise.
* lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Likewise.
* tests/suite.at: Likewise.
* tests/torture.at (@%:@define header templates): Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-04-26 20:33:51 +02:00
Ralf Wildenhues
e8069104ae Formatting cleanups in macro comments.
For a list of candidate unaligned underlines, use this script:

for f in `git ls-files`; do
  awk '{ len[NR] = length($0) }
       /----*/ && len[NR-1] != 0 {
         if (len[NR-1] != len[NR])
           print FILENAME ":" NR ":" $0
       }' $f
done

* lib/autoconf/c.m4, lib/autoconf/erlang.m4,
lib/autoconf/fortran.m4, lib/autoconf/functions.m4,
lib/autoconf/general.m4, lib/autoconf/lang.m4,
lib/autoconf/programs.m4, lib/autoconf/specific.m4,
lib/autoconf/status.m4, lib/autoconf/types.m4,
lib/autotest/general.m4, lib/autotest/specific.m4,
lib/m4sugar/m4sh.m4, lib/m4sugar/m4sugar.m4,
tests/autotest.at, tests/local.at, tests/m4sh.at,
tests/semantics.at, tests/tools.at, tests/torture.at: Fix macro
comment format.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-03-12 06:58:46 +01:00
Ralf Wildenhues
57b9bc399f config.status: consistent exit status with nonexistent config file input.
* 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.
2010-01-19 07:28:48 +01:00
Peter Breitenlohner
13e3570bc9 Fix AC_CONFIG_LINKS to generated files when srcdir is absolute.
* 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>
2010-01-06 20:14:53 +01:00
Eric Blake
b95a1aea40 Update copyright year.
All files changed to add 2010, via 'make update-copyright'.

Signed-off-by: Eric Blake <ebb9@byu.net>
2010-01-05 20:59:55 -07:00
Ralf Wildenhues
8733bad075 Fix AC_CONFIG_SUBDIRS tracing in autoreconf.
* 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>
2009-11-14 14:18:48 +01:00
Ralf Wildenhues
096220df5d Micro-optimization of config.status substitution.
* 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>
2009-11-01 01:04:31 +01:00
Ralf Wildenhues
c78135a4de Fix testsuite failure on IRIX and AIX.
* 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>
2009-11-01 01:02:18 +01:00
Ralf Wildenhues
5d38833a3d testsuite: pass $configure_options to configure invocations.
* tests/local.at (AT_CHECK_CONFIGURE): Add $configure_options
to configure command line.
* tests/autotest.at, tests/base.at, tests/c.at, tests/torture.at:
Likewise for each configure invocation.
* README-hacking: Document configure_options.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-14 19:30:22 +02:00
Ralf Wildenhues
bb09823ea7 New config.status option --config.
* 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>
2009-09-11 06:53:42 +02:00
Ralf Wildenhues
675a0c95df Update License to GPLv3+ including new Autoconf Exception.
* NEWS, README: Update licensing information.
* COPYING.EXCEPTION: New file.
* Makefile.am (EXTRA_DIST): Distribute it.
* cfg.mk (autom4te-update): Remove copyright change warning.
* lib/autoconf/autoconf.m4, lib/autoconf/autoheader.m4,
lib/autoconf/autoscan.m4, lib/autoconf/autotest.m4,
lib/autoconf/autoupdate.m4, lib/autoconf/c.m4,
lib/autoconf/erlang.m4, lib/autoconf/fortran.m4,
lib/autoconf/functions.m4, lib/autoconf/general.m4,
lib/autoconf/headers.m4, lib/autoconf/lang.m4,
lib/autoconf/libs.m4, lib/autoconf/oldnames.m4,
lib/autoconf/programs.m4, lib/autoconf/specific.m4,
lib/autoconf/status.m4, lib/autoconf/types.m4,
lib/autotest/autotest.m4, lib/autotest/general.m4,
lib/autotest/specific.m4, lib/m4sugar/foreach.m4,
lib/m4sugar/m4sh.m4, lib/m4sugar/m4sugar.m4: Update exception
statement, bump to GPLv3.
* bin/autoconf.as, bin/autoheader.in, bin/autom4te.in,
bin/autoreconf.in, bin/autoscan.in, bin/autoupdate.in,
bin/ifnames.in: Bump to GPLv3+, adjust --version output
to reflect the GPLv3+ and the Autoconf Exception.
* lib/Autom4te/C4che.pm, lib/Autom4te/ChannelDefs.pm,
lib/Autom4te/General.pm, lib/Autom4te/Request.pm,
lib/autom4te.in, lib/autoscan/autoscan.pre,
lib/emacs/autoconf-mode.el, lib/emacs/autotest-mode.el,
lib/freeze.mk, tests/atlocal.in, tests/autoscan.at,
tests/autotest.at, tests/base.at, tests/c.at,
tests/compile.at, tests/erlang.at, tests/foreign.at,
tests/fortran.at, tests/local.at, tests/m4sh.at,
tests/m4sugar.at, tests/mktests.sh, tests/semantics.at,
tests/statesave.m4, tests/suite.at, tests/tools.at,
tests/torture.at, tests/wrapper.as: Bump to GPLv3+.
2009-09-09 19:53:31 +02:00
Eric Blake
bcb6b3180d Rename AT_CHECK_NOESCAPE to AT_CHECK_UNQUOTED.
* lib/autotest/general.m4 (AT_CHECK_NOESCAPE): Deprecate, in favor
of new spelling...
(AT_CHECK_UNQUOTED): ...for consistency with AC_DEFINE_UNQUOTED.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document the
rename.
* NEWS: Likewise.
* tests/autotest.at (Binary output, Cleanup): Adjust tests.
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Likewise.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-24 13:15:22 -06:00
Eric Blake
d7cc80491d Use URLs in --help output, part 2: configure.
* lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Bump copyright
date.
(_AC_INIT_PACKAGE): Support optional URL parameter, mapped to
AC_PACKAGE_URL.
(_AC_INIT_DEFAULTS, _AC_INIT_PREPARE): Substitute it.
(_AC_INIT_HELP): Use it in './configure --help' output.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise, for
'./config.status --help'.  Bump copyright date.
* doc/autoconf.texi (Initializing configure) <AC_INIT>: Document
new parameter.
* NEWS: Likewise.
* tests/tools.at (autoheader): Adjust test.
* tests/torture.at (@%:@define header templates)
(Torturing config.status): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-27 16:57:52 -07:00
Eric Blake
043d1102b6 Fix testsuite failure on Solaris.
* tests/torture.at (AT_CHECK_CONFIG_CREATION_NOWRITE): Normalize
failure status to 1.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-22 08:40:39 -07:00
Eric Blake
2d63737afb Reduce forks in AC_DEFINE.
* 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>
2008-11-20 16:18:28 -07:00
Eric Blake
ee0d4bd36b Adjust expected output.
* tests/torture.at (Missing templates): Reflect added quoting.
Detected by Bob Proulx's buildbot.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-04 21:22:16 -07:00
Eric Blake
cfa144a955 Use AS_VAR_ARITH.
* lib/autotest/general.m4 (at_func_arith): Delete; replace all
clients with AS_VAR_ARITH instead.
* lib/autoconf/general.m4 (_AC_COMPUTE_INT_COMPILE): Use new
macro.
* lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Likewise.
* tests/torture.at (Torturing config.status): Likewise.
* tests/tools.at (autom4te --force): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-27 16:11:59 -06:00
Peter Eisentraut
e25b72286f Format warning and error messages to match GCS.
* lib/autoconf/general.m4 (_AC_INIT_DIRCHECK)
(_AC_INIT_PARSE_ARGS, _AC_CACHE_DUMP): Start warning and error
messages with a lowercase letter, end them without punctuation.
* lib/autoconf/lang.m4 (AC_NO_EXECUTABLES): Likewise.
* lib/autoconf/libs.m4 (AC_PATH_X): Likewise.
* lib/autoconf/status.m4 (AC_OUTPUT, _AC_OUTPUT_MAIN_LOOP):
Likewise.
* tests/fortran.at (GNU Fortran): Likewise.
* tests/torture.at (Deep Package): Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-08-22 08:51:53 +02:00
Ralf Wildenhues
22efb81e0a Fix AC_CONFIG_FILES([$var]) 2.62 regression.
* 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>
2008-08-04 08:02:53 +02:00
Ralf Wildenhues
c87512b5ae Fix '#undef variable /* comment */' transform in config headers.
* 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>
2008-06-17 08:42:14 +02:00
Ralf Wildenhues
4bd87562dc Let AC_MSG_FAILURE report pwd.
* 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.
2008-05-12 07:57:20 -06:00
Eric Blake
a91e2a71d2 Use GPLv2+ plus exception as license for release.
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>
2008-04-05 17:04:48 -06:00
Ralf Wildenhues
4503a1da11 Warn, not fail on whitespace-only precious variable differences.
* 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>
2008-03-26 06:55:22 +01:00
Eric Blake
f2ebc5bc44 Make AT_CHECK act like a simple command.
* 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>
2008-03-04 16:33:31 -07:00
Ralf Wildenhues
ac17e815dc On MinGW, substitution of CR and 0xFF fails.
* 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>
2008-03-04 23:52:07 +01:00
Eric Blake
9eb6a5986a Ignore tests that require read-only directories under root.
* 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>
2008-03-04 15:05:45 -07:00
Ralf Wildenhues
8b318e8487 * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
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>
2008-03-02 14:14:44 +01:00
Ralf Wildenhues
ad236d83f7 Actually test that @configure_input@ is expanded correctly.
* 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>
2008-03-02 13:13:46 +01:00
Benoit Sigoure
7559c93d38 Be nice with file systems that don't handle unusual characters.
* 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>
2008-03-02 13:03:10 +01:00
Benoit Sigoure
2abed75dde Properly handle funny file names for headers in config.status.
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>
2008-03-02 13:00:23 +01:00
Ralf Wildenhues
0fd647c636 Fix --help=recursive with multiple AC_CONFIG_SUBDIRS.
* 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.
2008-01-22 21:48:51 +01:00
Ralf Wildenhues
8fab8ab6d2 * tests/torture.at (srcdir): Fix quoting. 2007-12-08 12:00:02 +01:00