Commit Graph

6204 Commits

Author SHA1 Message Date
Eric Blake
bb4a036f83 AC_REPLACE_FUNCS: allow split lines again
More fallout from the same 2.66 regression that was partially fixed
yesterday, but until yesterday's AS_LITERAL_IF actually treated \ as a
non-literal, apparently no one noticed the latent bug of a spurious
call to AC_CHECK_FUNC([\]) during automake's libobj5.test.

* lib/autoconf/functions.m4 (AC_REPLACE_FUNCS): Flatten newlines
and move guts...
(_AC_REPLACE_FUNCS): ...to new helper.
* tests/semantics.at (AC_REPLACE_FUNCS): Enhance test.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-22 16:02:27 -06:00
Eric Blake
6117b5a630 AC_LIBOBJ: optimize internal use
* lib/autoconf/general.m4 (_AC_LIBOBJ): Move literal check...
(AC_LIBOBJ): ...into callers.
* lib/autoconf/functions.m4 (_AC_REPLACE_FUNC): Likewise, thus
avoiding a second call to AS_LITERAL_IF.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-21 17:09:09 -06:00
Eric Blake
043b96c5db AC_REPLACE_FUNCS: restore shell loop for non-literal
* lib/autoconf/functions.m4 (AC_REPLACE_FUNCS): Handle
non-literals, which was lost in 2010-02-26 optimization.
* tests/semantics.at (AC_REPLACE_FUNCS): Enhance test.
* NEWS: Document the fix.
* THANKS: Update.
Reported by Wiseman Jun.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-21 17:08:36 -06:00
Eric Blake
13418cc969 maint: resync upstream files
* build-aux/gendocs.sh: Resync via 'make fetch'.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-21 15:59:16 -06: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
Eric Blake
de858e701f autom4te: don't filter out portions of location traces
* bin/autom4te.in (_m4_warn): Pass warnings through the channels
machinery as a single chunk, to avoid partial filtering.
* lib/m4sugar/m4sugar.m4 (_m4_warn): Document the conventions.
* tests/m4sugar.at (m4@&t@_warn): Enhance test to catch this.
Reported by Bruno Haible.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-20 16:01:16 -06:00
Eric Blake
842807af6c build: support autobuild
* cfg.mk (gnulib-update): Add autobuild.m4.
* configure.ac (AB_INIT): Output autobuild header.
* m4/autobuild.m4: New file, from gnulib.
* build-aux/config.guess: Resync from upstream.
* build-aux/config.sub: Likewise.
* build-aux/texinfo.tex: Likewise.
* doc/fdl.texi: Likewise.
* doc/gnu-oids.texi: Likewise.
* doc/make-stds.texi: Likewise.
* doc/standards.texi: Likewise.
* build-aux/gendocs.sh: Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-17 16:58:26 -06:00
Eric Blake
779418b2d5 config.status: avoid corrupting $ac_t
* lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS_PREPARE): Use a
different name, so as not to clash with pre-2.50 usage of "$ac_t"
as a tab character.
Reported by Sam Steingold.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-17 10:39:29 -06:00
Bruno Haible
b99695da25 docs: mark several macros obsolete
* doc/autoconf.texi (Particular Functions): Mark AC_FUNC_ERROR_AT_LINE,
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, AC_FUNC_MKTIME, AC_FUNC_STRTOD
as obsolete and refer to Gnulib.
* NEWS: Mention the change.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-17 09:56:27 -06:00
Bruno Haible
12d158217c AC_FUNC_STRNLEN: more realistic cross-compilation guess
* lib/autoconf/functions.m4 (AC_FUNC_STRNLEN): Require
AC_CANONICAL_HOST. When cross-compiling, guess it works everywhere
except on AIX.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-17 09:51:06 -06:00
Eric Blake
a1ef66bc18 m4sh: fix today's AS_BOX regression
* lib/m4sugar/m4sh.m4 (_AS_BOX_LITERAL): Fix underquotation.
Reported by Stefano Lattarini.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-16 16:46:36 -06:00
Eric Blake
03849f6e43 fortran: avoid misparsed FCLIBS from Fortran compiler
* lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Also skip
'Configured by:' lines from gfortran.
* NEWS: Mention it.
Reported by Stefano Lattarini.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-16 16:22:20 -06:00
Ralf Wildenhues
55b6a7c24f Add autom4te trace for AM_PROG_AR.
* lib/autom4te.in (Automake-preselections): Trace
AM_PROG_AR.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-09-16 19:53:40 +02:00
Eric Blake
f6030a3204 m4sugar: fix regression in AC_MSG_ERROR expansion
AS_ERROR Regression introduced in commit cffdc3947, but the
underlying problem stems from the introduction of m4_defun_init
in commit d0c5f482.

