Commit Graph

2655 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Eric Blake
723c9e5c0f Add m4_blank and friends.
* lib/m4sugar/m4sugar.m4 (m4_blank, m4_nblank, m4_default_nblank)
(m4_default_nblank_quoted): New macros.
* NEWS: Document them.
* doc/autoconf.texi (Conditional constructs): Likewise.
* tests/m4sugar.at (m4sugar shorthand conditionals): New test.
Suggested by Mike Frysinger.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-13 13:15:32 -06:00
Eric Blake
ef8940d9b5 Add undocumented _AS_CLEAN_DIR.
* lib/m4sugar/m4sh.m4 (_AS_CLEAN_DIR): New macro; fixes m4 quoting
in previous patch.
* lib/autotest/general.m4 (AT_INIT) <at_fn_group_prepare>: Use new
macro.
* tests/m4sh.at (_AS@&t@_CLEAN_DIR): New test.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-10 06:26:33 -06:00
Eric Blake
1c34e5113f Avoid problems caused by deleting in-use directory.
* lib/autotest/general.m4 (AT_INIT) <at_fn_group_prepare>: Only
remove the contents of $at_group_dir, not the directory itself.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-09 17:40:17 -06:00
Eric Blake
bd671cbd57 Fix regression in empty test.
* lib/autotest/general.m4 (AT_SETUP): Prep AT_ingroup for fallback
use in empty test.  Fixes regression introduced 2009-04-06.
(_AT_CHECK): Undo fallback when a test is not empty.
(AT_CLEANUP): Expand AT_ingroup before deleting.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-09 17:40:15 -06:00
Paolo Bonzini
fc5c85a6b2 Make a less conservative cross-compilation guess for AC_FUNC_UTIME_NULL.
* lib/autoconf/functions.m4 (AC_FUNC_UTIME_NULL): Assume
not crosscompiling to an obsolete system.
2009-04-09 23:14:27 +02:00
Ralf Wildenhues
34163e58d4 Automake relies on the undocumented `_AC_COMPILER_EXEEXT' macro.
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT): Document that
Automake relies on this macro.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-09 00:00:30 +02:00
Eric Blake
c283f62edb Handle shell comments in AT_CHECK.
* lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Handle # in
test correctly.  Latent bug in handling shell comment was first
fixed 2008-11-20, but regressed two patches later.
* tests/autotest.at (Shell comment in command): New test.
* NEWS: Document the fix.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-06 20:52:44 -06:00
Eric Blake
57e6f69b99 Hard fail any test with syntax errors.
* lib/autotest/general.m4 (AT_INIT) <at_fn_group_postprocess>:
Guarantee test failure on syntax error, rather than inheriting
status from previous test.
* tests/autotest.at (Syntax error): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-06 20:52:41 -06:00
Andris Pavenis
bc9bc82a1e Fix awk substitution of carriage returns on DJGPP.
* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fix typo in
generation of ac_cs_awk_cr.
* THANKS: Update.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-03-24 06:47:09 -06:00
Aaron W. LaFramboise
60e637d68f Work around cygwin bash igncr mode.
* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fall back to
bash carriage returns if ac_cr lost \r from ``.
* THANKS: Update.
Suggested by Eric Blake.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-03-24 06:40:23 -06:00
Jim Meyering
8a54ca8043 Manual: fix a typo.
* lib/m4sugar/m4sh.m4: s/are/is/ => "there is no indirection"
2009-03-17 21:59:14 +01:00
Allan Caffee
286c51ccf3 Fix a typo in comment for AS_LITERAL_IF.
* lib/m4sugar/m4sh.m4 (AS_LITERAL_IF): Update a comment that fell
out of date when this function was moved/renamed in 59ecd766.
* THANKS: Update.

Signed-off-by: Allan Caffee <allan.caffee@gmail.com>
Signed-off-by: Eric Blake <ebb9@byu.net>
2009-03-02 11:13:25 -07:00
Eric Blake
ba524e662f Improve wording for AS_ESCAPE.
* doc/autoconf.texi (Common Shell Constructs) <AS_ESCAPE>: Touch
up documentation.
* lib/m4sugar/m4sh.m4 (_AS_ESCAPE): Fix comment typos.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-03-02 11:12:16 -07:00
Eric Blake
b35598a688 Use pkgdatadir consistently.
* bin/Makefile.am (edit): Substitute pkgdatadir, not datadir.
* lib/Makefile.am (edit): Likewise.
* lib/autom4te.in (Autoconf-without-aclocal-m4, Autotest, M4sh)
(M4sugar): Use @pkgdatadir@, not @datadir@.
* bin/autoheader.in ($datadir): Likewise.
* bin/autom4te.in ($datadir): Likewise.
* bin/autoreconf.in ($datadir): Likewise.
* bin/autoscan.in ($datadir): Likewise.
* bin/autoupdate.in ($datadir): Likewise.
* bin/ifnames.in ($datadir): Likewise.
* doc/autoconf.texi (Installation Directory Variables): Update
example to be consistent; focus on $(bindir) as an autoconf
variable, and mention that $(pkgdatadir) comes from automake.
Reported by Reuben Thomas.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-02-24 09:38:01 -07:00
Eric Blake
4da1abd28b Use m4_translit more efficiently in AS_ESCAPE.
* lib/m4sugar/m4sh.m4 (_AS_ESCAPE): Alter API to take first byte
of set separately from rest.
(AS_ESCAPE, _AS_QUOTE_MODERN, AS_TR_SH, AS_VAR_GET): Adjust
callers.
* lib/autoconf/autoheader.m4 (AH_VERBATIM): Avoid duplicate
characters in translit request.
* doc/autoconf.texi (Common Shell Constructs) <AS_ESCAPE>:
Document the macro.
* NEWS: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-02-19 14:32:36 -07:00
Eric Blake
be5eef442d Fix m4_set speed regression introduced 2008-12-18.
* lib/m4sugar/m4sugar.m4 (_m4_stack_reverse): Alter API to avoid
creating larger argument on each iteration.
(m4_stack_foreach_sep, m4_stack_foreach_sep_lifo)
(_m4_set_contents_2): Adjust all four-argument callers.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-02-12 08:27:18 -07:00
Eric Blake
cfb18d385b Use AC_DEFUN_ONCE for some one-shot AC_PROG macros.
* lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Switch to
AC_DEFUN_ONCE, since this is a one-shot macro.
(AC_PROG_INSTALL): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-02-03 09:37:53 -07:00
Eric Blake
f8fcfad146 Use AC_DEFUN_ONCE for uncontroversial one-shot macros.
* lib/autoconf/headers.m4 (AC_HEADER_ASSERT): Switch to
AC_DEFUN_ONCE, since this is a one-shot macro.
* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Likewise.
* lib/autoconf/general.m4 (AC_CANONICAL_BUILD)
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-28 17:04:52 -07:00
Eric Blake
876b3fbfdd Reduce blank lines in AC_DEFUN_ONCE macros.
* lib/m4sugar/m4sugar.m4 (m4_defun_once): Avoid redundant blank
line when a defun_once macro is required.
(_m4_defun_once): New helper macro, for less memory use.
* tests/m4sugar.at (m4@&t@_require: nested): Adjust test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-28 17:04:43 -07:00
Eric Blake
9c4c7c5ca4 Silence another false positive expand-before-require.
* lib/m4sugar/m4sugar.m4 (_m4_defun_pro_outer)
(_m4_defun_epi_outer, _m4_require_call, m4_provide): Track name
that caused a diversion change, not just diversion number.
(m4_require): Factor...
(_m4_require_check): ...into new macro, which also checks whether
diversion that performed the expansion has been collected.
* tests/m4sugar.at (m4@&t@_require: nested): Enhance test.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-28 15:08:11 -07:00
Eric Blake
aa30765d64 Fix AC_C_RESTRICT for Sun Studio 12 C++.
* lib/autoconf/c.m4 (AC_C_RESTRICT): Newer Sun Studio C provides
__restrict__ rather than _Restrict, which still trips up Sun
Studio 12 C++.
* THANKS: Update.
Reported by Rolf Vandevaart.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-28 09:59:24 -07:00
Eric Blake
65c175502a Fix years in copyright notices.
* lib/m4sugar/m4sugar.m4 (m4_copyright_condense): New macro,
undocumented for now.
* lib/m4sugar/Makefile.am (version.m4): Add m4_PACKAGE_YEAR,
m4_PACKAGE_URL.
(RELEASE_YEAR): New macro, copied from bin/Makefile.am.
* lib/autoconf/general.m4 (_AC_COPYRIGHT_YEARS): New macro.
(AC_COPYRIGHT): Add undocumented third parameter.
(_AC_INIT_COPYRIGHT): Avoid need to bump copyright years.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise.
* lib/autotest/general.m4 (AT_INIT): Likewise.
* lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Likewise.
(AT_COPYRIGHT): Add undocumented third parameter.
* tests/local.at (AT_COPYRIGHT): Don't add an extra copyright
parameter; the generic copyright given by autotest is sufficient
since we are the package that owns autotest.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-28 06:12:52 -07:00
Eric Blake
758f763ddf Use URLs in --help output, part 3: testsuite.
* doc/autoconf.texi (Writing Testsuites): Mention autotest
namespace.
(Writing Testsuites) <AT_INIT>: Mention mandatory macros.
(Making testsuite Scripts): Document AT_PACKAGE_URL.
* tests/Makefile.am (package.m4): Follow our own advice.
* lib/autotest/general.m4 (AT_INIT): Give the user a hint about
package.m4.  Enhance --help output.
(_AT_COPYRIGHT_YEARS): New macro, to make copyright bump easier.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-27 16:58:21 -07:00
Eric Blake
d7cc80491d Use URLs in --help output, part 2: configure.
* lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Bump copyright
date.
(_AC_INIT_PACKAGE): Support optional URL parameter, mapped to
AC_PACKAGE_URL.
(_AC_INIT_DEFAULTS, _AC_INIT_PREPARE): Substitute it.
(_AC_INIT_HELP): Use it in './configure --help' output.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise, for
'./config.status --help'.  Bump copyright date.
* doc/autoconf.texi (Initializing configure) <AC_INIT>: Document
new parameter.
* NEWS: Likewise.
* tests/tools.at (autoheader): Adjust test.
* tests/torture.at (@%:@define header templates)
(Torturing config.status): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-27 16:57:52 -07:00
Eric Blake
9f32bcf860 Improve AC_DEFUN_ONCE semantics.
* lib/m4sugar/m4sugar.m4 (m4_defun_once): Rewrite to be no-op,
rather than warning, on second use, and make sure first use never
occurs out of order.
* tests/m4sugar.at (m4@&t@_require: one-shot initialization):
Enhance test.
* tests/base.at (AC_REQUIRE & AC_DEFUN_ONCE: [Require, expand],
(AC_REQUIRE & AC_DEFUN_ONCE: [Expand, require]): Adjust tests.
* NEWS: Document this.
* doc/autoconf.texi (Macro Definitions) <AC_DEFUN>: Mention
AC_DEFUN_ONCE.
(Prerequisite Macros) <AC_REQUIRE>: Likewise.
(Expanded Before Required): Likewise.
(One-Shot Macros) <AC_DEFUN_ONCE>: Document new semantics.
Reported by Bruno Haible, with suggestion by Paolo Bonzini.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-26 09:55:57 -07:00
Eric Blake
2cc17c497c Fix typos in recent patches.
* lib/m4sugar/m4sugar.m4: Improve m4_defun comments.
* doc/autoconf.texi (Expanded Before Required): Fix typos.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-24 06:33:41 -07:00
Eric Blake
3c75e4549b Revert change to AC_DIR_HEADER.
* lib/autoconf/headers.m4 (AC_DIR_HEADER): Explicitly expanding
AC_HEADER_DIRENT no longer triggers a warning, and helps the user
who decides they don't need the obsolete AC_FUNC_CLOSEDIR_VOID.
Reported by Paolo Bonzini.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-24 06:16:48 -07:00
Eric Blake
76b444921d Silence a false positive expand-before-require case.
* lib/m4sugar/m4sugar.m4 (m4_provide): Track the diversion in
which a macro was provided.
(m4_require): Compare diversion numbers, rather than m4_require
nesting, when determining direct requires.
* tests/m4sugar.at (m4@&t@_require: nested): Test it.
Reported by Ralf Wildenhues, affecting Libtool.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-22 08:08:06 -07:00
Eric Blake
46009205a9 Fix out-of-order expansion with expand-before-require.
* lib/m4sugar/m4sugar.m4 (m4_require): Redundantly expand a
required macro when issuing expand-before-require warning.
* doc/autoconf.texi (Prerequisite Macros): Adjust documentation.
(Expanded Before Required): New node.
* tests/m4sugar.at (m4@&t@_require: nested): Adjust test.
* NEWS: Mention this fix.
Suggested by Bruno Haible.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-21 08:57:42 -07:00
Eric Blake
cf7d7f2e82 Warn if macro is provided before indirectly required.
* lib/m4sugar/m4sugar.m4 (m4_provide): Track the set of all macros
provided since last outermost defun.
(_m4_defun_pro_outer): Empty the set.
(_m4_require_call): Distinguish between direct and indirect
requires, and remove required macros from the set.
(m4_require): Check the set, in order to warn.
* tests/m4sugar.at (m4@&t@_require: nested): Remove xfail, and add
test case for direct requires.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-21 08:39:47 -07:00
Eric Blake
b1ba5448b6 Clean up some bugs caught by preliminary dependency validation.
* lib/autoconf/headers.m4 (AC_DIR_HEADER): Don't invoke
AC_HEADER_DIRENT, since AC_FUNC_CLOSEDIR_VOID requires it.
* lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL)
(_AS_SHELL_SANITIZE): Fix quoting bugs.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-20 10:08:11 -07:00
Eric Blake
91d1870bb4 Speed up m4_require.
* lib/m4sugar/m4sugar.m4 (_m4_divert_dump): Change semantics to
always be defined, as either empty or a number.
(_m4_defun_pro_outer, _m4_defun_epi_outer): Treat _m4_divert_dump
as a stack, rather than a one-shot macro.
(_m4_require_call): Expect third argument to be pre-expanded.
(m4_divert_require, m4_require): Adjust clients accordingly.
* lib/m4sugar/m4sh.m4 (AS_REQUIRE): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-19 07:06:06 -07:00
Eric Blake
064ceeafb9 Make it easier to track diversion bugs.
* lib/m4sugar/m4sugar.m4 (_m4_divert_raw, _m4_undivert): New
internal macros, which are easier to trace than m4_builtin.
(m4_cleardivert, m4_divert, m4_divert_push, m4_divert_pop)
(m4_undivert): Use them.
(_m4_require_call): Likewise.  Use fewer macros.
* lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Fix typo.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-30 08:32:08 -07:00
Bruno Haible
c7c8c45b6f Improve multiarch detection.
* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Make detection of options
indicating a universal build more reliable.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-29 16:19:31 -07:00