* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>