* lib/autotest/general.m4 (BANNERS): New named diversion.
(TESTS_END): Diversion no longer used.
(AT_INIT) <at_func_banner, BANNERS>: Factor all banners into a
shell function, which prints only as needed, using an associative
array of banner text from a special diversion.
<PARSE_ARGS_END>: No longer need awk to find banners.
<TESTS>: Banners are no longer processed by main driver loop, so
we no longer need case statement.
(AT_BANNER): Rewrite to populate new diversion.
(AT_SETUP): Each test invokes its own banner. No output is needed
to the TESTS diversion.
* doc/autoconf.texi (Writing Testsuites): Document slight
semantics change.
* tests/autotest.at (AT_BANNERS): Enhance test.
* NEWS: Document AT_BANNER.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_append_uniq): Warn if separator
occurs in string, as duplicates may be added.
(_m4_append_uniq): New helper macro.
(m4_append_uniq_w): New macro.
* lib/autotest/general.m4 (AT_TESTED, AT_KEYWORDS): Fix
duplication bug by using new macro.
(AT_INIT) <at_tested>: Restore newline separators. Invoke tested
programs with stdin redirected, so programs that don't
understand --version won't try to behave interactively.
* tests/autotest.at (Tested programs): Catch this bug.
* tests/m4sugar.at (m4@&t@_append): Test new macro.
* tests/local.at (AT_TESTED): Add m4, perl.
* doc/autoconf.texi (Text processing Macros): Document
m4_append_uniq_w, and update text on m4_append.
* NEWS: Document the addition.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Avoid errors when `.'
is not writable, use 'cp -p' in this case, in the hope that it
will not actually be needed. Still try removing files, in case
of other write errors.
* lib/autoconf/general.m4 (_AC_INIT_SRCDIR): For ac_confdir,
use $as_myself, not $0.
(_AC_INIT_HELP): For --help=recursive, if the subdir does not
exist, try again in the the source tree. This change assumes
that the subpackage configure script is capable of running
--help=recursive in the source tree.
* tests/torture.at (Configuring subdirectories, Deep Package):
Adjust tests to expose both issues, also try invocation as
`sh configure ...' and plain `configure ...' with PATH adjusted.
* NEWS, THANKS: Update.
Report by Hans Ulrich Niedermann.
* lib/m4sugar/m4sugar.m4 (m4_apply, m4_count, m4_dquote_elt)
(m4_echo, m4_make_list): New documented macros.
(_m4_quote, _m4_shift2): New helper macros.
(m4_map): Change semantics to allow calling macro without
arguments.
(m4_map_sep): Likewise. Also change semantics to quote separator,
to match m4_join and m4_append.
(m4_version_unletter): Fix use of m4_map.
* doc/autoconf.texi (Evaluation Macros): Document m4_apply,
m4_count, m4_dquote_elt, m4_echo, m4_make_list.
(Text processing Macros): Mention m4_dquote as a faster
alternative to joining with commas.
(Looping constructs): Document m4_map, m4_map_sep.
* NEWS: Mention new macros.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_text_wrap): Don't expand arguments,
and reduce number of expansions.
* lib/m4sugar/m4sh.m4 (AS_HELP_STRING): Rework to use m4_expand,
and to take indent and wrap column numbers.
* tests/m4sh.at (AS@&t@_HELP_STRING): Update the test.
* doc/autoconf.texi (Pretty Help Strings): Document details about
arguments.
(Text processing Macros): Minor tweaks.
* NEWS: Document this change.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_expand): New macro.
* lib/autotest/general.m4 (AT_SETUP): Use it to preserve
whitespace after single-quoted comma.
* tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Test this.
* NEWS: Revert caveat about semantics change on comma.
* doc/autoconf.texi (Programming in M4): Lighten the warning on
using m4sugar; it is stabilizing.
(Redefined M4 Macros): Touch up wording on M4 builtins.
(Evaluation Macros): Document m4_expand.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_ignore, m4_unquote): New macros.
(m4_version_prereq): Inline constant expansions.
(m4_list_cmp): Reduce number of expansions, by avoiding m4_case.
Rewrite in terms of [] list, not () list.
(_m4_list_cmp, _m4_version_unletter): New helper macros.
(m4_version_unletter): Write wrapper around new implementation to
preserve old semantics.
(m4_version_compare): Pass correct type of list, and avoid
overhead of flattening expressions too early.
(m4_do): Move to be near other quoting macros.
(m4_max, m4_min): Always result in decimal output.
* doc/autoconf.texi (Looping constructs): Add m4_car, m4_cdr.
Move m4_do...
(Evaluation Macros): ...here. Add m4_ignore, m4_unquote.
(Text processing Macros): Move m4_version_compare...
(Number processing Macros): ...to this new node; document m4_cmp,
m4_list_cmp, m4_sign, m4_max, m4_min.
* tests/m4sugar.at (m4@&t@_version_compare): Enhance test, to pick
up on bugs fixed by this patch.
* NEWS: Document new macros.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4: Clean up macro order.
* doc/autoconf.texi (Programming in M4): Lighten the warning on
using m4sugar; it is stabilizing and useful.
(Redefined M4 Macros): Touch up wording on M4 builtins; sort. Add
m4_divert, m4_undivert, __file__, __line__, __oline__.
(Diagnostics): New node, documenting m4_assert, m4_errprintn,
m4_fatal, m4_location, m4_warn.
(Diversion support): New node, documenting m4_divert_push,
m4_divert_pop, m4_divert_text, m4_divert_once.
(Text processing Macros): Sort. Add m4_flatten, m4_join,
m4_newline, m4_strip, m4_text_box, m4_text_wrap.
(Programming in M4sh, Macro Names): Document namespace
limitations. Mention that non-Automake macros should not begin
with `AM_'.
(Reporting Messages): Mark AC_DIAGNOSE, AC_WARNING, and AC_FATAL
as obsolescent.
(Printing Messages): Change cross-reference.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fix comments.
(_AC_OUTPUT_HEADERS_PREPARE): New macro. Rewrite of the config
header machinery for use with awk and placement outside the main
config.status instantiation loop. Retain multi-line defines
through backslash-newline combinations, do not split the script
any more.
(_AC_OUTPUT_HEADER): Simplify accordingly, use $AWK.
(_AC_OUTPUT_MAIN_LOOP): Call _AC_OUTPUT_HEADERS_PREPARE if
needed.
(AC_OUTPUT_MAKE_DEFS): Remove backslash-newline combinations
from define values.
* NEWS: Update.
* tests/torture.at (#define header templates): Extend test by
several more cases: white space before and after `#', macros
with parameters in config.hin and as defines, multi-line macro
values.
(Torturing config.status): Use a define value twice the length
in order to exercise the awk literal string limit.
(Substitute and define special characters): Also try special
delimiter, to exercise the special-case code.
Suggestion by Eric Lemings.
* lib/autotest/general.m4 (AT_SETUP): Only expand description
once; thereafter, use its expansion, properly quoted.
* tests/autotest.at (AT_CHECK_AT_TITLE): Also check macro
expansion with arguments, and check for aligned output.
(AT_CHECK_AT_TITLE_CHAR): Remove XFAILs for tests that now pass.
Add a test for macros with parameters.
* NEWS: Document the semantics change.
* tests/base.at: Fix test titles containing commas.
* tests/compile.at: Likewise.
* tests/tools.at: Likewise.
* tests/torture.at: Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
* doc/autoconf.texi (Text processing Macros): Remove mention of
m4_AUTOCONF_VERSION, and leave m4_PACKAGE_VERSION undocumented
once again.
(Notices): Move AC_PREREQ...
(Versioning): ...to this new section, alongside the new AC_VERSION
alias for the undocumented m4_PACKAGE_VERSION.
* lib/m4sugar/m4sugar.m4 (m4_AUTOCONF_VERSION): Revert change.
* lib/autoconf/general.m4 (AC_VERSION): New macro.
* NEWS: Update to match this rename.
* tests/m4sugar.at (m4@&t@_version_compare): Remove tests of
m4_PACKAGE_VERSION.
* tests/tools.at (autoconf: AC_VERSION): New test.
Suggested by Paolo Bonzini and Benoit Sigoure.
* doc/autoconf.texi (Text processing Macros): Document
m4_version_compare, m4_AUTOCONF_VERSION, m4_PACKAGE_VERSION.
(Redefined M4 Macros): Document m4_ifndef.
* lib/m4sugar/m4sugar.m4 (m4_AUTOCONF_VERSION): New macro; we
can't obsolete m4_PACKAGE_VERSION at this time since Autoconf 1.10
used it while it was undocumented.
* NEWS: Document this change.
* lib/m4sugar/Makefile.am (version.m4): Update copyright dates.
* lib/m4sugar/Makefile.in: Regenerate.
* tests/m4sugar.at (m4@&t@_version_compare): New test.
Reported by Bruno Haible.
* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Inline code
from AC_AIX, AC_GNU_SOURCE, AC_MINIX. Add Interix support.
(AC_AIX, AC_GNU_SOURCE, AC_MINIX): Obsolete, and point to
AC_USE_SYSTEM_EXTENSIONS.
(AC_ISC_POSIX): Obsolete, and point to AC_SEARCH_LIBS.
(AC_XENIX_DIR, AC_IRIX_SUN): Promote proper quoting in AU_DEFUN.
* doc/autoconf.texi (Posix Variants): Reword this section,
emphasizing that AC_USE_SYSTEM_EXTENSIONS is the preferred method,
rather than a series of system-specific checks.
(Obsolete Macros): Add AC_AIX, AC_GNU_SOURCE, AC_ISC_POSIX,
AC_MINIX.
* NEWS: Document this change.
* THANKS: Update.
Reported by Martin Koeppe.
* doc/autoconf.texi: Add anchors to support better
cross-referencing.
(Particular Structures): Move obsolete macros descriptions...
(External Software): Likewise.
(Package Options): Likewise.
(Obsolete Macros): ...to here. Add cross-references to
documentation on replacements.
* NEWS: Mention that these macros have been obsolete for a while
now: AC_STRUCT_ST_BLKSIZE AC_STRUCT_ST_RDEV AC_WITH AC_ENABLE.
AC_CHECK_TYPE, AC_CHECK_TYPES.
* doc/autoconf.texi (Generic types): C types must be type-names
(the C terminology), not type-ids (the C++ term). C++ types
must not be anonymous.
* lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW): Remove special case
for C++; this drops support for anonymous struct and union types,
which were problematic anyway.
* tests/semantics.at (AC_CHECK_HEADERS_NEW): Adjust test to work even
for C++.
* doc/autoconf.texi (C Compiler): Document this. There is a new
extra argument ACTION-IF-UNIVERSAL.
* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Implement this.
Add support for Solaris-style _LITTLE_ENDIAN and _BIG_ENDIAN.
Reindent for sanity's sake.
--disable-option-checking to --help output even when
AC_PRESERVE_HELP_ORDER is not used.
(_AC_INIT_PARSE_ENABLE2): Print warnings using actual --enable or
--with argument, rather than argument with [-.] replaced by
underscores.
* NEWS: Fix typo in previous change; the news was in the
wrong section.
--enable-* and --with-* options.
* doc/autoconf.texi (Option Checking): Renamed from
(Configure Option Checking). Tighten up the wording a bit.
(External Software, Package Options): Cross-reference to Option
Checking, and use this to shorten our section.
* lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Prefer test -n
"$x" to test "x$foo" != x.
* lib/autoconf/status.m4 (AC_OUTPUT): Likewise.
Don't warn if $enable_option_checking is "no".
* lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Initialize
ac_unrecognized_opts to the empty string.
Don't echo the unrecognized opts, as this might mishandle
backslashes or leading -.
(AC_PRESERVE_HELP_ORDER): Put the --disable-option-checking
usage next to the other --disable-FEATURE options in the
help string.
2006-12-18 Steven G. Johnson <stevenj@alum.mit.edu>
* lib/autoconf/general.m4 (_AC_INIT_DEFAULTS, _AC_INIT_PARSE_ARGS):
(_AC_INIT_PARSE_ENABLE2, _AC_INIT_HELP, _AC_ENABLE_IF):
Print warning for unrecognized --with and --enable options
(AC_DISABLE_OPTION_CHECKING): New macro to disable warnings.
* lib/autoconf/status.m4 (AC_CONFIG_SUBDIRS, _AC_OUTPUT_SUBDIRS):
Disable option checking when subdirs are configured.
(AC_OUTPUT): If warnings are enabled, print warning about
unrecognized --with and --enable options at the end of
the configure output (as well as at the beginning).
* doc/autoconf.texi (Option Checking): New node.
Document new option warning functionality.
years and is too hard to maintain now. The last straw was
reported by Jerker Baeck in
<http://lists.gnu.org/archive/html/autoconf/2006-11/msg00102.html>.
* NEWS: AC_FUNC_SETVBUF_REVERSED is now obsolete.
* doc/autoconf.texi (Particular Functions): Move
AC_FUNC_SETVBUF_REVERSED from here...
(Obsolete Macros): ... to here. Say that it does nothing now.
* lib/autoconf/functions.m4 (AC_FUNC_SETVBUF_REVERSED):
Turn into (almost) a no-op.
the number of substituted variables by using awk instead of sed
for the bulk of the substitutions.
* NEWS: Mention this.
* doc/autoconf.texi (Setting Output Variables): `|#_!!_#|' is also
forbidden in the output (and thus input) file.
* lib/autoconf/status.m4 (_AC_AWK_LITERAL_LIMIT): New macro.
(_AC_OUTPUT_FILES_PREPARE): Instead of several sed scripts,
generate just one large awk script for substitutions,
eliminating much of the earlier complexity, while adding some
new complexity. Only expand the substitution templates at
configure time, for smaller configure script size. If
_AC_SUBST_FILES are used, test 'awk' for working getline support
at config.status time. If absent, interpolate through the
shell. The awk script was written with much help
from Paolo Bonzini and Paul Eggert.
(_AC_SED_CMD_NUM, _AC_SED_DELIM_NUM, _AC_SED_FRAG): Removed.
(_AC_SED_FRAG_NUM): Likewise.
(_AC_SUBST_CMDS): Renamed from...
(_AC_SED_CMDS): ...this.
(_AC_OUTPUT_FILE): Use _AC_SUBST_CMDS.
* tests/torture.at (Substitute a 2000-byte string): Also
substitute a line with 1000 words, and a variable with several
long lines.
(Substitute and define special characters): Test awk special
characters, and put substitution input strings `@foo@' in the
output, to test that no recursion happens; test several other
combinations from Paolo Bonzini.
code for --enable, --disable, --with, and --without to...
(_AC_INIT_PARSE_ENABLE): ... a new macro.
* doc/autoconf.texi (Package Options):
* NEWS: Document that AC_ARG_ENABLE allows dots, too.
2006-11-13 Bruno Haible <bruno@clisp.org>
* lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): For --with, --without
options, transliterate also dots to underscores.
(_AC_ENABLE_IF): Transliterate also dots to underscores.
* doc/autoconf.texi (External Software): Document that AC_ARG_WITH's
first argument may also contain dots.