Commit Graph

5850 Commits

Author SHA1 Message Date
Jan Madzik
06aeca6abe Avoid AIX 6.1 ksh88 ECHO_C command substitution bug.
* lib/m4sugar/m4sh.m4 (_AS_ECHO_N_PREPARE): Ensure more than
one character is output with `\c'; reset echo output state
if buggy ksh was detected, and set ECHO_T instead of ECHO_C.
* doc/autoconf.texi (Limitations of Builtins): Document it.
* tests/m4sh.at (ECHO_C): New test.
* THANKS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-30 20:48:59 +02:00
William Pursell
6c358e8f6a Fix grammaro in documenation.
* doc/autoconf.texi (Guidelines): Fix grammaro.
2009-06-27 13:06:02 +02:00
Eric Blake
01660aaecc Fix AC_CHECK_HEADER infloop for gcc.
* lib/autoconf/headers.m4 (_AC_CHECK_HEADER_NEW)
(_AC_CHECK_HEADER_OLD): Give up on AU_DEFUN, and manually warn
about obsoletion, to avoid infinite loop in gcc.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-17 06:27:45 -06:00
Eric Blake
ba32f02aed Add m4_copy_force, m4_rename_force.
* lib/m4sugar/m4sugar.m4 (m4_copy_force, m4_rename_force): New
macros.
* tests/m4sugar.at (m4@&t@_defn): Test them.
* doc/autoconf.texi (Redefined M4 Macros) <m4_copy>: Document
them.
* NEWS: Likewise.
Suggested by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-15 06:59:03 -06:00
Eric Blake
a5a584d9e8 Reinstate _AC_CHECK_HEADER_OLD for gcc.
* lib/autoconf/headers.m4 (_AC_CHECK_HEADER_NEW)
(_AC_CHECK_HEADER_OLD): Provide autoupdate versions, since gcc and
others used these undocumented macros.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-15 06:59:00 -06:00
Ralf Wildenhues
cafdba3139 Fix concurrent autom4te.cache directory creation race.
* bin/autom4te.in: Do not error out if another `autom4te'
instance created the cache directory before we could.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-12 13:38:57 +02:00
Steven G. Johnson
ca47306861 Create a file in test program when detecting cross-compilation.
* lib/autoconf/lang.m4 (_AC_LANG_IO_PROGRAM): New macro, returns
program that creates a file.
(_AC_COMPILER_EXEEXT,_AC_COMPILER_EXEEXT_WORKS): Call new macro
and document why it's needed to robustly detect cross-compiling.
(AC_LANG_DEFINE): Copy implementation across similar languages.
* lib/autoconf/c.m4 (_AC_LANG_IO_PROGRAM(C)): Implement new macro.
* lib/autoconf/fortran.m4 (_AC_LANG_IO_PROGRAM(Fortran 77)):
Likewise.
* lib/autoconf/erlang.m4 (_AC_LANG_IO_PROGRAM(Erlang)): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-11 07:07:32 -06:00
Eric Blake
14c613a6c9 Simplify AC_LANG(Fortran).
* lib/autoconf/fortran.m4 (AC_LANG(Fortran)): Borrow from Fortran
77, which requires reordering portions of the file.
(AC_LANG_PROGRAM(Fortran), AC_LANG_CALL(Fortran)): Now defined
automatically.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-11 06:59:57 -06:00
Eric Blake
685b65a74f Clarify m4_copy semantics.
* doc/autoconf.texi (Redefined M4 Macros) <m4_copy>: Update
documentation.
* tests/m4sugar.at (m4@&t@_defn): Enhance test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-11 06:43:39 -06:00
Eric Blake
22e57e5c5e Improve documentation on trap pitfalls.
* doc/autoconf.texi (Limitations of Builtins) <trap>: Mention new
Posix 2008 requirement on trap, and dash bug in implementing it.
Mention various shell bugs with traps defined inside subshells.
Mention older bash limitation with single-command exit trap.
<set>: Mention another 'set -e' limitation.
Reported by Jens Schmidt.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-06 22:05:47 -06:00
Jim Meyering
73d519a40a Improve testsuite's --help output.
* lib/autotest/general.m4: Correct the example in ./testsuite --help.
Improve wording.
2009-06-06 21:26:09 +02:00
Eric Blake
bef5cc354c Document fallback behavior of AC_PROG_LEX.
* doc/autoconf.texi (Particular Programs) <AC_PROG_LEX>: Mention
why fallback is :, and that a --version check must be used to
determine whether flex was found.
Reported by Patrick Welche.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-06 10:41:47 -06:00
Jim Meyering
89f948d644 Fix syntax errors in autoconf.texi.
* doc/autoconf.texi (Erlang Libraries): @-escape curly braces
in example code.
2009-05-28 19:08:20 +02:00
Romain Lenglet
9e380c5ada New AC_ERLANG_SUBST_ERTS_VER macro.
* lib/autoconf/erlang.m4: Add macro AC_ERLANG_SUBST_ERTS_VER.
* doc/autoconf.texi (Erlang Libraries): Document
AC_ERLANG_SUBST_ERTS_VER.
* NEWS: Likewise.
* AUTHORS: Update Romain Lenglet's email address.
* THANKS: Update.
Suggested by Ruslan Babayev.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-05-28 06:19:57 -06:00
Eric Blake
5f19cfb878 Sanitize more problematic environment variables.
* doc/autoconf.texi (Environment Variable Index): Add more
entries, particularly for precious variables and known culprit
variables.  Needed to avoid overfull vbox.
(Special Shell Variables) <CLICOLOR_FORCE, GREP_OPTIONS>: Add
variables known to cause misbehavior.
* lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Unset variables
known to cause problems.
* THANKS: Update.
Based on reports from Ilya Bobir and Joey Mingrone.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-05-26 06:49:41 -06:00
Ralf Wildenhues
35e67f5c0d Document VPATH = $(variable) issue in VPATH chapter.
* doc/autoconf.texi (Variables listed in VPATH): New node.
(Top, VPATH and Make): Adjust menus.
(Build Directories): Refer to it.
Prompted by report from Bruno Haible.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-05-21 14:18:39 +02:00
Eric Blake
6382b687fd Update uses of all-permissive license.
* ChangeLog: Relicense under GPL.
* ChangeLog.0: Likewise.
* ChangeLog.1: Likewise.
* ChangeLog.2: Likewise.
* THANKS: Likewise.
* m4/m4.m4: Use latest wording of FSF all-permissive license.
* m4/make-case.m4: Likewise.
* doc/install.texi: Likewise.
* tests/statesave.m4: Relicense to match rest of testsuite; this
file does not need all-permissive license since it is not designed
for reuse by other packages.
* BUGS: Relicense under all-permissive license.
* HACKING: Likewise.
* NEWS: Likewise.
* README: Likewise.
* README-alpha: Likewise.
* README-hacking: Likewise.
* TODO: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-05-20 06:02:49 -06:00
Eric Blake
6928fc64b2 Update some upstream files.
* build-aux/config.guess: Resynchronize from upstream.
* build-aux/gnupload: Likewise.
* build-aux/vc-list-files: Likewise.
* build-aux/texinfo.tex: Likewise.
* doc/gendocs_template: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-05-20 06:02:45 -06:00
Eric Blake
e86cec418e Don't mention undocumented interface in NEWS.
* NEWS: Correct earlier entry about AS_FOR.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-05-20 06:02:41 -06:00
Ralf Wildenhues
b29a07fffb New manual section `Parallel Make'.
* doc/autoconf.texi (Parallel Make): New node, document NetBSD
`make -jN' quirks.
(Top, Portable Make): Adjust menus.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-05-19 07:29:17 +02:00
Ralf Wildenhues
83d976a33f testsuite: skip `Multiple languages' test without C++ compiler.
* tests/compile.at (Multiple languages): Skip test on systems
without a C++ compiler.
Report by Jim Meyering.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-05-14 07:20:58 +02:00
Eric Blake
780a068d29 Document zsh bug with empty commands.
* doc/autoconf.texi (Special Shell Variables) <?>: Add mention of
more problems with $?.
2009-05-13 06:25:26 -06:00
Patrick Welche
80e62691c9 Also try X11R7 when looking for X11 files, for NetBSD.
* lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT): Also try directories
with X11R7 in the name.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-05-11 20:34:09 +02:00
Ralf Wildenhues
b26d51caf9 Limit stderr logging for C compiler version.
* lib/autoconf/general.m4 (_AC_RUN_LOG_LIMIT, _AC_DO_LIMIT): New
internal macros, equivalent to _AC_RUN_LOG and _AC_DO, but with
an optional additional argument to limit the number of lines of
stderr output logged, defaulting to 10.
* lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Use
_AC_DO_LIMIT for capturing compiler version output.  Also test
-qversion, for the IBM xlc compiler.
* lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise.
* THANKS: Update.
Report by Christian Rössel and John R. Cary against Libtool.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-05-01 10:58:58 +02:00
Eric Blake
3bec0c1d32 Fix quoting of m4 macros in AT_CHECK.
* lib/autotest/general.m4 (AT_CHECK): Expand prior to adding
escapes, to avoid shell syntax errors caused by late macro
expansion.
* NEWS: Document this change.
* tests/autotest.at (Metacharacters in command from M4 expansion):
New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-24 13:15:31 -06:00
Eric Blake
8eb0f6220d manual: Use consistent spelling of here-document.
* doc/autoconf.texi (Defining Symbols, Programming in M4sh)
(Common Shell Constructs, Macro Names, Writing Testsuites): Fix
spelling.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-24 13:15:28 -06:00
Eric Blake
5da9f24d55 Make AT_CHECK_UNQUOTED more like AC_DEFINE_UNQUOTED.
* lib/autotest/general.m4 (AT_CHECK_NOESCAPE): Keep older,
undocumented semantics, where unbalanced " cannot be used in the
stdout/stderr argument.
(AT_CHECK_UNQUOTED): Treat " in stdout/stderr as a literal, since
the text is used in double-quoted context.
* tests/autotest.at (unquoted output): New test.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Mention which
shell expansions are handled.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-24 13:15:25 -06:00
Eric Blake
bcb6b3180d Rename AT_CHECK_NOESCAPE to AT_CHECK_UNQUOTED.
* lib/autotest/general.m4 (AT_CHECK_NOESCAPE): Deprecate, in favor
of new spelling...
(AT_CHECK_UNQUOTED): ...for consistency with AC_DEFINE_UNQUOTED.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document the
rename.
* NEWS: Likewise.
* tests/autotest.at (Binary output, Cleanup): Adjust tests.
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Likewise.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-24 13:15:22 -06:00
Ralf Wildenhues
f4e756e351 New test to ensure autom4te cache file locking works.
* tests/tools.at (autom4te cache locking): New test.
Report by Eric Blake.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-23 19:46:59 +02:00
Paolo Bonzini
00d0543653 manual: another grammar improvement.
* doc/autoconf.texi (Fortran Compiler): Avoid dependency on
pronunciation of `FCFLAGS_f90'.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-23 19:46:58 +02:00
Eric Blake
ce153844ca Change FOO placeholder to use @var{text} instead.
* doc/autoconf.texi (Configuration Actions): Rename AC_CONFIG_FOOS
to AC_CONFIG_@var{ITEMS}.
* doc/autoconf.texi (config.status Invocation): Likewise.
(AC_FOO_IFELSE vs AC_TRY_FOO): Rename node...
(AC_ACT_IFELSE vs AC_TRY_ACT): ...to this.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-23 06:17:30 -06:00
Eric Blake
46e87ded26 Add m4_argn.
* lib/m4sugar/m4sugar.m4 (m4_argn): New macro.
* NEWS: Document it.
* doc/autoconf.texi (Looping constructs) <m4_argn>: Likewise.
<m4_car, m4_cdr>: Improve documentation.
* tests/m4sugar.at (m4 lists): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-22 20:51:28 -06:00
Ralf Wildenhues
d29bb704e5 Improve description of AC_PROG_CC_C89 and AC_PROG_CC_C99.
* doc/autoconf.texi (C Compiler): Document that AC_PROG_CC_C89
and AC_PROG_CC_C99 prefer extended over strict conformance modes.
Report by Vincent Lefèvre.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-22 07:35:12 +02:00
Ralf Wildenhues
9034f132cc Revert bogus change in last commit.
* doc/autoconf.texi (Initialization Macros): Revert change.
Spotted by Eric Blake.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-21 22:59:42 +02:00
Ralf Wildenhues
ee4a036cda manual: fix trivial grammar errors.
* doc/autoconf.texi (Fortran Compiler, Initialization Macros)
(Limitations of Usual Tools, Pretty Help Strings)
(config.status Invocation): Fix `a' vs. `an' errors.
Report by Eric Blake.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-21 21:43:36 +02:00
Eric Blake
c474ab9084 Shuffle maintainer-specific rules.
* Makefile.am (maintainer-check-tests): Delete.
(autom4te-update): Move...
* cfg.mk (autom4te-update): ...here.
(fetch): Depend on autom4te-update.  Split...
(gnulib-update): ...into new rule.  Import move-if-change from
gnulib.
* maint.mk (maintainer-distcheck): Absorb former maintainer-check
rule.
* build-aux/move-if-change: New file, undistributed.
* .gitattributes: Handle new upstream file.
* .gitignore: Ignore maintainer cruft.
* HACKING: Update maintainer instructions.
* build-aux/config.guess: Update from upstream.
* build-aux/config.sub: Likewise.
* build-aux/gendocs.sh: Likewise.
* build-aux/texinfo.tex: Likewise.
* doc/gendocs_template: Likewise.
* doc/standards.texi: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-21 06:51:35 -06:00
Ralf Wildenhues
e430ff0ca6 Sync autom4te perl modules from Automake.
* lib/Autom4te/Channels.pm: Sync from Automake.
* lib/Autom4te/FileUtils.pm: Likewise.
* lib/Autom4te/XFile.pm: Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-19 12:54:45 +02:00
Ralf Wildenhues
737b9ddc1b Adjust channel definitions for new Automake `ordered' flag.
* lib/Autom4te/ChannelDefs.pm (Autom4te::ChannelDefs): Set
`ordered' flag to zero for channels `fatal', `automake', and
`verb'.  This has currently no effect on actual semantics but
avoids a consistency check needed for Automake's usage of the
Channels.pm code.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-19 12:48:19 +02:00
Ralf Wildenhues
536f9ae3a4 manual: clarify m4_if synopsis.
* doc/autoconf.texi (Redefined M4 Macros): Rewrite synopsis of
m4_if in the presence of more than three arguments.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-19 01:16:56 +02:00
Ralf Wildenhues
e7c7a4735f Improve and clarify `config.status' usage documentation.
* doc/autoconf.texi (config.status Invocation): Fix markup in
synopsis.  Use `tag' instead of `file' notation for the
non-option arguments, to be consistent with the documentation
of the AC_CONFIG_* macros.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise,
use `tag' notation for non-option arguments.
Report by John Calcote.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-19 01:12:43 +02:00
Eric Blake
7ece247bdd Test that autotest handles binary output.
* tests/autotest.at (Binary output): New test.
Suggested by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-15 06:38:58 -06:00
Eric Blake
c241057ad4 Add stdout-nolog and ignore-nolog to AT_CHECK.
* lib/autotest/general.m4 (AT_DIFF_STDERR(stderr-nolog))
(AT_DIFF_STDERR(ignore-nolog), AT_DIFF_STDOUT(stdout-nolog))
(AT_DIFF_STDOUT(ignore-nolog)): New macros.
* tests/autotest.at (Logging): New test.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document the
new logging actions.
* NEWS: Likewise.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-15 06:00:56 -06:00
Eric Blake
e8f34dca8c Teach AT_CHECK about hard failures.
* lib/autotest/general.m4 (AT_INIT) <at_fn_check_skip>
<at_fn_check_status, at_fn_group_postprocess>: Handle hard
failures.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document
AT_CHECK_NOESCAPE and exit status 99.
* NEWS: Likewise.
* tests/autotest.at (Hard fail, Cleanup): New tests.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-15 06:00:24 -06:00
Eric Blake
bc79643383 Fix yesterday's regression in AS_IF.
* lib/m4sugar/m4sh.m4 (_AS_IF_ELSE): Don't corrupt $? in else
branch; it is up to the user to avoid syntax errors.
* tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Adjust test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-14 19:26:29 -06:00
Ralf Wildenhues
63d463427f Add traces for AM_SILENT_RULES.
* lib/autom4te.in (Automake-preselections): Trace
AM_SILENT_RULES.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-14 22:17:35 +02:00
Eric Blake
e9a5c2211a Improve documentation related to expanded-before-required.
* doc/autoconf.texi (Expanded Before Required): Add a case study.
(Running the Compiler) <AC_COMPILE_IFELSE>: Remind users that
running a compile test will AC_REQUIRE the compiler check.
(Macro Definitions) <AC_DEFUN>: Contrast AC_DEFUN and m4_define.
(C Compiler) <AC_PROG_CC>: Mention the fact that only first
invocation of this macro checks for $EXEEXT, and that many other
macros use it via AC_REQUIRE.
Reported by Andreas Schwab.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-13 13:15:44 -06:00
Eric Blake
d7f226ee0b Mention latest rules about make and set -e.
* doc/autoconf.texi (Failure in Make Rules): Posix is now clear
that make must use set -e.
(Limitations of Builtins) <set>: Clarify more about set -e
behavior.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-13 13:15:42 -06:00
Eric Blake
0cd7cde060 Improve documentation about if exit status.
* doc/autoconf.texi (Limitations of Builtins) <if>: Mention that
exit status bugs don't affect modern targets.
Reported by Andreas Schwab.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-13 13:15:39 -06:00
Eric Blake
ff97bd9a3f Add cross-reference to new macros.
* doc/autoconf.texi (Text processing Macros) <m4_normalize>
<m4_strip>: Reference the new m4_ifblank.
Suggested by Mike Frysinger.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-13 13:15:37 -06:00
Eric Blake
52b83b8c37 Make AS_IF, AS_CASE, and AS_FOR more robust to blank arguments.
* lib/m4sugar/m4sh.m4 (_AS_CASE, _AS_CASE_DEFAULT, AS_FOR, _AS_IF)
(_AS_IF_ELSE, AS_IF): Avoid syntax error on blank argument,
including a macro with an empty expansion.
* NEWS: Mention this.
* tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE, AS@&t@_FOR): Update
tests.
Reported by Mike Frysinger.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-13 13:15:34 -06:00