]> git.ipfire.org Git - thirdparty/autoconf.git/log
thirdparty/autoconf.git
16 years agoAdd traces for AM_SILENT_RULES.
Ralf Wildenhues [Tue, 14 Apr 2009 20:17:35 +0000 (22:17 +0200)] 
Add traces for AM_SILENT_RULES.

* lib/autom4te.in (Automake-preselections): Trace
AM_SILENT_RULES.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16 years agoImprove documentation related to expanded-before-required.
Eric Blake [Fri, 10 Apr 2009 20:43:33 +0000 (14:43 -0600)] 
Improve documentation related to expanded-before-required.

* doc/autoconf.texi (Expanded Before Required): Add a case study.
(Running the Compiler) <AC_COMPILE_IFELSE>: Remind users that
running a compile test will AC_REQUIRE the compiler check.
(Macro Definitions) <AC_DEFUN>: Contrast AC_DEFUN and m4_define.
(C Compiler) <AC_PROG_CC>: Mention the fact that only first
invocation of this macro checks for $EXEEXT, and that many other
macros use it via AC_REQUIRE.
Reported by Andreas Schwab.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoMention latest rules about make and set -e.
Eric Blake [Fri, 10 Apr 2009 16:56:40 +0000 (10:56 -0600)] 
Mention latest rules about make and set -e.

* doc/autoconf.texi (Failure in Make Rules): Posix is now clear
that make must use set -e.
(Limitations of Builtins) <set>: Clarify more about set -e
behavior.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoImprove documentation about if exit status.
Eric Blake [Fri, 10 Apr 2009 04:33:37 +0000 (22:33 -0600)] 
Improve documentation about if exit status.

* doc/autoconf.texi (Limitations of Builtins) <if>: Mention that
exit status bugs don't affect modern targets.
Reported by Andreas Schwab.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoAdd cross-reference to new macros.
Eric Blake [Fri, 10 Apr 2009 05:00:22 +0000 (23:00 -0600)] 
Add cross-reference to new macros.

* doc/autoconf.texi (Text processing Macros) <m4_normalize>
<m4_strip>: Reference the new m4_ifblank.
Suggested by Mike Frysinger.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoMake AS_IF, AS_CASE, and AS_FOR more robust to blank arguments.
Eric Blake [Fri, 10 Apr 2009 03:45:18 +0000 (21:45 -0600)] 
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>
16 years agoAdd m4_blank and friends.
Eric Blake [Thu, 9 Apr 2009 13:05:00 +0000 (07:05 -0600)] 
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>
16 years agoFinish upgrade to GFDL 1.3.
Eric Blake [Mon, 13 Apr 2009 11:55:35 +0000 (05:55 -0600)] 
Finish upgrade to GFDL 1.3.

* doc/autoconf.texi (copying): Use correct license; comment change
was missed on 2008-11-04.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoTest parallel handling of syntax error.
Eric Blake [Fri, 10 Apr 2009 18:09:41 +0000 (12:09 -0600)] 
Test parallel handling of syntax error.

* tests/autotest.at (parallel syntax error): New test.
Suggested by Ralf Wildenhues

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoDocument awk and config.status line length limitations.
Ralf Wildenhues [Fri, 10 Apr 2009 14:46:42 +0000 (16:46 +0200)] 
Document awk and config.status line length limitations.

* doc/autoconf.texi (Configuration Actions): The input to
config.status should have reasonable line length.
(Limitations of Usual Tools): Document IRIX, HP-UX awk input
line length limit.
Report by Bruno Haible.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16 years agoSkip `Multiple languages' test if CC is a C++ compiler.
Ralf Wildenhues [Fri, 10 Apr 2009 14:44:08 +0000 (16:44 +0200)] 
Skip `Multiple languages' test if CC is a C++ compiler.

