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>
* 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>
* 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>
* 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>
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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* lib/autotest/general.m4 (AT_INIT) <Fifo job dispatcher>: Track
two fds to fifo in parent, to avoid race where parent can see EOF
before child opens fifo. Avoid any atomicity problems with tokens
larger than one byte.
* NEWS: Document the bug fix.
Signed-off-by: Eric Blake <eblake@redhat.com>
* 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>
* 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>
* 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>
* lib/autoconf/c.m4 (_AC_PROG_PREPROC_WORKS_IFELSE): Also remove
conftest.i when preprocessor tests break out of a loop.
Signed-off-by: Eric Blake <eblake@redhat.com>
* 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>
* lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Ignore
'-link', added spuriously when -qipa is used with the XL
Fortran compilers on BlueGene.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* 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>
* 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>
* 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>
* lib/autotest/general.m4 (_AT_FINISH) <banners>: Rather than
doing a recursive find, limit ourselves to top ChangeLog only.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <eblake@redhat.com>
* 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>
* lib/m4sugar/m4sh.m4 (AS_BOX): Use less m4 time.
(_AS_BOX_LITERAL): Use fewer forks in the common case.
* doc/autoconf.texi (Common Shell Constructs) <AS_BOX>: Document
the macro.
* NEWS: Mention it.
Signed-off-by: Eric Blake <eblake@redhat.com>
* lib/m4sugar/m4sh.m4 (AS_VAR_SET): Reduce m4 overhead.
(AS_VAR_IF, AS_VAR_TEST_SET): Provide shorter variant for simple
references.
Suggested by Bruno Haible.
Signed-off-by: Eric Blake <eblake@redhat.com>
* 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>
* 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>