Commit Graph

5764 Commits

Author SHA1 Message Date
Ralf Wildenhues
656660af9f Add index for config.site.
* doc/autoconf.texi (Site Defaults): Add index for config.site.
* THANKS: Update.
Report by Stephen P. Schaefer.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-02-14 21:17:07 +01: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
e8e30e268d Mention new AC_DEFUN_ONCE clients.
* NEWS: Mention recent semantic changes.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-02-05 06:12:24 -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
bf9349266b Mention that packagers should not pre-set CFLAGS.
* doc/autoconf.texi (Preset Output Variables) <CFLAGS>: Copy
advice given by automake on handling variables reserved by GNU
Coding Standards.
Reported by Karl Berry.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-02-03 09:15:54 -07:00
Eric Blake
20dd02aa3f Document lib64 in config.site.
* doc/autoconf.texi (Site Defaults): Fix typo in FHS sample file.
Mention use of lib64.
* THANKS: Update.
Reported by Tom Browder, with help from Peter Breitenlohner.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-02-03 09:01:52 -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
c875bf7a97 Use URLs in --help output, part 1: autoconf executables.
* bin/autoconf.as (usage): Make output consistent with recent
change in gnulib version-etc module.
* bin/autoheader.in ($help): Likewise.
* bin/autom4te.in ($help): Likewise.
* bin/autoreconf.in ($help): Likewise.
* bin/autoscan.in ($help): Likewise.
* bin/autoupdate.in ($help): Likewise.
* bin/ifnames.in ($help): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-27 14:13:50 -07:00
Peter Breitenlohner
9f28c6e656 Quote traced macros passed from autom4te to M4.
* bin/autom4te (handle_m4): Apply shell_quote to macro names.
* tests/tools.at (autom4te --trace and unusual macro names): New
test.
* THANKS: Update.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-27 09:28:27 -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
34e2c8d548 Improve AC_REQUIRE documentation.
* doc/autoconf.texi (Macro Definitions) <AC_DEFUN>: Add @defmac,
and mention interaction with AC_REQUIRE.
(Prerequisite Macros) <AC_REQUIRE>: Give more detail on user
ordering constraint bug, and how to fix it.
* tests/m4sugar.at (m4@&t@_require: nested): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-19 07:09:57 -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
ea20cd4c87 Avoid underfull hbox.
* doc/autoconf.texi (Installation Directory Variables): Reword to
fit on line.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-17 12:35:33 -07:00
Ralf Wildenhues
fae0bc2352 Ignore `set -e'-related failure of NetBSD sh.
* tests/m4sh.at (AS@&t@_EXIT): Skip test if (NetBSD) shell
fails to finish EXIT trap after set -e.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-01-14 07:37:51 +01:00
Eric Blake
8aa9813801 Maintainer cleanups.
* cfg.mk (web-manual): Use new feature of gendocs.
(fetch): Fetch gendocs.
* Makefile.am (EXTRA_DIST): Distribute new file.
* doc/Makefile.am (EXTRA_DIST): Likewise.
* .gitattributes: Ignore whitespace in upstream files.
* HACKING (Other web updates): Update Free Software Directory
instructions.
(Upload): No longer mention xdelta.
* maint.mk (xd-delta): Likewise.
* build-aux/gendocs.sh: New upstream file.
* doc/gendocs_template: Likewise.
* build-aux/announce-gen: Resync from upstream.
* build-aux/config.guess: Likewise.
* build-aux/config.sub: Likewise.
* build-aux/gnupload: Likewise.
* build-aux/texinfo.tex: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-01-06 08:55:54 -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
William Pursell
b7b3a0029c Use AS_CASE in documented example.
* doc/autoconf.texi (Using the System Type): Use AS_CASE in
example instead of raw case.

Signed-off-by: William Pursell <bill.pursell@gmail.com>
2008-12-29 06:53:19 -07:00
Eric Blake
5f85192b80 Make m4_dumpdef more useful with M4 1.6.
* lib/m4sugar/m4sugar.m4 (_m4_dumpdef): New macro.
(m4_init): Install it for new enough m4.
* tests/m4sugar.at (m4@&t@_dumpdef): Enhance test.
* doc/autoconf.texi (Redefined M4 Macros) <m4_dumpdef>: Mention
lack of sorting.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-23 21:17:29 -07:00
Bruno Haible
0b31661907 Improve INSTALL for HP-UX.
* doc/install.texi (Particular Systems): For HP-UX, also recommend
-D_XOPEN_SOURCE=500. Needed for the declaration of mbstate_t on
HP-UX 11.11.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-23 21:09:21 -07:00
Bruno Haible
192ecc0b05 Improve INSTALL for Haiku.
* doc/install.texi (Particular Systems): Add a recommendation
which prefix to use on Haiku.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-22 22:08:59 -07:00
Eric Blake
83f29e85bb Fix typo in previous commit.
* doc/autoconf.texi (Set manipulation Macros) <m4_set_map_sep>:
Fix typo.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-19 14:49:18 -07:00
Eric Blake
7f4d002958 Document some recently added macros.
* lib/m4sugar/m4sugar.m4 (m4_map_args_w): Add optional sep
parameter.
* doc/autoconf.texi (Looping constructs) <m4_map_args_sep>
<m4_map_args_w, m4_stack_foreach, m4_stack_foreach_sep>: Document
new macros.
(Set manipulation Macros) <m4_set_map_sep>: Likewise.
* tests/m4sugar.at (m4@&t@_stack, M4 loops): Enhance tests.
* NEWS: Document new macros.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-19 14:06:46 -07:00
Eric Blake
44579b8316 Fix separator in m4_stack_foreach_sep.
* lib/m4sugar/m4sugar.m4 (_m4_stack_reverse): Separate separator
from prefix.
* tests/m4sugar.at (m4@&t@_stack): Enhance test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-18 17:20:41 -07:00
Eric Blake
59f80f3aea Mention limitation of M4 1.4.x on builtin tokens.
* doc/autoconf.texi (Redefined M4 Macros) <m4_dumpdef>: Document
ramification of M4 1.4.x's inability to pass builtin tokens
through text macros.
(Evaluation Macros) <m4_curry>: Likewise.
* tests/m4sugar.at (m4@&t@_defn): Enhance test.
* NEWS: Mention subtle change in m4_dumpdef semantics.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-18 15:55:58 -07:00
Eric Blake
96ab16be4a Document m4_version_prereq.
* doc/autoconf.texi (Number processing Macros)
<m4_version_prereq>: Add documentation.
* NEWS: Mention it.
Reported by Bruno Haible.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-18 06:44:59 -07:00
Jim Meyering
9077bf12d8 AC_HEADER_ASSERT: don't say assertions are disabled when they're not
* lib/autoconf/headers.m4 (AC_HEADER_ASSERT): Do not make configure
report "checking whether to enable assertions... no", when they are
in fact enabled.  This is solely a bug in the output of configure.
In spite of saying "no", NDEBUG was not defined in that case.
Also, as noted by Eric Blake, leave assertions enabled upon
--enable-assert=INVALID.
2008-12-10 16:55:07 +01:00
Eric Blake
0aae415c0c Fix m4_location inside m4_wrap with m4 1.4.5.
* lib/m4sugar/m4sugar.m4 (m4_undefine): Redefine m4_location
inside wrapped text if older m4 is detected.
Reported by William Pursell.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-09 10:47:19 -07:00
William Pursell
276044d355 Fix AC_HEADER_ASSERT w.r.t. --enable-assert.
* lib/autoconf/headers.m4 (AC_HEADER_ASSERT): Honor --enable-assert,
rather than treating it as a synonym for --disable-assert.
* NEWS: Document the fix.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-08 16:30:50 -07:00
Paolo Bonzini
c32b3caff4 Fix AC_HEADER_ASSERT not to treat --enable-assert and --disable-assert the same.
* lib/autoconf/headers.m4 (AC_HEADER_ASSERT): Check value of $enableval.
2008-12-08 22:13:25 +01:00
William Pursell
fb069ddf29 Fix some typos and grammatical errors in documentation.
* doc/autoconf.texi: Clean up some bad use of English.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-05 07:22:03 -07:00
Eric Blake
fd651ae835 Improve AC_STATE_SAVE.
* tests/local.at (AC_STATE_SAVE): Avoid ls -1, and use one less
process by hoisting the uniqueness check into sed.
* doc/autoconf.texi (Limitations of Usual Tools) <ls>: Mention
MacOS bug.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-03 20:22:01 -07:00
Eric Blake
af7366502f Avoid MacOS readdir bug in testsuite.
* tests/local.at (AC_STATE_SAVE): Avoid spurious failures due to
duplicated ls entries.
* THANKS: Update.
Reported by Bruce Dugan and others.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-12-02 11:15:55 -07:00
Ralf Wildenhues
5857d07c98 Hide `set -m' error message, for zsh.
* lib/autotest/general.m4 (AT_JOB_FIFO_FD): Hide zsh 4.3.4
error messages about `set -m'.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-11-29 10:57:00 +01:00
Ralf Wildenhues
36ee23e298 Fix a couple of test failures with dash.
* tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Normalize
exit status of `cd'.
* tests/m4sh.at (AS_MESSAGE_LOG_FD): Remove script before
regeneration, to avoid timing effects.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-11-27 20:02:34 +01:00
Eric Blake
580ada8c2e Add m4_cleardivert.
* lib/m4sugar/m4sugar.m4 (m4_cleardivert): New macro.
* lib/autotest/general.m4 (AT_INIT): Use it.
* lib/autoconf/general.m4 (_AC_INIT_NOTICE): Likewise.
* tests/m4sugar.at (m4@&t@_divert_stack): Test it.
* doc/autoconf.texi (Diversion support) <m4_cleardivert>: Document
it.
* NEWS: Likewise.
Suggested by Paolo Bonzini.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-25 09:28:43 -07:00
Eric Blake
fb70cde184 Add safety check for m4_expand vs. diversions.
* lib/m4sugar/m4sugar.m4 (m4_expand): Make more robust against
diverted text.
* doc/autoconf.texi (Evaluation Macros) <m4_expand>: Document new
safety check.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-25 09:10:25 -07:00
Eric Blake
b74085770f Fix typo in AS_MESSAGE_LOG_FD patch.
* lib/m4sugar/m4sh.m4 (AS_ERROR): Check correct condition.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-24 06:28:56 -07:00