Commit Graph

485 Commits

Author SHA1 Message Date
Ralf Wildenhues
883c8994f1 * NEWS: Fix typo.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-08-22 18:12:38 +02:00
Eric Blake
aeff96ce94 Fix m4_map regression from 2007-10-16.
* lib/m4sugar/m4sugar.m4 (_m4_apply): New macro.
(m4_map): Ignore empty sublists.  For a list consisting of only an
empty sublist, this restores 2.61 behavior of being a no-op.
(m4_map_sep): Likewise, and expand separator.
(m4_mapall, m4_mapall_sep): New macros, to regain 2.62 behavior.
(_m4_map): Rewrite, to be common base for all four variants.
* lib/m4sugar/foreach.m4 (_m4_map): Adjust to new prototype.
* tests/m4sugar.at (m4@&t@_map): Add tests.
* doc/autoconf.texi (Looping constructs) <m4_map>: Document new
macros, and mention ramifications of expanded separator.
* NEWS: Mention the change.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-08-15 07:06:39 -06:00
Ralf Wildenhues
9379b7024c Fix AC_*_TARGET_TOOL macros.
* lib/autoconf/programs.m4 (AC_PATH_TARGET_TOOL)
(AC_CHECK_TARGET_TOOL, AC_CHECK_TARGET_TOOLS): Require, do not
warn about previous AC_CANONICAL_TARGET.
(AC_CHECK_TARGET_TOOL): Add missing `$' making the macro
unusable in the non-cross-compiling case.
* NEWS, THANKS: Update.
Report by Dave Erickson.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-08-14 23:30:45 +02:00
Eric Blake
ce0298d64e Optimize m4_bmatch.
* lib/m4sugar/foreach.m4 (m4_bmatch): Provide linear
implementation for m4 1.4.x.
* tests/m4sugar.at (m4@&t@_bmatch): New test.
(recursion): Test the linear nature.
* NEWS: Document the fix.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-08-12 15:29:39 -06:00
Eric Blake
0b2774646f Fix autoheader 2.62 regression on AC_DEFINE([__EXTENSIONS__]).
* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Use a
unique key for the AH_VERBATIM.
* tests/c.at (AC_USE_SYSTEM_EXTENSIONS): New test.
* NEWS: Mention the fix.
Reported by Andreas Schwab, analyzed by Stepan Kasal.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-08-06 18:39:29 -06:00
Eric Blake
694606d338 Add linear m4_cond for m4 1.4.x.
* lib/m4sugar/m4sugar.m4 (m4_cond): Split into...
(_m4_cond): ...this, for fewer macros per iteration.
* lib/m4sugar/foreach.m4 (_m4_cond): New implementation.
* tests/m4sugar.at (recursion): Test it.
* NEWS: Document the linear guarantee.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-08-06 09:57:08 -06:00
Eric Blake
8d81fd7f28 Add linear m4_bpatsubsts for m4 1.4.x.
* lib/m4sugar/m4sugar.m4 (m4_bpatsubsts): Match documentation
about anchors, even for only one substitution.
* lib/m4sugar/foreach.m4 (_m4_bpatsubsts): New implementation.
* doc/autoconf.texi (Conditional constructs) <m4_bpatsubsts>:
Clarify behavior with regard to quoting.
* tests/m4sugar.at (recursion): Test scaling of m4_bpatsubsts.
(m4@&t@_bpatsubsts): New test.
* NEWS: Document the linear guarantee.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-07-29 20:37:30 -06:00
Eric Blake
4766c77f42 Add m4_reverse, and improve m4_list_cmp.
* lib/m4sugar/m4sugar.m4 (m4_reverse): New macro.
(m4_list_cmp): Rewrite to give linear behavior with M4 1.6 on an
m4_reverse'd list.
* lib/m4sugar/foreach.m4 (m4_reverse): Add the M4 1.4.x
counterpart.
* tests/m4sugar.at (recursion): Test it.
* doc/autoconf.texi (Evaluation Macros) <m4_reverse>: Document
it.
(Text processing Macros) <m4_append>: Cross-reference to m4_set.
* NEWS: Mention new macro.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-07-29 07:12:26 -06:00
Eric Blake
3f1a601013 Implement O(n) unique element set creation.
* lib/m4sugar/m4sugar.m4 (m4_set_add, m4_set_add_all)
(m4_set_contains, m4_set_contents, m4_set_delete)
(m4_set_difference, m4_set_dump, m4_set_empty, m4_set_foreach)
(m4_set_intersection, m4_set_list, m4_set_listc, m4_set_remove)
(m4_set_size, m4_set_union): New macros.
* lib/m4sugar/foreach.m4 (m4_set_add_all): Add O(n) fallback for
m4 1.4.x.
* lib/autoconf/general.m4 (_AC_INIT_DEFAULTS, AC_SUBST): Use
new m4_set API for the set most likely to be large.
* doc/autoconf.texi (Set manipulation Macros): New node.
* NEWS: Mention new macros.
* tests/m4sugar.at (m4@&t@_set): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-07-28 06:35:34 -06:00
Eric Blake
dbb9fe36bf Provide O(n) replacement macros for M4 1.4.x.
* lib/m4sugar/foreach.m4: New file.
(m4_foreach, m4_case, _m4_shiftn, m4_do, m4_dquote_elt, _m4_map)
(m4_join, m4_joinall, m4_list_cmp, _m4_minmax): Replace m4sugar
macros based on $@ recursion [fast on M4 1.6, but quadratic on M4
1.4.x] with versions based on m4_for/m4_foreach [slow on 1.6, but
linear on 1.4.x].
* lib/m4sugar/m4sugar.m4 (m4_init): Dynamically load new file if
older M4 is assumed.
(m4_map_sep): Optimize.
(m4_max, m4_min): Refactor, by adding...
(_m4_max, _m4_min, _m4_minmax): ...more efficient helpers.
(m4_defn, m4_popdef, m4_undefine): Use foreach recursion.
* lib/m4sugar/Makefile.am (dist_m4sugarlib_DATA): Distribute new
file.
* tests/m4sugar.at (M4 loops): Add a stress test that takes
forever if m4_foreach and friends are quadratic.
* NEWS: Mention this.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-07-25 17:42:29 -06:00
Eric Blake
36d8106f6d Support multiple arguments to m4_defn, m4_popdef, and m4_undefine.
* lib/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine): Loop
through all variables, per POSIX and newer m4.
(_m4_text_wrap): Exploit the looping capabilities.
* tests/m4sugar.at (m4@&t@_defn): Test this.
* NEWS: Document it.
* doc/autoconf.texi (Redefined M4 Macros) <m4_defn, m4_popdef>
<m4_undefine>: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-07-19 13:11:45 -06:00
Eric Blake
65ff0e8f88 Add m4_joinall.
* lib/m4sugar/m4sugar.m4 (m4_joinall, _m4_joinall): New macros.
* tests/m4sugar.at (m4@&t@_join): Test them.
* doc/autoconf.texi (Text processing Macros) <m4_join>: Document
m4_joinall.
* NEWS: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-07-18 20:18:37 -06:00
Eric Blake
ebe1f38cba Revert m4_prepend; it is less efficient, and unused by bison.
* lib/m4sugar/m4sugar.m4 (m4_prepend, m4_prepend_uniq)
(m4_prepend_uniq_w): Delete addition from 2008-07-11.
(_m4_grow_uniq_1): Rename back...
(_m4_append_uniq): ...to this.
* NEWS: Revert NEWS blurb.
* doc/autoconf.texi (Text processing Macros) <m4_prepend>: Delete.
* tests/m4sugar.at (m4@&t@_prepend): Delete.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-07-16 14:47:46 -06:00
Eric Blake
8d6a868692 Inherit improvements from bison's fork of m4sugar.
* lib/m4sugar/m4sugar.m4 (m4_PACKAGE_VERSION): Ignore failure to
find version.texi, since bison does not provide it.
(m4_prepend): Add new macro, from bison.
(m4_prepend_uniq, m4_prepend_uniq_w): Add new macros, for
completeness.
(_m4_append_uniq): Rename...
(_m4_grow_uniq_1): ...to this to share implementation, and
optimize initial assignment.
(m4_append_uniq_w): Adjust caller.
* NEWS: Document new macros.
* doc/autoconf.texi (Text processing Macros) <m4_append>: Mention
speed consideration.
<m4_prepend>: Document the new prepend variants.
* tests/m4sugar.at (m4@&t@_prepend): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-07-11 11:14:46 -06:00
Ralf Wildenhues
c87512b5ae Fix '#undef variable /* comment */' transform in config headers.
* lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS_PREPARE): For
undefined preprocessor macros that are followed by a comment
in the header template, do not create nested comments in the
output.
* tests/torture.at (@%:@define header templates): Extend test.
* NEWS: Update.
Report by Karsten Hopp <karsten@redhat.com>.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-06-17 08:42:14 +02:00
Eric Blake
7f53c24967 Mark AC_TYPE_SIGNAL as obsolete in NEWS, too.
* NEWS: Mention the change.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-06-09 06:30:17 -06:00
Eric Blake
7758a34286 Allow lib64 as a default X library location.
* lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF): Add lib64.
* NEWS: Mention the change.
* THANKS: Update.
Reported by Brad Walker.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-06-09 06:19:17 -06:00
Eric Blake
3ac7ceb0c2 Fix regression in AT_KEYWORDS([Macro]), from 2007-10-18.
* lib/autotest/general.m4 (AT_KEYWORDS): Expand argument prior to
converting it to lower case.
* tests/autotest.at (Keywords and ranges): Test this.
* NEWS: Document the fix.
* THANKS: Update.
Reported by Karsten Hopp.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-06-05 15:18:11 -06:00
Eric Blake
4d953cea64 Allow unbalanced () in m4_expand.
* lib/m4sugar/m4sugar.m4 (m4_expand, _m4_expand): Use more complex
quotes.
(m4_noquote, _m4_split): Use consistent complex quote.
* tests/autotest.at (Left paren, Right paren): Test this.
(Parentheses): Ensure new quadrigraphs still work.
(AT_CHECK_AT_TITLE_CHAR): All title char tests exercise m4_expand.
* NEWS: Mention the fix.
* doc/autoconf.texi (Quadrigraphs): Revert mention of macros that
require quadrigraphs for ().
(Evaluation Macros) <m4_expand>: Relax the restriction against
unbalanced ().
(Pretty Help Strings) <AS_HELP_STRING>: Likewise.
(Writing Testsuites) <AT_SETUP>: Likewise.
Reported by Joel E. Denny, fix suggested by Noah Misch.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-04-23 09:32:05 -06:00
Eric Blake
c60735fbb8 Support unbalanced () in AT_SETUP by adding two new quadrigraphs.
* bin/autom4te.in (handle_output): Substitute @{:@ and @:}@.
(handle_traces): Likewise.
* lib/m4sugar/m4sugar.m4 (m4_qlen): Account for new quadrigraphs.
* tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Add new tests.
* doc/autoconf.texi (Quadrigraphs): Document them.
(Evaluation Macros) <m4_expand>: Enhance documentation.
(Text processing Macros) <m4_text_box>: Document cases where
quadrigraphs can help for problemetic unbalanced parentheses.
(Pretty Help Strings) <AS_HELP_STRING>: Likewise.
(Writing Testsuites) <AT_SETUP>: Likewise.
(Limitations of Builtins) <case>: Consolidate text on unbalanced
parentheses, and add an example of creative comments.
* NEWS: Document the addition.
Reported by Joel E. Denny.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-04-22 16:28:14 -06:00
Ralf Wildenhues
ee2d064528 * NEWS: Post-release update.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-04-13 15:06:31 +02:00
Eric Blake
45f13e99f7 Release Version 2.62.
* NEWS: Mention the release.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-04-05 17:04:50 -06:00
Eric Blake
a91e2a71d2 Use GPLv2+ plus exception as license for release.
Return back to GPLv2+, until the text of the exceptions is
finalized, reverting the change from 2007-07-03 and the first
part of the change from 2007-07-20.

Also:
* COPYING: Revert to GPLv2.
* COPYINGv3: New file, since some auxiliary build tools, used for
building autoconf and not installed, are GPLv3.
* Makefile.am (EXTRA_DIST): Distribute COPYINGv3.
* NEWS: Remove mention of GPLv3.
* README: Clarify situation regarding GPLv3.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-04-05 17:04:48 -06:00
Eric Blake
b580f54e11 Recommend the just-released M4 1.4.11.
* NEWS: Update recommendation.
* README: Likewise.
* doc/autoconf.texi (Introduction): Likewise.
* m4/m4.m4 (AC_PROG_GNU_M4): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-04-02 13:21:33 -06:00
Ralf Wildenhues
4503a1da11 Warn, not fail on whitespace-only precious variable differences.
* lib/autoconf/general.m4 (_AC_ARG_VAR_VALIDATE): Output
precious variable differences less ambiguous with `ugly-quotes'.
If their settings differ only in whitespace, do not fail, but
reuse the old value.
* tests/torture.at (AT_CHECK_AC_ARG_VAR): Extend macro to allow
an optional status and expected-warning argument.  Fix m4
quotation for initial value.
(AC_ARG_VAR): Also test for whitespace-only differences, and
that the old value is retained in this case.
* doc/autoconf.texi (Setting Output Variables): Document this.
* NEWS: Update.
Report and initial patch by Paolo Bonzini.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-03-26 06:55:22 +01:00
Eric Blake
39ed7a3e19 Tweak m4_wrap to force FIFO or LIFO semantics.
* lib/m4sugar/m4sugar.m4 (m4_wrap): Override M4 implementation.
(m4_wrap_lifo, _m4_wrap): New macros.
* lib/m4sugar/m4sh.m4 (AS_INIT): Combine all cleanup into known
order, prior to m4sugar's.
(_AS_DETECT_BETTER_SHELL): Use cleanup parameter, rather than
m4_wrap.
* lib/autotest/general.m4 (AT_INIT): Combine all cleanup into
known order, prior to m4sh's.
* doc/autoconf.texi (Diagnostic Macros) <m4_fatal>: Document
argument.
(Redefined M4 Macros) <m4_wrap>: Rewrite documentation to match
new behavior.
* tests/m4sh.at (AS_INIT cleanup): New test.
* NEWS: Document the change.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-03-11 18:58:31 -06:00
Ralf Wildenhues
af562c9a73 autoreconf -m now honors $MAKE.
* bin/autoreconf.in ($run_make): Renamed from ...
($make): ... this.  Use now as command to run `make',
overridden by $MAKE.  Document this in --help output.
* doc/autoconf.texi (autoreconf Invocation): Document
all environment variables honored by autoreconf.
* NEWS: Update.
Report by Paul Eggert.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-03-03 23:53:44 +01:00
Eric Blake
b91a600e7f Add 'testsuite -C dir'.
* lib/autotest/general.m4 (_AT_ARG_OPTION): Move missing argument
detection...
(AT_INIT) <PARSE_ARGS_END>: ...here, since -k always takes
argument.
<DEFAULTS>: Delay computation of variables based on $at_dir...
<PREPARE_TESTS>: ...to here, since -C can change $at_dir.
<TESTS>: Re-invoke via absolute name, since -C may be in effect.
<PARSE_ARGS>: Parse new option.
<HELP_TUNING>: Document it.
* tests/autotest.at (Choosing where testsuite is run): New test
for this feature.
(Keywords and ranges): Add test for missing -k argument.
* NEWS: Document this.
* doc/autoconf.texi (testsuite Invocation): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-01-28 06:57:46 -07:00
Ralf Wildenhues
4380a86978 AC_PROG_INSTALL: require installation of multiple files.
* lib/autoconf/programs.m4 (AC_PROG_INSTALL): Require that
`install -c file1 file2 dir' works.
* doc/autoconf.texi (Particular Programs): Document this.
* NEWS: Update.
2008-01-22 07:00:44 +01:00
Ralf Wildenhues
feef9e7e7e New config files output variable `top_build_prefix'.
* lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Substitute
`top_build_prefix'.
* doc/autoconf.texi (Preset Output Variables): Document it.
* NEWS: Update.
Report by Bob Friesenhahn.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2007-11-09 07:51:19 +01:00
Eric Blake
f034d89307 Improve AT_BANNER handling.
* 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>
2007-10-19 06:29:10 -06:00
Eric Blake
5b6f53e441 Fix AT_TESTED, AT_KEYWORDS.
* 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>
2007-10-18 09:46:19 -06:00
Eric Blake
f2ea75eb03 Add m4_combine, based on Libtool's lt_combine.
* lib/m4sugar/m4sugar.m4 (m4_combine): New macro.
* doc/autoconf.texi (Text processing Macros): Document it.
* NEWS: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-17 07:13:00 -06:00
Ralf Wildenhues
bbb9c9628d Fix `configure --help=recursive' in unconfigured/read-only trees.
* 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.
2007-10-16 23:50:03 +02:00
Eric Blake
33239cbd38 Fix m4_map, and add some more utility macros.
* 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>
2007-10-16 12:00:00 -06:00
Eric Blake
10a850e84a Enhance AS_HELP_STRING.
* 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>
2007-10-15 12:18:24 -06:00
Eric Blake
fd1344033b Fix 2007-10-03 regression with AT_SETUP([a, b]).
* 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>
2007-10-15 08:43:21 -06:00
Eric Blake
6e1d6e2c5b Make AC_PREREQ faster and more robust.
* 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>
2007-10-13 08:09:08 -06:00
Eric Blake
b171ca4ed3 Some more m4sugar documentation.
* 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>
2007-10-12 15:55:56 -06:00
Eric Blake
be938d2dec Document interaction of recent m4_append change with Libtool HEAD.
* lib/m4sugar/m4sugar.m4 (m4_append): Document semantics change.
(m4_append_uniq): Add new parameters, based on lt_append_uniq.
* tests/m4sugar.at (m4@&t@_append): New test.
* NEWS: Document semantics change.
* doc/autoconf.texi (Text processing Macros): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-12 15:01:31 -06:00
Eric Blake
408ce204ae s/AC_VERSION/AC_AUTOCONF_VERSION/.
* doc/autoconf.texi (Versioning): Change the name.
* NEWS: Likewise.
* lib/autoconf/general.m4 (AC_AUTOCONF_VERSION): Likewise.
* tests/tools.at (autoconf: AC_AUTOCONF_VERSION): Likewise.
Suggested by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-12 12:14:03 -06:00
Eric Blake
688521c2da * NEWS: Announce recent round of speed optimizations.
Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-10 14:11:05 -06:00
Ralf Wildenhues
bf518ad043 * NEWS: Announce shell function usage in Autotest. 2007-10-10 20:02:03 +02:00
Ralf Wildenhues
c0b647a8c7 Use awk for config header generation.
* 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.
2007-10-10 07:18:34 +02:00
Eric Blake
35b65ec05c Resolve Python issue 1676135 regarding configure directory args.
* lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Strip trailing
slashes from directory arguments.
* tests/base.at (configure directories): New test.
* doc/autoconf.texi (Installation Directory Variables): Document
the change.
* NEWS: Likewise.
* THANKS: Update.
Reported by Björn Lindqvist.
http://bugs.python.org/issue1676135

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-05 11:57:09 -06:00
Eric Blake
8b299b6d82 Remove some XFAILs, and make AT_SETUP output line up.
* 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>
2007-10-03 16:20:45 -06:00
Eric Blake
f444a9fa8e Fix underquotation in AS_HELP_STRING.
* lib/m4sugar/m4sh.m4 (AS_HELP_STRING): Don't underquote lhs
argument.
* lib/m4sugar/m4sugar.m4 (m4_text_wrap): Don't underquote
first-prefix argument.
* tests/m4sh.at (AS@&t@_HELP_STRING): Test this fix.
* NEWS: Document AS_HELP_STRING fix.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-09-27 19:29:49 -06:00
Eric Blake
5547b4a0f2 Provide AC_VERSION, not m4_AUTOCONF_VERSION.
* 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.
2007-09-15 12:41:08 +00:00
Eric Blake
b6ef3cc579 Publish m4_ifndef, m4_version_compare, m4_AUTOCONF_VERSION.
* 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.
2007-09-13 03:21:18 +00:00
Eric Blake
6add6e92a6 Centralize all system extensions checks.
* 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.
2007-09-11 17:13:13 +00:00