* tests/compile.at (Multiple languages): Before starting the
test proper, build and run a configure script that tests the
C compiler only, and skips the test if this is found to be a
C++ compiler.
Report by Eric Blake.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16 years agoNote that AC_DEFUN is needed for aclocal.
Ralf Wildenhues [Fri, 10 Apr 2009 14:37:41 +0000 (16:37 +0200)] 
Note that AC_DEFUN is needed for aclocal.

* doc/autoconf.texi (Coding Style): Public third-party macros
should be AC_DEFUN'ed.
Report by John Calcote.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16 years agoAdd undocumented _AS_CLEAN_DIR.
Eric Blake [Fri, 10 Apr 2009 12:26:33 +0000 (06:26 -0600)] 
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>
16 years agoAvoid problems caused by deleting in-use directory.
Eric Blake [Thu, 9 Apr 2009 17:13:51 +0000 (11:13 -0600)] 
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>
16 years agoFix regression in empty test.
Eric Blake [Thu, 9 Apr 2009 16:29:33 +0000 (10:29 -0600)] 
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>
16 years agoMake a less conservative cross-compilation guess for AC_FUNC_UTIME_NULL.
Paolo Bonzini [Thu, 9 Apr 2009 21:14:27 +0000 (23:14 +0200)] 
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.

