Commit Graph

1168 Commits

Author SHA1 Message Date
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
Ralf Wildenhues
79fc9707ae Avoid long lines in testsuite script.
* lib/autotest/general.m4 (AT_INIT): Remove definition of
AT_groups_all.  Initialize at_groups from at_help_all, with
newlines instead of spaces separating test groups numbers.
Adjust all code to newlines.
* NEWS: Update.
* tests/autotest.at (Huge testsuite): New test.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-27 20:03:58 +02:00
Ralf Wildenhues
e9cceec734 Try to update config.cache atomically; respect symlinks.
* lib/autoconf/general.m4 (AC_CACHE_SAVE): Use `mv -f' to update
the cache file if it is a regular file and not a symlink.  Move
first to temporary name in the target directory if not in the
current directory for atomicity across mount points.
* tests/base.at (AC_CACHE_CHECK): Try symlinked cache file.
* doc/autoconf.texi (Cache Files): Leftover temporary cache
files may be deleted by the user.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-27 19:49:28 +02:00
Eric Blake
d1bea5123b m4sh: assume ${a:-b} support
* tests/m4sh.at (Null variable substitution): New test.
* doc/autoconf.texi (Shell Substitutions) <${var:-value}>: Mention
that m4sh guarantees support.
(Limitations of Usual Tools) <mktemp>: Use it.
* lib/m4sugar/m4sh.m4 (AS_LINENO_POP, AS_VAR_IF, AS_TMPDIR):
Exploit use of colon for smaller files.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-08-27 10:05:10 -06:00
Eric Blake
1e604ecfb2 autoconf: warn if AC_*_IFELSE lacks complete program
* lib/autoconf/lang.m4 (AC_LANG_DEFINES_PROVIDED): New macro.
(AC_LANG_SOURCE): Call it.
(AC_LANG_CONFTEST): Add warning if new macro is not called.
* lib/autoconf/c.m4 (_AC_LANG_OPENMP): Add missing AC_LANG_SOURCE.
* lib/autoconf/fortran.m4 (AC_FC_FREEFORM, AC_FC_FIXEDFORM)
(AC_FC_LINE_LENGTH, __AC_FC_NAME_MANGLING): Intentionally bypass
AC_LANG_SOURCE.
* lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL): Likewise.
* tests/compile.at (AC_COMPILE_IFELSE): New test.
* doc/autoconf.texi (Generating Sources) <AC_LANG_CONFTEST>:
Document new warning.
<AC_LANG_DEFINES_PROVIDED>: Document new macro.
<AC_LANG_SOURCE>: Document use of new macro.
* NEWS: Document the improvement.
Suggested by Bruno Haible.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-08-26 15:24:13 -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
65d740da99 m4sh: revert incorrect mix of "${a='b'}"
Regression introduced in cb27df430d.

* bin/autoconf.as: Revert leak of literal '' into assignment.
* tests/tools.at (autom4te preselections): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-08-25 21:27:22 -06:00
Eric Blake
bbf53dd459 tests: improve some shell assumption testing
* tests/m4sh.at (Functions Support, Functions and return Support)
(Negated classes in globbing): Update comments.
(AS@&t@_VAR basics): Test comparison to empty string.
2010-08-25 17:22:21 -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
9b7d0212e7 tests: fix AC_CACHE_CHECK to skip with bad shells.
* tests/base.at (AC_CACHE_CHECK): Skip test with malformed
config.site file if the shell does not report syntax errors
from a sourced file.  Fixes test failure on AIX and FreeBSD.
Report from Rainer Tammer.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-24 23:12:25 +02:00
Ralf Wildenhues
00d80808b5 Fix Autotest --errexit to exit after XPASSing tests.
* lib/autotest/general.m4 (AT_INIT) <at_fn_group_postprocess>:
Exit after an unexpected passing test if $at_errexit.
* tests/autotest.at (errexit): Also try tests that xpass, skip,
xfail, or fail hard.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-16 21:14:20 +02:00
Eric Blake
64000cf1f8 AC_INIT: allow bugreport to contain '?'
* lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Relax check.
* tests/base.at (AC_INIT with unusual version strings): Enhance
test.
* doc/autoconf.texi (Initializing configure): Document this.
* NEWS: Likewise.
* THANKS: Update.
Reported by Yavor Doganov and others.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-08-14 13:24:53 -06:00
Peter Rosin
8fb83cd25b autotest: keep testsuite files on unexpected pass
* lib/autotest/general.m4 (AT_INIT) <at_fn_group_postprocess>:
Don't cleanup the group directory when a test unexpectedly passes.
* tests/autotest.at (Cleanup): Check that an unexpected pass leaves
the test group directory intact.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-08-14 12:01:12 -06:00
Ralf Wildenhues
e8ad0ea4c1 Skip AC_FC_SRCEXT([f90]) tests with a Fortran 77 compiler in $FC.
* tests/fortran.at (AC_FC_FREEFORM with AC_FC_SRCEXT)
(AC_FC_FIXEDFORM with AC_FC_SRCEXT): Skip if the compiler cannot
handle files with .f90 extension.
Report by Luke Dalessandro.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-10 22:46:40 +02:00
Ralf Wildenhues
87010b725a Fix testsuite failures with typical m4-x.y.z program suffix.
* tests/local.at (AT_CHECK_M4): Normalize hyphens and digits
after the `m4' program name.
* THANKS: Update.
Report by Luke Dalessandro.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-10 22:46:10 +02: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
Ralf Wildenhues
a11cc13e77 Fix AC_LANG_SOURCE and AC_LANG_PROGRAM tests.
* tests/compile.at (AC_LANG_SOURCE example)
(AC_LANG_PROGRAM example): Fix broken sed script for
extracting the interesting part of the conftest.c file.
Fixes test failure on Haiku.
* THANKS: Update.
Report by Scott McCreary.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-04 20:51:56 +02:00
Ralf Wildenhues
114dc91c10 Fix typo in Autotest color test, for dash testsuite failure.
* tests/autotest.at (colored test results): Use exit not
Exit.  Fixes test failure with dash 0.5.4.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-03 20:06:46 +02:00
Ralf Wildenhues
add84381e1 Add testsuite exposure for last-minute fix in 2.67.
* tests/autotest.at (parallel args but non-working mkfifo):
New test, to expose the failure v2.66-23-g991183c avoided.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-02 22:17:56 +02:00
Ralf Wildenhues
a5e9aa68b7 Ensure unnamed test group categories are separated from previous.
* doc/autoconf.texi (Writing Testsuites) <AT_BANNER>: Update
description.
* lib/autotest/general.m4 (AT_INIT) <at_fn_banner>: Set banner
to single space, not empty line, once printed.  For empty
banners, print a single empty line to separate them from a
previous test group category.
* tests/autotest.at (Banners): Insert another test group; adjust
tests accordingly.  Extend test to cover semantic change.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-02 22:17:50 +02:00
Eric Blake
9571a4b323 Avoid spurious testsuite failures.
* doc/autoconf.texi (Generating Sources): Don't mix gcc '-E' and
'-o -', since the former already implies stdout, while the latter
creates -.exe on cygwin.
* tests/compile.at (AC_LANG_SOURCE example)
(AC_LANG_PROGRAM example): Likewise.  Also prevent any config.site
interference.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-07-21 16:13:05 -06: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
Eric Blake
a759826d21 Also reject ' and newline from AC_INIT strings.
* lib/autoconf/general.m4 (_AC_INIT_LITERAL): Reject a couple more
problematic characters.
* tests/base.at (AC_INIT with unusual version strings): Enhance
test.
* doc/autoconf.texi (Initializing configure) <AC_INIT>: Further
clarifications, and clean up wording about use of m4_esyscmd.
* NEWS: Update previous news entry.
Suggested by Paolo Bonzini.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-07-20 08:01:15 -06:00
Eric Blake
77469e1b54 Fix up AC_INIT vs. " issues, and document it.
* doc/autoconf.texi (Initializing configure): Improve
documentation on argument restrictions.
* NEWS: Tweak information.
* lib/autoconf/general.m4 (_AC_INIT_GENERAL): New macro, that also
rejects literal ".
(_AC_INIT_PACKAGE): Use it to plug hole in last patch.
* tests/base.at (AC_INIT with unusual version strings): Enhance
test.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-07-19 17:32:04 -06:00
Ralf Wildenhues
f4f4a26c01 Relax AC_INIT requirements for PACKAGE and VERSION strings again.
* lib/m4sugar/m4sh.m4 (AS_LITERAL_HEREDOC_IF): New macro.
(_AS_LITERAL_HEREDOC_IF, _AS_LITERAL_HEREDOC_IF_YES)
(_AS_LITERAL_HEREDOC_IF_NO): New helper macros.
* lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Use
AS_LITERAL_HEREDOC_IF for PACKAGE and VERSION strings.
* tests/base.at (AC_INIT with unusual version strings): New test.
* tests/m4sh.at (AS@&t@_LITERAL_IF): Extend test.
* NEWS: Update.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-07-19 17:32:04 -06:00
Ralf Wildenhues
2fd37d5d0a Allow inspecting AC_PREPROC_IFELSE output in true branch.
* lib/autoconf/general.m4 (_AC_PREPROC_IFELSE_BODY): Redirect
preprocessor output to conftest.i rather than /dev/null.
(_AC_PREPROC_IFELSE): Remove conftest.i in the postprocessing.
* tests/compile.at (Order of user actions and cleanup): Extend
test in the ACTION-IF-TRUE branch.
* doc/autoconf.texi (Running the Preprocessor): Document new
feature.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-07-19 20:03:27 +02:00
Ralf Wildenhues
06089e7f3c New Fortran macro AC_FC_LINE_LENGTH.
* lib/autoconf/fortran.m4 (AC_FC_LINE_LENGTH): New macro.
* doc/autoconf.texi (Fortran Compiler): Document it.
* tests/fortran.at (AC_FC_LINE_LENGTH): New test.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-07-10 18:40:55 +02:00
Eric Blake
dfda440255 Fix regression of AC_CHECK_SIZEOF on pointer types.
* lib/autoconf/types.m4 (AC_CHECK_SIZEOF): Translate `*' to `p'
when checking literal-ness of the type, for pointer types.
* lib/m4sugar/m4sh.m4 (_AS_TR_SH): Also consider `*' as literal.
(_AS_TR_CPP): Likewise.
* tests/semantics.at (AC_CHECK_ALIGNOF struct): When checking
for numeric answer, be sure to not allow variable references.
(AC_CHECK_SIZEOF struct): Likewise.  Also, test the
`AC_CHECK_SIZEOF([int *])' example from the manual.
* doc/autoconf.texi (Generic Compiler Characteristics): Add
example marker.
* NEWS: Update.
Reports by Nishio Futoshi and Roberto Bagnara.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-07-10 08:16:35 +02: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
Stefano Lattarini
48807a3394 Fix minor copy&paste leftover in m4sh tests.
* tests/m4sh.at (AS@&t@_TR_SH and AS@&t@_TR_CPP): Remove
useless variables assignements ($var, $vAr, $VAR).

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-07-04 21:16:05 +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
Eric Blake
ab90874a9a Make AS_TR_SH and AS_TR_CPP similar.
* lib/m4sugar/m4sh.m4 (_AS_TR_CPP_LITERAL): Avoid underquoting.
(_AS_TR_CPP_INDIR): Handle all polymorphic variables.
* tests/m4sh.at (AS@&t@_TR_SH and AS@&t@_TR_CPP): New test.
* NEWS: Document the fix.
Reported by Bruno Haible.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-07-02 15:50:39 -06:00
Ralf Wildenhues
0da057e20a New macro AC_FC_FIXEDFORM, improved AC_FC_FREEFORM, coverage.
* lib/autoconf/fortran.m4 (_AC_FC_DIALECT_YEAR): Fix typo in
comment.
(AC_FC_FREEFORM): Update list of known options for Sun, HP,
Lahey/Fujitsu Fortran compilers.  Use M4 quoting consistently.
(AC_FC_FIXEDFORM): New macro.
* tests/fortran.at (AC_FC_DUMMY_MAIN usage, AC_FC_MAIN usage):
Use AC_FC_FIXEDFORM, to avoid testsuite failure with FC=xlf95.
(AC_FC_FREEFORM with AC_FC_SRCEXT, AC_FC_FIXEDFORM)
(AC_FC_FIXEDFORM with AC_FC_SRCEXT): New tests.
* tests/mktests.sh: No need to exclude AC_FC_FREEFORM, it uses
AC_LANG_PUSH/AC_LANG_POP.
* doc/autoconf.texi (Fortran Compiler): Document it.
* NEWS: Update.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-07-02 13:45:04 -06:00
Eric Blake
ac6824d442 Add tests for AS_BOX.
* tests/m4sugar.at (m4@&t@_text_box): New test.
* tests/m4sh.at (AS@&t@_BOX): Likewise.
* lib/m4sugar/m4sugar.m4 (m4_text_box): Support comma.
* doc/autoconf.texi (Text processing Macros) <m4_text_box>:
Document further limitations.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-07-02 12:10:36 -06:00
Eric Blake
e960d7be02 Add optional argument to AS_LITERAL_IF.
* lib/m4sugar/m4sh.m4 (_AS_LITERAL_IF): Rewrite to generate macro
name, without using m4_cond.
(_AS_LITERAL_IF_, _AS_LITERAL_IF_YES, _AS_LITERAL_IF_NO): New
helpers.
(AS_LITERAL_IF, AS_LITERAL_WORD_IF, _AS_TR_SH, _AS_TR_CPP)
(_AS_VAR_PUSHDEF): Adjust callers.
* lib/autoconf/types.m4 (AC_CHECK_ALIGNOF): Relax restrictions on
invalid bytes, since this allows inline struct layouts.
(_AC_CHECK_ALIGNOF): New helper macro.
* tests/m4sh.at (AS@&t@_LITERAL_IF): Update test.
* doc/autoconf.texi (Polymorphic Variables) <AS_LITERAL_IF>:
Update documentation.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-07-02 12:10:09 -06:00
Eric Blake
07263c965a Add AS_LITERAL_WORD_IF.
* lib/m4sugar/m4sh.m4 (_AS_LITERAL_IF): Also reject shell quoting
characters as non-literal, and provide way to reject space.
(AS_LITERAL_WORD_IF): New macro.
* doc/autoconf.texi (Polymorphic Variables) <AS_LITERAL_IF>:
Document new macro.  Fix example to match reality.
* NEWS: Document change and new macro.
* tests/m4sh.at (AS@&t@_LITERAL_IF): Update test.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-07-02 11:35:34 -06: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
c14e7a1c8a Coverage for Fortran compiler macros.
* tests/fortran.at (AC_OPENMP and Fortran 77)
(AC_OPENMP and Fortran): Simplify, using AT_CHECK_CONFIGURE.
(AC_F77_DUMMY_MAIN usage, AC_FC_DUMMY_MAIN usage)
(AC_F77_MAIN usage, AC_FC_MAIN usage, AC_F77_FUNC usage)
(AC_FC_FUNC usage, AC_FC_SRCEXT usage, AC_FC_FREEFORM): New
tests.
* doc/autoconf.texi (Fortran Compiler): Use GNU coding style
on C code snippets.  Add markers for tested examples.
Suggest AC_FC_FREEFORM for source file extensions which the
compiler might not natively support but which are accepted
with help from AC_FC_SRCEXT.  Suggest AC_CONFIG_HEADERS for
setups using one of the AC_*MAIN macros.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-23 19:18:14 +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
0390d6724c Fix testsuite failure with Tru64 preprocessor.
* tests/compile.at (Order of user actions and cleanup): Add
incomplete comment to provoke failure with Tru64/OSF 5.1 cc
preprocessor.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-23 19:16:58 +02:00
Ralf Wildenhues
eace0e6fec Document, test, and fix AT_ARG_OPTION, AT_ARG_OPTION_ARG.
* lib/autotest/general.m4 (_AT_ARG_OPTION): Fix translation of
hyphens to underscores when turning option names to variables.
Avoid macro name concatenation garbage with trailing `dnl'.
(AT_ARG_OPTION, AT_ARG_OPTION_ARG): Overhaul macro description.
The OPTIONS are space-separated, not comma-separated.  The
negative form of AT_ARG_OPTION is prefixed with `--no-'.
* tests/autotest.at (AT@&t@_ARG_OPTION, AT@&t@_ARG_OPTION_ARG):
New tests.
* NEWS: Update.
* doc/autoconf.texi (Writing Testsuites): Document AT_ARG_OPTION
and AT_ARG_OPTION_ARG.
(testsuite Invocation): Call the thingies passed to the
testsuite options, not arguments.  Note that the testsuite
author may add further package-specific options.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-17 22:44:02 +02:00
Ralf Wildenhues
b426665e77 Autotest: enable colored test results.
* lib/autotest/general.m4 (HELP_TUNING_BEGIN): New diversion.
(HELP_TUNING, HELP_OTHER, HELP_END): Bump diversion numbers.
(AT_INIT): Accept
--color and --color=never|auto|always.  If desired, colorize
test results and testsuite summary on standard output.
[HELP_TUNING]: Divert content instead to ...
[HELP_TUNING_BEGIN]: ... this diversion, m4_wrapped until the
end, when we know whether AT_COLOR_TESTS has been specified.
(AT_COLOR_TESTS): New macro, set the default for color to auto.
* doc/autoconf.texi (Writing Testsuites): Document it.
(testsuite Invocation): Document --color* options.
* tests/local.at: Call AT_COLOR_TESTS for Autoconf's testsuite.
* tests/autotest.at (color test results): New test, mirroring
color.test from Automake.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-17 22:36:01 +02:00
Eric Blake
5941816dd9 Make CONFIG_SITE handling more robust.
* lib/autoconf/general.m4 (AC_SITE_LOAD): Avoid leading - and path
search, and check for failure to load.
* tests/base.at (AC_CACHE_CHECK): Enhance test.
* doc/autoconf.texi (Site Defaults): Mention that CONFIG_SITE
works best as an absolute path.
* NEWS: Document the semantic change.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-06-14 14:40:49 -06:00
Bruno Haible
ee0ecf0c37 Allow plus signs in AC_ARG_ENABLE and AC_ARG_WITH.
* doc/autoconf.texi (External Software): Mention that AC_ARG_WITH
accepts packages with a + sign in it.
(Package Options): Likewise for AC_ARG_ENABLE.
* lib/autoconf/general.m4 (_AC_ENABLE_IF): Also replace '+' with '_'.
* tests/base.at (AC_ARG_ENABLE and AC_ARG_WITH): New test.
* NEWS: Update.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-06-14 13:56:46 -06:00
Ralf Wildenhues
41bd1b25dc New Autotest testsuite option --recheck.
* lib/autotest/general.m4 (AT_INIT): New variable $at_recheck.
Escape hyphen in $at_dir early.  Accept command line switch
--recheck.  Set $at_suite_log early, based on --directory
switch; with --recheck, include the list of FAILed and XPASSed
tests from old testsuite.log file in $at_groups.  Document
--recheck in --help output.
* tests/autotest.at (recheck): New test.
* doc/autoconf.texi (testsuite Invocation): Document --recheck.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-14 20:37:38 +02:00
Eric Blake
525a2de254 Run libtool test with modern libtool.
* tests/foreign.at (Libtool): Request that libtoolize install
auxiliary files.  Assume libtool 2.x is modern.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-06-08 04:15:20 -06:00
Ralf Wildenhues
c106e61216 Coverage and doc fixes for AC_LANG_SOURCE and AC_LANG_PROGRAM.
* tests/compile.at (AC_LANG_SOURCE, AC_LANG_SOURCE(C++))
(AC_LANG_SOURCE example, AC_LANG_PROGRAM example): New tests.
* doc/autoconf.texi (Generating Sources): Add markers for tested
examples; update quoting, and update AC_INIT usage to also set
optional URL arguments.  Mention that the examples require gcc.
Prompted by report from Brian J. Murrell.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-08 06:56:43 +02:00
Ralf Wildenhues
cddfaa966c Make AS_SET_CATFILE polymorphic, and add testsuite coverage.
* lib/m4sugar/m4sh.m4 (AS_SET_CATFILE): Use AS_VAR_SET to set
the variable.
* tests/m4sh.at (AS@&t@_SET_CATFILE): New test.
* doc/autoconf.texi (Common Shell Constructs): Document that
AS_SET_CATFILE is polymorphic in its VAR argument now.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-08 06:55:10 +02:00
Ralf Wildenhues
9c975f4d23 Testsuite coverage for AC_COPYRIGHT and AT_COPYRIGHT.
* tests/autotest.at (AT@&t@_COPYRIGHT): New test.
* tests/base.at (AC@&t@_COPYRIGHT): Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-08 06:51:39 +02:00