* lib/m4sugar/m4sugar.m4 (m4_defun_init): Avoid macro
concatenation on subsequent expansions
* tests/m4sh.at (AS_WARN and AS_ERROR): New test.
* tests/m4sugar.at (m4@&t@_require: one-shot initialization):
Enhance test.
* NEWS: Document the fix.
* THANKS: Update.
Reported by Adrian Bunk and and Nishio Futoshi.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-16 09:07:31 -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
0cca574572 autotest: work around zsh bug
* lib/autotest/general.m4 (AT_DATA): Special case an empty data
file, since zsh botches empty here-docs.
* doc/autoconf.texi (Writing Testsuites) <AT_DATA>: Document that
this allows empty contents.
* tests/autotest.at (AT_DATA): New test.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-13 13:28:35 -06:00
Eric Blake
793b3a74c4 docs: mention gnulib portability docs
* doc/autoconf.texi (Function Portability, Header Portability):
Add external links to gnulib.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-13 13:28:16 -06:00
Ralf Wildenhues
97d209ddb1 docs: document zsh specialty with empty here-documents.
* doc/autoconf.texi (Here-Documents): zsh 4.3.10 adds a newline
to empty here-docs.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-09-13 20:27:31 +02:00
Ralf Wildenhues
23a2c336ad docs: document zsh special array $options.
* doc/autoconf.texi (Special Shell Variables): Add entry for
`options'.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-09-13 20:21:31 +02:00
Ralf Wildenhues
cb093133b5 doc: minor updates.
* doc/autoconf.texi (Generic Compiler Characteristics): Use
second argument of @uref consistently, for nicer OpenMP link.
(Polymorphic Variables): Restore font-lock.
(Debugging): Add item for bashdb.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-09-13 20:21:00 +02:00
Ralf Wildenhues
37b43561c5 Document and test AT_CHECK args shell execution environment.
* 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>
2010-09-13 20:19:51 +02:00
Ralf Wildenhues
d85369c9bf autotest: document and test at_status semantics.
* doc/autoconf.texi (Writing Testsuites): Document $at_status.
* tests/autotest.at (at_status): New test.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-09-13 20:19:20 +02:00
Ralf Wildenhues
88eeae7588 doc: index entries for non-environment, non-output variables.
* 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>
2010-09-13 20:18:10 +02:00
Fernando Carrijo
dfa02369c4 docs: fix minor typo and 'See See foo' instances
* doc/autoconf.texi (Buffer Overruns and Subscript Errors): Fix
usage of TeX superscript notation to correctly represent number
exponent.
(Shell Functions): s/[Ss]ee @xref/@xref/
(Limitations of Shell Builtins, Canonicalizing): Likewise.
* THANKS: Update.

Signed-off-by: Fernando Carrijo <fcarrijo@freedesktop.org>
Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-13 10:20:05 -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
Ralf Wildenhues
b8e54a39f0 doc: minor indexing update.
(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>
2010-09-12 09:40:20 +02:00
Eric Blake
cd12a7faea m4sh: preserve set -vx over re-exec
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>
2010-09-08 10:43:25 -06:00
Eric Blake
e10883c0df docs: update alloca recommendations
* doc/autoconf.texi (Particular Functions): Don't redeclare alloca
on FreeBSD.
* THANKS: Update.
Reported by Giorgos Keramidas.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-08 09:42:56 -06:00
Eric Blake
0569949c61 docs: link to GNU Coding Standards in intro
* doc/autoconf.texi (Introduction): Actually link to the
standards.  Make other references consistent.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-08 09:13:38 -06:00
Eric Blake
10adce65fe docs: mention traditional awk limitation
* 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>
2010-09-08 08:23:13 -06:00
Eric Blake
4416ea8d25 docs: mention bash vs. POSIXLY_CORRECT
* doc/autoconf.texi (Special Shell Variables) <POSIXLY_CORRECT>:
Document bash behavior.
* THANKS: Update.
Reported by Dustin J. Mitchell, via bug-gnulib list.

Signed-off-by: Eric Blake <eblake@redhat.com>
2010-09-07 13:52:44 -06:00
Eric Blake
d46804252a docs: enhance recommendations on test usage
* 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>
2010-09-07 08:40:46 -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
2626155d5c docs: mention Solaris here-docs vs. ${a-"b c"}
* 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>
2010-08-30 11:16:17 -06:00
Eric Blake
30378453ea fortran: always avoid AC_LANG_CONFTEST warning
* 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>
2010-08-30 10:43:33 -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
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