* doc/autoconf.texi (Writing Testsuites): Document that COMMANDS
is run in a subshell, but RUN-IF-FAIL and RUN-IF-PASS are not.
* tests/autotest.at (AT@&t@_CHECK execution environment): New
test.
* NEWS: Update.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/autoconf.texi: Clarify the meaning of the various variable
indices. Merge variable index `vr' into concept index using
syncodeindex.
(Configuration Actions, Generic Programs, Generic Functions)
(Writing Testsuites): Add index entries for documented shell
variables used during in configure and testsuite scripts.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
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>
(Shell Substitutions, Site Defaults): Fix markup for indexed
entried, using @code and @file as appropriate.
(M4 Macro Index): Clarify which of the indexed macros have m4_
and which have AS_ prefix.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
See http://lists.gnu.org/archive/html/bug-gnulib/2010-09/msg00035.html
for the motivation for this patch.
* lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Trace through
re-exec, to make it easier to debug script startup issues.
Idea from recent bug-gnulib change to init.sh.
Signed-off-by: Eric Blake <eblake@redhat.com>
* doc/autoconf.texi (Limitations of Usual Tools) <awk>: Mention
that traditional awk lacks ENVIRON. Add reference to awk manual.
(Particular Programs) <AC_PROG_AWK>: Add reference to awk section.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <eblake@redhat.com>
* doc/autoconf.texi (Limitations of Builtins) <test (strings)>:
Mention yet another Solaris issue.
Reported by Stefano Lattarini.
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>
* doc/autoconf.texi (Shell Substitutions) <${var:=value}>:
Document problem of "" within here-docs.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <eblake@redhat.com>
* lib/autoconf/lang.m4 (AC_LANG_CONFTEST()): Make the default
match the fact that the default AC_LANG_SOURCE does not inline
confdefs.h in the first place.
* lib/autoconf/fortran.m4 (AC_FC_FREEFORM, AC_FC_FIXEDFORM)
(AC_FC_LINE_LENGTH, __AC_FC_NAME_MANGLING): Revert previous use of
AC_LANG_DEFINES_PROVIDED.
Suggested 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>
* doc/autoconf.texi (Polymorphic Variables, Shell Substitutions):
Use $var or $t instead.
(Limitations of Usual Tools): Use $dir instead.
(Initialization Macros) <AS_TMPDIR>: Make good on the NEWS
regarding AS_TMPDIR being documented as consuming $tmp.
Suggested by Ralf Wildenhues.
Signed-off-by: Eric Blake <eblake@redhat.com>
* 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>
* 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>
* lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Double quote entire
sed script, to avoid issue uncovered by automake testsuite where
'b' was an m4 macro that broke execution on dash.
Reported by Stefano Lattarini.
Signed-off-by: Eric Blake <eblake@redhat.com>
* 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>
* doc/autoconf.texi (Conditional constructs) <m4_define_default>:
Document it, since gnulib wants to use it.
* NEWS: Mention this.
Signed-off-by: Eric Blake <eblake@redhat.com>
* 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>
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>
Regression introduced in e0ac12089e.
* lib/m4sugar/m4sh.m4 (AS_TMPDIR): The previous patch trying to
rename $tmp to $as_tmp was wrong; config.status relies on it.
Signed-off-by: Eric Blake <eblake@redhat.com>
* lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Avoid problems if
as_myself is inherited from environment.
(AS_TMPDIR): Be namespace clean.
Signed-off-by: Eric Blake <eblake@redhat.com>
* 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>
* lib/autoconf/headers.m4 (AC_HEADER_STDBOOL): Move the "bool e =
&s;" test into the main program, as C99 might plausibly be
interpreted as not requiring support for this construction in
static initializers. Remove the "#if defined __xlc__" stuff, as
the bug is not present in recent xlc implementations, and they
reject the test for other (valid) reasons. People using ancient
xlc versions, if any, are suggested to update to fixed versions.
Reported by Ralf Wildenhues in the thread starting at:
http://lists.gnu.org/archive/html/bug-autoconf/2010-08/msg00103.html
* lib/autoconf/functions.m4 (_AC_LIBOBJ_GETLOADAVG): Only define
SVR4 when -lkvm is required.
* THANKS: Update.
Reported by Yaakov Selkowitz.
Signed-off-by: Eric Blake <eblake@redhat.com>
* lib/autoconf/headers.m4 (AC_HEADER_STDBOOL): Drop gcc (and by
extension clang) check in favor of a gnulib test. Force failure,
rather than merely testing for a compiler extension.
* THANKS: Update.
Reported by Anders Kaseorg.
Signed-off-by: Eric Blake <eblake@redhat.com>
* doc/autoconf.texi (Using autoreconf to Update configure
Scripts): List `AUTOM4TE' among the environment variables
honored by autoreconf.
* bin/autoreconf.in ($help): Likewise.
* doc/autoconf.texi (Polymorphic Variables) <AS_VAR_IF>: Make it
clear that user must supply quotes as needed.
* THANKS: Update.
Suggested by Randall Cotton.
Signed-off-by: Eric Blake <eblake@redhat.com>
* 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>
* 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>
* 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>
* 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>
* doc/autoconf.texi (Making testsuite Scripts): atconfig is not
created from an input template.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/functions.m4 (AC_FUNC_ALLOCA): Assume that alloca's
return type is 'void *', not 'char *'. Supply C89 prototype.
Reported by Thomas Klausner.
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>