16 years agoAutomake relies on the undocumented `_AC_COMPILER_EXEEXT' macro.
Ralf Wildenhues [Wed, 8 Apr 2009 22:00:30 +0000 (00:00 +0200)] 
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>
16 years agoReduce testsuite size.
Eric Blake [Mon, 30 Mar 2009 23:27:45 +0000 (17:27 -0600)] 
Reduce testsuite size.

* tests/statesave.m4: New file.
* tests/Makefile.am (EXTRA_DIST): Distribute it.
* tests/local.at (AT_CONFIGURE_AC): Reuse file, rather than
repeating inline definition of AC_STATE_SAVE.
(AT_CHECK_ENV): Factor code...
(_AT_CHECK_ENV): ...into shell function.
* tests/m4sh.at (AT_DATA_LINENO): Avoid churn in testsuite.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoHandle shell comments in AT_CHECK.
Eric Blake [Mon, 6 Apr 2009 18:13:02 +0000 (12:13 -0600)] 
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>
16 years agoHard fail any test with syntax errors.
Eric Blake [Mon, 6 Apr 2009 16:40:49 +0000 (10:40 -0600)] 
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>
16 years ago./.prev-version: Record previous version: 2.63b.
Eric Blake [Tue, 31 Mar 2009 12:23:42 +0000 (06:23 -0600)] 
./.prev-version: Record previous version: 2.63b.

16 years agoBeta Release Version 2.63b. v2.63b
Eric Blake [Mon, 30 Mar 2009 14:45:11 +0000 (08:45 -0600)] 
Beta Release Version 2.63b.

* NEWS: Mention the release.
* README: Clarify that this is a beta release.
* build-aux/texinfo.tex: Synchronize from upstream.
* .x-sc_trailing_blank: Exempt more upstream files.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoFix testsuite failures under zsh.
Eric Blake [Mon, 30 Mar 2009 19:28:02 +0000 (13:28 -0600)] 
Fix testsuite failures under zsh.

* tests/local.at (AT_CHECK_ENV): Exempt $argv and $ARGC, which are
set by zsh -c 'emulate sh'.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoFor now, skip parallel tests under less-tested shells.
Eric Blake [Mon, 30 Mar 2009 14:11:09 +0000 (08:11 -0600)] 
For now, skip parallel tests under less-tested shells.

* tests/autotest.at (AT_CHECK_AT): Add pre-test argument.
(Tested programs, Startup error messages, AT_CHECK_AT_TITLE)
(Fallacy, Skip, errexit, Long test source lines)
(Debugging a successful test, Debugging script and environment)
(Debugging a failed test, Using atlocal)
(Choosing where testsuite is run): Adjust callers.
(AT_SKIP_PARALLEL_TESTS): New macro, to skip parallel tests except
under zsh, bash, or when TEST_PARALLEL_AUTOTEST is defined.  Makes
it easier to avoid testsuite hangs for users with dash or other
less-tested shell.
(parallel test execution, parallel truth, parallel fallacy)
(parallel skip, parallel errexit)
(parallel autotest and signal handling): Use it.
* BUGS: Mention this.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoFix awk substitution of carriage returns on DJGPP.
Andris Pavenis [Tue, 24 Mar 2009 12:47:09 +0000 (06:47 -0600)] 
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>
16 years agoWork around cygwin bash igncr mode.
Aaron W. LaFramboise [Sun, 22 Mar 2009 06:06:58 +0000 (01:06 -0500)] 
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>
16 years agoFix underquoted example in manual.
Eric Blake [Tue, 24 Mar 2009 11:58:52 +0000 (05:58 -0600)] 
Fix underquoted example in manual.

* doc/autoconf.texi (Common Shell Constructs) <AS_TR_CPP>:
Properly m4-quote #.
* THANKS: Update spelling.
Reported by Matěj Týč.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoManual: mention more expr pitfalls.
Eric Blake [Wed, 18 Mar 2009 01:33:08 +0000 (19:33 -0600)] 
Manual: mention more expr pitfalls.

* doc/autoconf.texi (Limitations of Usual Tools) <expr (:)>:
Mention HP-UX limitation, and $ ambiguity.
* THANKS: Update.
Reported by Jens Schmidt, in http://bugs.debian.org/466990.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoManual: fix a typo.
Jim Meyering [Mon, 18 Aug 2008 09:08:14 +0000 (11:08 +0200)] 
Manual: fix a typo.

* lib/m4sugar/m4sh.m4: s/are/is/ => "there is no indirection"

16 years agoUse test consistently in examples.
Eric Blake [Tue, 17 Mar 2009 13:39:40 +0000 (07:39 -0600)] 
Use test consistently in examples.

* doc/autoconf.texi (Subdirectories, Caching Results)
(Common Shell Constructs, Prerequisite Macros, Coding Style)
(Changed Results, Particular Programs, Defining Symbols):
Protect against arbitrary user strings.
(Multiple Cases): Mention why $fstype does not need protection.
Reported by Reuben Thomas.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoImprove confusing section names.
Eric Blake [Tue, 17 Mar 2009 12:38:07 +0000 (06:38 -0600)] 
Improve confusing section names.

* doc/autoconf.texi (Specifying Names): Rename node...
(Specifying Target Triplets): ...to this.
(Generic Programs): Adjust references.
* doc/install.texi (System Type): Touch up formatting.
* THANKS: Update.
Reported by Tim Freeman, in http://bugs.debian.org/312873.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoRemove historical inaccuracy.
Eric Blake [Tue, 17 Mar 2009 12:09:22 +0000 (06:09 -0600)] 
Remove historical inaccuracy.

* doc/autoconf.texi (Portable Shell): Don't perpetuate myth about
Reported by Reuben Thomas.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoRecommend AS_HELP_STRING more prominently.
Eric Blake [Tue, 17 Mar 2009 12:05:11 +0000 (06:05 -0600)] 
Recommend AS_HELP_STRING more prominently.

* doc/autoconf.texi (External Software): Reduce mention of
hand-written help strings.
Reported by Reuben Thomas.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoFix 'make pdf'.
Eric Blake [Mon, 16 Mar 2009 23:03:27 +0000 (17:03 -0600)] 
Fix 'make pdf'.

* doc/autoconf.texi (Balancing Parentheses): Fix usage of
@itemize.
Reported by Ralf Wildenhues, fix suggested by Karl Berry.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoResync upstream files.
Eric Blake [Sat, 14 Mar 2009 22:23:29 +0000 (16:23 -0600)] 
Resync upstream files.

* GNUmakefile: Run 'make fetch'.
* build-aux/announce-gen: Likewise.
* build-aux/config.guess: Likewise.
* build-aux/config.sub: Likewise.
* build-aux/gnupload: Likewise.
* build-aux/texinfo.tex: Likewise.
* build-aux/vc-list-files: Likewise.
* doc/gnu-oids.texi: Likewise.
* doc/standards.texi: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoNew test for SunStudio `restrict' handling.
Ralf Wildenhues [Mon, 9 Mar 2009 18:25:18 +0000 (19:25 +0100)] 
New test for SunStudio `restrict' handling.

* tests/c.at (AC_C_RESTRICT and C++): New test.
Prompted by bug report from Rolf Vandevaart.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16 years agoManual: testsuite depends on package.m4.
Ralf Wildenhues [Sun, 8 Mar 2009 10:24:06 +0000 (11:24 +0100)] 
Manual: testsuite depends on package.m4.

* doc/autoconf.texi (Making testsuite Scripts): In the example
makefile snippet, $(TESTSUITE) depends on $(srcdir)/package.m4.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16 years agoFix a typo in comment for AS_LITERAL_IF.
Allan Caffee [Mon, 2 Mar 2009 18:11:19 +0000 (11:11 -0700)] 
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>
16 years agoImprove wording for AS_ESCAPE.
Eric Blake [Mon, 2 Mar 2009 17:29:35 +0000 (10:29 -0700)] 
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>
16 years agoUse pkgdatadir consistently.
Eric Blake [Tue, 24 Feb 2009 16:27:15 +0000 (09:27 -0700)] 
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>
16 years agoUse m4_translit more efficiently in AS_ESCAPE.
Eric Blake [Thu, 19 Feb 2009 21:32:36 +0000 (14:32 -0700)] 
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>
16 years agoMention recently documented macros.
Eric Blake [Thu, 19 Feb 2009 16:53:35 +0000 (09:53 -0700)] 
Mention recently documented macros.

* NEWS: Update list of new documentation.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoAdd index for config.site.
Ralf Wildenhues [Sat, 14 Feb 2009 20:17:07 +0000 (21:17 +0100)] 
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>
16 years agoFix m4_set speed regression introduced 2008-12-18.
Eric Blake [Thu, 12 Feb 2009 15:27:18 +0000 (08:27 -0700)] 
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>
16 years agoMention new AC_DEFUN_ONCE clients.
Eric Blake [Thu, 5 Feb 2009 13:12:24 +0000 (06:12 -0700)] 
Mention new AC_DEFUN_ONCE clients.

* NEWS: Mention recent semantic changes.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoUse AC_DEFUN_ONCE for some one-shot AC_PROG macros.
Eric Blake [Wed, 28 Jan 2009 16:11:43 +0000 (09:11 -0700)] 
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>
16 years agoMention that packagers should not pre-set CFLAGS.
Eric Blake [Tue, 3 Feb 2009 16:15:54 +0000 (09:15 -0700)] 
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>
16 years agoDocument lib64 in config.site.
Eric Blake [Tue, 3 Feb 2009 16:01:52 +0000 (09:01 -0700)] 
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>
16 years agoUse AC_DEFUN_ONCE for uncontroversial one-shot macros.
Eric Blake [Wed, 28 Jan 2009 16:11:28 +0000 (09:11 -0700)] 
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>
16 years agoReduce blank lines in AC_DEFUN_ONCE macros.
Eric Blake [Wed, 28 Jan 2009 23:14:13 +0000 (16:14 -0700)] 
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>
16 years agoSilence another false positive expand-before-require.
Eric Blake [Wed, 28 Jan 2009 18:01:42 +0000 (11:01 -0700)] 
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>
16 years agoFix AC_C_RESTRICT for Sun Studio 12 C++.
Eric Blake [Wed, 28 Jan 2009 16:57:08 +0000 (09:57 -0700)] 
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>
16 years agoFix years in copyright notices.
Eric Blake [Tue, 27 Jan 2009 23:13:55 +0000 (16:13 -0700)] 
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>
16 years agoUse URLs in --help output, part 3: testsuite.
Eric Blake [Tue, 27 Jan 2009 23:13:41 +0000 (16:13 -0700)] 
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>
16 years agoUse URLs in --help output, part 2: configure.
Eric Blake [Mon, 26 Jan 2009 23:43:20 +0000 (16:43 -0700)] 
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>
16 years agoUse URLs in --help output, part 1: autoconf executables.
Eric Blake [Mon, 26 Jan 2009 18:39:43 +0000 (11:39 -0700)] 
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>
16 years agoQuote traced macros passed from autom4te to M4.
Peter Breitenlohner [Tue, 27 Jan 2009 13:48:04 +0000 (14:48 +0100)] 
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>
16 years agoImprove AC_DEFUN_ONCE semantics.
Eric Blake [Mon, 26 Jan 2009 16:55:57 +0000 (09:55 -0700)] 
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>
16 years agoFix typos in recent patches.
Eric Blake [Sat, 24 Jan 2009 13:33:41 +0000 (06:33 -0700)] 
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>
16 years agoRevert change to AC_DIR_HEADER.
Eric Blake [Sat, 24 Jan 2009 13:16:48 +0000 (06:16 -0700)] 
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>
16 years agoSilence a false positive expand-before-require case.
Eric Blake [Thu, 22 Jan 2009 15:08:06 +0000 (08:08 -0700)] 
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>
16 years agoFix out-of-order expansion with expand-before-require.
Eric Blake [Tue, 20 Jan 2009 21:22:41 +0000 (14:22 -0700)] 
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>
16 years agoWarn if macro is provided before indirectly required.
Eric Blake [Tue, 20 Jan 2009 21:03:59 +0000 (14:03 -0700)] 
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>
16 years agoClean up some bugs caught by preliminary dependency validation.
Eric Blake [Tue, 20 Jan 2009 17:08:11 +0000 (10:08 -0700)] 
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>
16 years agoImprove AC_REQUIRE documentation.
Eric Blake [Sat, 17 Jan 2009 16:36:02 +0000 (09:36 -0700)] 
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>
16 years agoSpeed up m4_require.
Eric Blake [Sat, 17 Jan 2009 15:38:11 +0000 (08:38 -0700)] 
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>
16 years agoAvoid underfull hbox.
Eric Blake [Sat, 17 Jan 2009 16:35:41 +0000 (09:35 -0700)] 
Avoid underfull hbox.

* doc/autoconf.texi (Installation Directory Variables): Reword to
fit on line.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoIgnore `set -e'-related failure of NetBSD sh.
Ralf Wildenhues [Wed, 14 Jan 2009 06:35:53 +0000 (07:35 +0100)] 
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>
16 years agoMaintainer cleanups.
Eric Blake [Tue, 6 Jan 2009 15:41:34 +0000 (08:41 -0700)] 
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>
16 years agoMake it easier to track diversion bugs.
Eric Blake [Tue, 30 Dec 2008 15:32:08 +0000 (08:32 -0700)] 
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>
16 years agoImprove multiarch detection.
Bruno Haible [Mon, 29 Dec 2008 23:19:31 +0000 (16:19 -0700)] 
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>
16 years agoUse AS_CASE in documented example.
William Pursell [Sun, 28 Dec 2008 11:03:15 +0000 (11:03 +0000)] 
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>
16 years agoMake m4_dumpdef more useful with M4 1.6.
Eric Blake [Tue, 23 Dec 2008 21:29:48 +0000 (14:29 -0700)] 
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>
16 years agoImprove INSTALL for HP-UX.
Bruno Haible [Wed, 24 Dec 2008 04:09:21 +0000 (21:09 -0700)] 
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>
16 years agoImprove INSTALL for Haiku.
Bruno Haible [Tue, 23 Dec 2008 05:08:59 +0000 (22:08 -0700)] 
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>
16 years agoFix typo in previous commit.
Eric Blake [Fri, 19 Dec 2008 21:49:18 +0000 (14:49 -0700)] 
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>
16 years agoDocument some recently added macros.
Eric Blake [Fri, 19 Dec 2008 21:06:46 +0000 (14:06 -0700)] 
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>
16 years agoFix separator in m4_stack_foreach_sep.
Eric Blake [Fri, 19 Dec 2008 00:15:13 +0000 (17:15 -0700)] 
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>
16 years agoMention limitation of M4 1.4.x on builtin tokens.
Eric Blake [Thu, 18 Dec 2008 22:55:58 +0000 (15:55 -0700)] 
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>
16 years agoDocument m4_version_prereq.
Eric Blake [Thu, 18 Dec 2008 13:44:59 +0000 (06:44 -0700)] 
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>
16 years agoAC_HEADER_ASSERT: don't say assertions are disabled when they're not
Jim Meyering [Wed, 10 Dec 2008 13:45:35 +0000 (14:45 +0100)] 
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.

