Commit Graph

6169 Commits

Author SHA1 Message Date
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
6284d1bef7 docs: avoid use of $tmp outside of config.status use
* 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>
2010-08-30 09:56:41 -06:00
Paul Eggert
838bdfa56d AC_PROG_YACC: fix comment re what "yacc" stands for
* lib/autoconf/programs.m4 (AC_PROG_YACC): YACC stands for
"Yet Another Compiler Compiler", not "Yet Another C Compiler".
Problem reported by Chris Long in
<http://lists.gnu.org/archive/html/bug-autoconf/2010-08/msg00134.html>.
2010-08-29 20:21:26 -07: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
55f532e539 m4sh: protect LINENO against stray macro
* 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>
2010-08-27 10:59:40 -06: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
270b834086 docs: document m4_define_default
* 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>
2010-08-26 16:24:41 -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
092a8b3848 autoconf: fix regression in AC_FUNC_SELECT_ARGTYPES
* lib/autoconf/functions.m4 (AC_FUNC_SELECT_ARGTYPES): Fix
quoting; regression from yesteray leaked '' into default value.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-08-26 11:54:11 -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
4b6f3d2ce1 m4sh: revert regression in AS_TMPDIR
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>
2010-08-25 21:27:03 -06:00
Eric Blake
ae1cc9f03f m4sh: reduce size of AS_VAR_TEST_SET
* lib/m4sugar/m4sh.m4 (AS_VAR_TEST_SET): Make more compact.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-08-25 17:22:21 -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
Eric Blake
e0ac12089e m4sh: fix some namespace safety issues
* 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>
2010-08-25 16:21:39 -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
Paul Eggert
d984765218 AC_HEADER_STDBOOL: avoid spurious failure with modern xlc
* 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
2010-08-24 14:04:16 -07:00
Eric Blake
9a30240650 AC_FUNC_GETLOADAVG: don't define SVR4 on cygwin
* 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>
2010-08-24 07:41:41 -06:00
Eric Blake
bfc4d94c7d AC_HEADER_STDBOOL: avoid spurious clang failure
* 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>
2010-08-23 14:36:13 -06:00
Ralf Wildenhues
3b418ae86b doc: AIX sed dislikes indented comments.
* doc/autoconf.texi (Limitations of Usual Tools) <sed>: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-22 15:58:32 +02:00
Stefano Lattarini
1027010dcd autoreconf: mention the AUTOM4TE environment variable
* doc/autoconf.texi (Using autoreconf to Update configure
Scripts): List `AUTOM4TE' among the environment variables
honored by autoreconf.
* bin/autoreconf.in ($help): Likewise.
2010-08-19 10:55:53 -06:00
Eric Blake
6c2fe4a197 doc: improve AS_VAR_IF details
* 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>
2010-08-17 08:19:39 -06: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
3fdd727caa Fix description of AC_CONFIG_TESTDIR to not mention atconfig.in.
* doc/autoconf.texi (Making testsuite Scripts): atconfig is not
created from an input template.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-06 23:00:46 +02:00
Bruno Haible
08b6974837 AC_FUNC_ALLOCA: modernize
* 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>
2010-08-05 14:53:17 -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
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
Eric Blake
5adc15b7b6 docs: mention bash bug with word splitting
* doc/autoconf.texi (Shell Substitutions): Document bash bug, and
zsh default behavior difference.
Reported by Ralf Wildenhues.
2010-08-03 16:10:04 -06:00
Eric Blake
608c89c8c6 docs: mention ksh bug with function syntax
* doc/autoconf.texi (Shell Functions): Document ksh93 limitation.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-08-03 16:05:16 -06: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
Eric Blake
8755f72da4 docs: track recent copyright assignment
* AUTHORS: Add Peter Rosin.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-08-02 15:47:11 -06: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
Ralf Wildenhues
55072aea4a Fix typos in perlpod docs.
* lib/Autom4te/ChannelDefs.pm, lib/Autom4te/Channels.pm,
lib/Autom4te/General.pm: Fix typos and spacing in perlpod
documentation and in comments.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-07-31 09:09:15 +02:00
Eric Blake
14f352e388 docs: mention ksh file descriptor limitation
* doc/autoconf.texi (File Descriptors): Document issue with fd 10
and above.
Reported by Ralf Wildenhues.
2010-07-29 16:22:19 -06:00
Eric Blake
4e7b9effea docs: mention cd limitation
* doc/autoconf.texi (Limitations of Builtins) <cd>: Document
issues with empty argument.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-07-29 16:21:20 -06:00
Ralf Wildenhues
0262e7e7d1 Add missing index entries to manual.
* doc/autoconf.texi (Fortran Compiler, Language Choice): Add
index entries for AC_FC_DUMMY_MAIN, AC_LANG; reformat entry for
AC_LANG_ASSERT.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-07-29 22:04:00 +02:00
Eric Blake
7ab1f403bd post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2010-07-21 16:19:14 -06:00
Eric Blake
7c405b3383 Release Version 2.67.
* NEWS: Mention the release.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-07-21 16:16:49 -06:00
Eric Blake
6b16d0ac04 Prepare for release.
* maint.mk (PREV_VERSION_REGEXP): New macro, missed when
backporting update-NEWS_hash from gnulib.
* cfg.mk (old_NEWS_hash): Correctly generate.
* build-aux/gendocs.sh: Temporarily break sync from upstream, to
avoid including spurious directories in info source tarball.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-07-21 16:16:39 -06: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
991183c4ee Partially revert previous patch.
* lib/autotest/general.m4 (AT_INIT) <serial testing>: Changing
at_jobs here breaks output if -j2 was requested but shell is
insufficient to support parallel testing.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-07-21 13:51:14 -06:00
Eric Blake
69eb1bda9a Minor testsuite size reduction.
* lib/autotest/general.m4 (AT_INIT) <serial testing>: Ensure
at_jobs is 1.
(AT_SETUP, AT_CLEANUP): Factor initialization code...
(AT_INIT) <at_fn_group_banner>: ...into new function.
Based in part on suggestion by Ralf Wildenhues.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-07-21 07:59:45 -06:00
Eric Blake
fbd1b9e4fb Close job control fd before running tests.
* doc/autoconf.texi (File Descriptors): Clarify limitations.
* lib/autotest/general.m4 (AT_CLEANUP): Avoid leaking job control
fifo fd to user tests.
(AT_INIT): Delete comment, now that close is done elsewhere.
Suggested by Ralf Wildenhues.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-07-20 22:11:14 -06:00