Commit Graph

5173 Commits

Author SHA1 Message Date
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
Paul Eggert
3de08b50f2 Check for 64-bit int errors in HP-UX 10.20 preprocessor.
Problem reported by H.Merijn Brand in
<http://lists.gnu.org/archive/html/bug-tar/2007-10/msg00018.html>.
* lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT):
(AC_TYPE_UNSIGNED_LONG_LONG_INT):
Check that preprocessor handles 64-bit ints, too.
2007-10-16 13:25:57 -07:00
Paul Eggert
a574f37683 Merge branch 'master' of /home/eggert/src/gnu/autoconf-savannah/ 2007-10-16 13:11:38 -07:00
Eric Blake
96a08a7ee4 m4_map is a looping construct.
* lib/m4sugar/m4sugar.m4 (m4_map, _m4_map, m4_map_sep): Move.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-16 12:18:24 -06: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
f3b4cc104e A few more m4sugar improvements, to benefit libtool.
* lib/m4sugar/m4sugar.m4 (m4_bpatsubsts, _m4_shiftn): Reduce size
of expansion by avoiding extra uses of $@.
(m4_shiftn): Avoid extra dnl, and forbid shifting by 0.
(_m4_cdr): New helper macro.
(_m4_map, m4_map_sep): Use it to reduce size of expansion.
(_m4_shift3): New helper macro.
(_m4_foreach): Swap argument order, and use new macro to reduce
size of expansion.
* doc/autoconf.texi (Looping constructs) <m4_shiftn>: Mention that
count must be positive.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-16 06:23:10 -06:00
Eric Blake
d5f5cd5bf3 Fix typo.
* doc/autoconf.texi (Evaluation Macros) <m4_expand>: Fix typo.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-16 06:11:23 -06:00
Ralf Wildenhues
a7f9fc63e8 * doc/autoconf.texi (Portable Shell): Improve description of zsh
4.x function subshell bug with exit and trap.
2007-10-15 23:15:39 +02: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
72431d8c84 Change m4_join to match libtool's ltsugar semantics.
* lib/m4sugar/m4sugar.m4 (m4_join): Just define this, not defun.
Ignore empty arguments, using...
(_m4_join): ...this new helper.
* tests/m4sugar.at (m4@&t@_join): New test.
* doc/autoconf.texi (Text processing Macros): Document new
semantics of m4_join.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-13 11:11:44 -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
Paul Eggert
a03734d05b Merge branch 'master' of /home/eggert/src/gnu/autoconf-savannah/ 2007-10-12 23:29:12 -07:00
Eric Blake
9caf76bfe8 Avoid underfull hbox.
* doc/autoconf.texi (Reporting Messages): Fix underfull hbox.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-12 21:46:10 -06:00
Eric Blake
8ff74bf401 Fix 'make info' after last patch.
* doc/autoconf.texi (Text processing Macros): Fix bad merge.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-12 21:40:10 -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
c9b048ee4d Namespace cleanup.
* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE)
(_AC_OUTPUT_HEADERS_PREPARE): Convert here-doc delimiters into
autoconf namespace.
* doc/autoconf.texi (Programming in M4sugar, Forbidden Patterns)
(Programming in M4sh, Macro Names): Beef up description of
namespaces reserved for autoconf.
* configure: Regenerate.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-12 10:34:27 -06:00
Eric Blake
2857151c76 Speed up execution of subset of testsuite.
* lib/autotest/general.m4 (TEST_FUNCTIONS): New diversion.
(AT_INIT) <at_func_test>: New shell function.
(AT_INIT) <at_myself>: New variable, set to absolute $as_myself.
(AT_INIT) <at_test_source> New variable, names file that holds
current test function definition.
(AT_SETUP): Start the shell function at_func_test_#, into the
TEST_FUNCTIONS diversion.
(AT_CLEANUP): End the shell function.  Simplify the TESTS
diversion to invoke the function.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-12 09:29:10 -06:00
Ralf Wildenhues
cddf173dbc * .gitignore: Ignore tags and TAGS files. 2007-10-11 19:30:24 +02:00
Eric Blake
baa0ce0978 Config header generation followup.
* lib/autoconf/general.m4 (_AC_DEFINE_Q): Check for raw newlines,
which won't work with the preprocessor nor with the awk
implementation.
* tests/torture.at (Define a newline): Test raw newline detection,
removing the XFAIL.
* doc/autoconf.texi (Defining Symbols): Document recent change to
allow backslash-newline.
* THANKS: Update.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-11 08:06:35 -06:00
Ralf Wildenhues
392e227524 * lib/autotest/general.m4: Put function braces in separate line. 2007-10-11 01:49:50 +02:00
Eric Blake
b4df79e1ab Avoid some overhead from m4_defn and m4_popdef.
* lib/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine): Only
pass on first argument, since we are documented that way.
(m4_for, m4_append_uniq, m4_text_wrap): Optimize out defined-ness
check where it is safe to do so.
(m4_append): Likewise, and quote the separator.
(m4_text_box): Likewise, and avoid regex, also be robust to
expansion and quadrigraphs.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-10 16:04:01 -06:00
Eric Blake
45b46a7467 Another AC_DEFINE speedup.
* lib/autoconf/general.m4 (AC_DEFINE_TRACE): Move parameter
elision...
(_AC_DEFINE_Q): ...here, and only do it once.
* lib/autoconf/functions.m4 (AC_CHECK_FUNCS): Avoid overquoting.
* lib/m4sugar/m4sh.m4 (AS_LITERAL_IF): Fix m4_defn overquoting
introduced 2007-10-05.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-10 14:36:27 -06:00
Eric Blake
b2bde204cf Whitespace cleanup.
* lib/autoconf/general.m4: Use consistent indentation.
* configure: Regenerate.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-10 14:32:55 -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
cb1c6f8d0f Fix ChangeLog entry. 2007-10-10 20:01:24 +02:00
Eric Blake
028272af52 Reduce number of forks at startup.
* lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Speed up NLS
sanitization.
* configure: Regenerate.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-10 07:13:39 -06:00
Ralf Wildenhues
f71f30721f Fix ChangeLog entry. 2007-10-10 08:51:34 +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
Ralf Wildenhues
086a722995 * tests/local.at (AT_COPYRIGHT): Bump copyright years. 2007-10-10 07:07:45 +02:00
Eric Blake
2c63638e2b Improve header of bin/autoconf.
* lib/m4sugar/m4sh.m4 (AS_INIT): Add a 'generated from' notice.
* lib/autoconf/general.m4 (_AC_INIT_NOTICE): Override new notice
from M4sh.
* bin/autoconf.as: Put copyright up front in generated file.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-09 17:15:43 -06:00
Eric Blake
c09a86f9b9 Fix font-lock for bin/autoconf.
* bin/autoconf.as (exit_missing_arg): Font-lock tweak.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-09 16:06:44 -06:00
Ralf Wildenhues
037693bc20 Document `uninstall' in INSTALL.
* doc/install.texi (Basic Installation): Document `uninstall'.
* INSTALL: Regenerate.
Suggestion by Roberto Bagnara.
2007-10-09 21:24:39 +02:00
Paul Eggert
53c80681e4 * doc/autoconf.texi (Limitations of Usual Tools): V7 awk had 'index'. 2007-10-08 15:15:17 -07:00
Paul Eggert
1e0680634d * doc/autoconf.texi (Limitations of Usual Tools): V7 awk had 'index'. 2007-10-08 15:14:25 -07:00
Paul Eggert
f4349f5218 Adjust doc. to match latest gnulib.
* build-aux/texinfo.tex: Sync from gnulib.
* doc/standards.texi: Likewise.
* doc/autoconf.texi (Copying This Manual): Rename to "GNU Free
Documentation License" and remove the subsection.  This simplifies
the manual a bit and is more like what other GNU projects do
nowadays.
2007-10-08 15:08:10 -07:00
Eric Blake
186b39ed5e Use recent changes.
* configure: Regenerate.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-08 14:34:12 -06:00
Eric Blake
94a9faded7 Fix regression in m4_text_wrap from 2007-10-05.
* lib/m4sugar/m4sugar.m4 (m4_max, m4_min): New macros.
(m4_sign): Sort.
(m4_text_wrap): Fix off-by-one error in rewrite from m4_for to
m4_format.
* lib/autotest/general.m4 (AT_SETUP): Avoid negative width.
* tests/autotest.at (Long test title, Longer test title): Test
this fix, beyond what AS_HELP_STRING already tests.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-08 14:09:22 -06:00
Eric Blake
a83ac461c6 Avoid m4 warnings on bad m4_format usage.
* lib/m4sugar/m4sugar.m4 (m4_text_wrap): Use %*s, in case width
evaulates to 0.
* lib/autotest/general.m4 (AT_ordinal): Likewise; also ensure that
enough arguments are provided.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-10-08 10:46:21 -06:00
Paolo Bonzini
32680ce83e document shell function portability
2007-10-06  Paolo Bonzini  <bonzini@gnu.org>

        * doc/autoconf.texi (Shell portability): Document shell function
        portability.