16 years agoFix m4_location inside m4_wrap with m4 1.4.5.
Eric Blake [Tue, 9 Dec 2008 17:47:19 +0000 (10:47 -0700)] 
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>
16 years agoFix AC_HEADER_ASSERT w.r.t. --enable-assert.
William Pursell [Mon, 8 Dec 2008 21:16:38 +0000 (14:16 -0700)] 
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>
16 years agoFix AC_HEADER_ASSERT not to treat --enable-assert and --disable-assert the same.
Paolo Bonzini [Mon, 8 Dec 2008 21:12:20 +0000 (22:12 +0100)] 
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.

16 years agoFix some typos and grammatical errors in documentation.
William Pursell [Thu, 4 Dec 2008 21:18:40 +0000 (21:18 +0000)] 
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>
16 years agoImprove AC_STATE_SAVE.
Eric Blake [Tue, 2 Dec 2008 18:51:44 +0000 (11:51 -0700)] 
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>
16 years agoAvoid MacOS readdir bug in testsuite.
Eric Blake [Tue, 2 Dec 2008 18:15:55 +0000 (11:15 -0700)] 
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>
16 years agoHide `set -m' error message, for zsh.
Ralf Wildenhues [Sat, 29 Nov 2008 09:57:00 +0000 (10:57 +0100)] 
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>
16 years agoFix a couple of test failures with dash.
Ralf Wildenhues [Thu, 27 Nov 2008 19:02:34 +0000 (20:02 +0100)] 
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>
16 years agoAdd m4_cleardivert.
Eric Blake [Tue, 25 Nov 2008 16:28:43 +0000 (09:28 -0700)] 
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>
16 years agoAdd safety check for m4_expand vs. diversions.
Eric Blake [Mon, 24 Nov 2008 20:52:01 +0000 (13:52 -0700)] 
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>
16 years agoFix typo in AS_MESSAGE_LOG_FD patch.
Eric Blake [Mon, 24 Nov 2008 13:28:56 +0000 (06:28 -0700)] 
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>
16 years agoMore reliable signal handling in Autotest.
Ralf Wildenhues [Sun, 23 Nov 2008 19:00:39 +0000 (20:00 +0100)] 
More reliable signal handling in Autotest.

* lib/autotest/general.m4 (Driver loop): Rewrite signal handler.
Start parallel jobs in their own process group, enabling job
control in the shell if possible, for better signal handling.
Deal with INT, TERM, and HUP in the testsuite driver.  In the
parallel driver, propagate TSTP to jobs either as TSTP or as
STOP (to avoid fork bombs with ksh).
Inside the job processes, add PIPE handler to write back the
job token, so the master process does not hang.
Disable the parallel driver if job control is not provided or if
trap does not understand signal names.
* tests/autotest.at (parallel autotest and signals): New test,
exercises INT, TERM, and PIPE, serial and parallel, with and
without `make' in the loop.
Kudos to Richard Stevens for writing APUE.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16 years agoFix testsuite failure on Solaris.
Eric Blake [Sat, 22 Nov 2008 15:40:39 +0000 (08:40 -0700)] 
Fix testsuite failure on Solaris.

* tests/torture.at (AT_CHECK_CONFIG_CREATION_NOWRITE): Normalize
failure status to 1.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoClean up AS_MESSAGE_LOG_FD usage.
Eric Blake [Fri, 21 Nov 2008 22:50:37 +0000 (15:50 -0700)] 
Clean up AS_MESSAGE_LOG_FD usage.

* lib/m4sugar/m4sh.m4 (AS_MESSAGE_FD, AS_MESSAGE_LOG_FD)
(AS_ORIGINAL_STDIN_FD): Provide default M4sh values.
(_AS_ECHO_LOG, AS_MESSAGE, _AS_ERROR_PREPARE, AS_ERROR): Simplify
usage.
(AS_INIT_GENERATED): Don't shuffle an unchanged AS_MESSAGE_FD.
* tests/m4sh.at (AS@&t@_INIT_GENERATED): Update test.
(AS@&t@_MESSAGE_FD): New test.
* doc/autoconf.texi (Initialization Macros) <AS_INIT_GENERATED>:
Give more details about fd manipulation.
(File Descriptor Macros): Describe M4sh defaults for the fds.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoUse shell function for AS_ERROR.
Eric Blake [Fri, 21 Nov 2008 17:15:20 +0000 (10:15 -0700)] 
Use shell function for AS_ERROR.