Signed-Off-By:  Paolo Bonzini  <bonzini@gnu.org>
2007-10-06 11:26:20 +02:00
Paolo Bonzini
1020cacbe3 autotest speed improvements
2007-10-06  Paolo Bonzini  <bonzini@gnu.org>

	* lib/autotest/general.m4 (AT_INIT): Add at_func_diff_devnull,
	at_func_check_skip, at_func_check_status, at_func_filter_trace,
	at_func_log_failure shell functions.  Use test -s to avoid
	useless diff invocations.
	(AT_SETUP): Define AT_captured_files to empty.
	(AT_DIFF_STDERR(*), AT_DIFF_STDOUT(*)): New, extracted from _AT_CHECK.
	(_AT_CHECK): Replace m4_case with m4_ifdef/m4_indir.  Use all
	the shell functions.

Signed-Off-By:  Paolo Bonzini  <bonzini@gnu.org>
2007-10-06 11:26:14 +02:00
Paul Eggert
f0e5324fd5 Credit S. G. Johnson for the 2007-05-21 OpenMP patch. 2007-10-05 19:35:46 -07:00
Paul Eggert
df45b2a924 Don't assume "." is writeable, for commands like "autoconf --version".
* lib/m4sugar/m4sh.m4 (_AS_PATH_SEPARATOR_PREPARE): Use a
different heuristic instead, one that doesn't rely on creating
files.
2007-10-05 15:31:06 -07:00
Paul Eggert
c8765d53a0 * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Handle "///"
correctly.
2007-10-05 13:52:01 -07:00
Jim Meyering
aa043a7b4e Avoid makeinfo warnings.
* doc/autoconf.texi (Redefined M4 Macros): Add a `,' after @xref.
(Looping constructs): Add ` ' after @defmac'd name, m4_do.
2007-10-05 20:16:30 +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