* lib/m4sugar/m4sh.m4 (_AS_ERROR_PREPARE): New macro, defining a
new shell function.
(AS_ERROR): Use it.
(_AS_LINENO_PREPARE): Break circular dependency.
(AS_PREPARE, _AS_PREPARE): Initialize for child scripts.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoFix typos in recent testsuite improvements.
Eric Blake [Fri, 21 Nov 2008 19:28:36 +0000 (12:28 -0700)] 
Fix typos in recent testsuite improvements.

* lib/autotest/general.m4 (AT_INIT) <at_fn_check_prepare_dynamic>:
Fix typo.
* NEWS: Clarify the potential impact to users.
* tests/autotest.at (AT_DATA_AUTOTEST): New macro, patterned after
AT_DATA_M4SUGAR.
(AT_CHECK_AT_PREP, AT_CHECK_AT_TITLE): Use it.
(unusual file names): Test that the recent echo fix does not
regress.  Fix quoting bug that made the test a no-op.
Reported by Paolo Bonzini and Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoUse modern m4sh constructs in autoconf.
Eric Blake [Fri, 21 Nov 2008 15:31:17 +0000 (08:31 -0700)] 
Use modern m4sh constructs in autoconf.

* bin/autoconf.as (exit_missing_arg, getopt): Use AS_ERROR, rather
than AS_EXIT.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoChange the semantics of AS_EXIT without argument.
Eric Blake [Fri, 21 Nov 2008 15:12:12 +0000 (08:12 -0700)] 
Change the semantics of AS_EXIT without argument.

* lib/m4sugar/m4sh.m4 (_AS_EXIT_PREPARE): When defaulting, use $?
even if it is 0.
(AS_ERROR): Guarantee non-zero status.
* bin/autoconf.as (exit_missing_arg, getopt): Revert prior change;
we want non-zero status.
* tests/m4sh.at (AS@&t@_EXIT): Update test accordingly.
* doc/autoconf.texi (Common Shell Constructs) <AS_EXIT>: Update
the documentation.
<AS_SET_STATUS>: Don't overly restrict implementation.
(Printing Messages) <AC_MSG_ERROR>: Describe better default.
Suggestions by Paolo Bonzini and Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoAdd @anchors within Builtins and Usual Tools lists.
Eric Blake [Fri, 21 Nov 2008 13:54:51 +0000 (06:54 -0700)] 
Add @anchors within Builtins and Usual Tools lists.

* doc/autoconf.texi (Limitations of Builtins)
(Limitatations of Usual Tools): Add anchors for tools called out
by name.  Adjust callers to narrow in on tool of interest.

Signed-off-by: Eric Blake <ebb9@byu.net>