Commit Graph

1572 Commits

Author SHA1 Message Date
Eric Blake
b95a1aea40 Update copyright year.
All files changed to add 2010, via 'make update-copyright'.

Signed-off-by: Eric Blake <ebb9@byu.net>
2010-01-05 20:59:55 -07:00
Bruno Haible
6c11abd6fc Improve documentation on Solaris tr bugs.
* doc/autoconf.texi (Limitations of Usual Tools) <tr>: Refine
description of NUL handling by Solaris tr.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-12-31 06:50:44 -07:00
Eric Blake
57aa091236 Another tr tweak.
* doc/autoconf.texi (Limitations of Usual Tools) <tr>: Clarify
previous commit.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-12-31 05:32:27 -07:00
Eric Blake
8c323c07b5 Improve documentation on tr portability.
* doc/autoconf.texi (Limitations of Usual Tools) <tr>: Refine
description of NUL handling.  Document set size issue.
Reported by Bruno Haible.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-12-29 20:49:58 -07:00
Eric Blake
3fbac862d7 Improve wording about m4 quote characters.
* doc/autoconf.texi (Autoconf Language): Autoconf quote characters
come from m4sugar, not raw m4.
(Active Characters): Mention that it is m4sugar which changes
quotes from `' to [].
* THANKS: Update.
Suggested by Josef Vukovic.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-12-12 07:11:55 -07:00
Stefano Lattarini
d4fdf04459 Document Solaris/Heirloom sh set -e issue with command substitutions.
* doc/autoconf.texi (Limitations of Builtins): Fix typos `set -d'
in previous example.  Document failure to honor && lists with set -e
and a command substitution in the failing command.
Report and initial patch by Stefano Lattarini against Automake.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-12-05 14:00:42 +01:00
Eric Blake
b4f0a5079d Warn if using unnamed diversion.
* lib/m4sugar/m4sugar.m4 (_m4_divert, m4_divert_push): Add
optional parameter, which controls warning.
(m4_divert_pop, m4_cleardivert, m4_divert_require)
(_m4_require_call): Adjust callers.
* lib/m4sugar/m4sh.m4 (AS_REQUIRE): Likewise.
* tests/m4sh.at (AT_DATA_LINENO): Avoid triggering the warning.
* tests/m4sugar.at (AT_CHECK_M4SUGAR_TEXT, m4@&t@_append)
(m4@&t@_text_wrap, recursion): Likewise.
(m4@&t@_warn, m4@&t@_divert_stack): Adjust expected output.
* tests/tools.at (autom4te and whitespace in file names)
(autoconf: the empty token): Avoid triggering the warning.
(autoconf: AC_PRESERVE_HELP_ORDER): New test.
* tests/mktests.sh (ac_exclude_list): Retire prior test.
* NEWS: Document the warning.
* doc/autoconf.texi (Redefined M4 Macros) <m4_divert>,
<m4_undivert>: Make even more explicit that using these directly
is discouraged.
(Diversion support): Further warn against improper diversion
changes.
<m4_divert_text>: Give an example of proper use.
Reported by Mike Frysinger.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-12-04 21:18:07 -07:00
Ralf Wildenhues
8edd55bbea manual: AC_SEARCH_LIBS also prepends to LIBS.
* doc/autoconf.texi (Libraries): Document that AC_SEARCH_LIBS
prepends to LIBS, just like AC_CHECK_LIB.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-30 21:37:00 +01:00
Eric Blake
9d6e4a750d Redocument AS_DIRNAME, even with its flaws.
* doc/autoconf.texi (Common Shell Constructs) <AS_DIRNAME>:
Restore documenatation, since dirname mentions it.
Reported by Peter Johansson.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-11-04 19:44:38 -07:00
Eric Blake
8acd974e1a Fix cross-manual link to gcc.
* doc/autoconf.texi (Portable C and C++): Provide uref rather than
xref when building for html.
Reported via Karl Berry.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-10-31 06:57:46 -06:00
Bruno Haible
d2fb059fd3 Improve cache variable documentation.
* doc/autoconf.texi (AC_PROG_AWK, AC_PROG_GREP, AC_PROG_EGREP,
AC_PROG_FGREP, AC_PROG_INSTALL, AC_PROG_MKDIR_P, AC_PROG_LEX,
AC_PROG_YACC, AC_CHECK_PROG, AC_CHECK_PROGS, AC_PATH_PROG,
AC_PATH_PROGS): Don't suggest to use the cache variable, only to
override it, or preferably, a non-cache variable associated with
the test.
(AC_PROG_SED): Likewise. Fix name of cache variable.
(AC_FUNC_GETMNTENT): Fix name cache variable.
(AC_FUNC_LSTAT): Fix typo.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-10-31 07:56:53 +01:00
Eric Blake
2943c63f52 Fix m4_text_wrap handling of quoted whitespace.
* lib/m4sugar/m4sugar.m4 (m4_escape): New macro.
(m4_text_wrap): Use it to avoid issues with embedded [ and ].
* tests/m4sugar.at (m4@&t@_text_wrap): Test it.
* NEWS: Document this.
* doc/autoconf.texi (Text processing Macros) <m4_escape>:
Likewise.
Reported by Mike Frysinger.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-10-28 19:53:58 -06:00
Eric Blake
693b541dea Mention another feature of AC_RUN_IFELSE.
* doc/autoconf.texi (Runtime) <AC_RUN_IFELSE>: Mention that
compiled test program still exists during if-true branch.
* THANKS: Update.
Reported by Stefano Lattarini, suggestion by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-10-27 20:17:11 -06:00
Ralf Wildenhues
b4d24c2af2 Fix a couple of index entries in the manual.
* doc/autoconf.texi (Polymorphic Variables): Fix index entries
for AS_VAR_APPEND, AS_VAR_ARITH.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-10-17 07:12:54 +02:00
Peter Breitenlohner
c60a1fdb4c Fix typos in documentation.
* doc/autoconf.texi (Cache Variable Index): Fix typo.
(Libraries) <AC_SEARCH_LIBS>: Mention 'none required' result.

Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
Signed-off-by: Eric Blake <ebb9@byu.net>
2009-10-15 06:15:29 -06:00
Bruno Haible
81f4709a56 Recommend `sh -n' debugging, and public result variables for macros.
* doc/autoconf.texi (Debugging): Recommend to use "bash -n
configure".  Recommend the use of result variables as an
alternative to run-if-true/run-if-false parameters.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-10-09 05:37:06 +02:00
Bruno Haible
af6cdb40d8 manual: order `Particular Functions' node alphabetically.
* doc/autoconf.texi (Particular Functions): Swap sections about
AC_FUNC_MBRTOWC and AC_FUNC_MEMCMP.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-10-05 06:46:41 +02:00
Ralf Wildenhues
fb332fa541 Clarify documentation about Solaris sed quantifier restriction.
* doc/autoconf.texi (Limitations of Usual Tools) <sed>: '*' does
not work after subexpressions, \{M,N\} only after one-character
expressions.  From GCC PR 38923.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-22 07:36:04 +02:00
Ralf Wildenhues
6e705c0478 Use consistent notation for cache variables.
* doc/autoconf.texi (Generic Programs): Remove `$' before
variable name.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-18 07:20:58 +02:00
Ralf Wildenhues
cb3638e5aa Documentation of specific and general cache variables.
* doc/autoconf.texi (Default Includes, Alternative Programs)
(Particular Programs, Generic Programs, Files, Libraries)
(Function Portability, Particular Functions, Generic Functions)
(Particular Headers, Generic Headers, Declarations)
(Generic Declarations, Particular Structures, Particular Types)
(Specific Compiler Characteristics)
(Generic Compiler Characteristics, C Compiler, System Services):
Document lots of cache variables.
* NEWS: Update.
Suggested by Bruno Haible.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-18 07:19:59 +02:00
Ralf Wildenhues
57174765e6 New cache variable index in the manual.
* doc/autoconf.texi: Define new index `CA' for cache variables.
(caindex): New macro.
(Cache Variable Index): New appendix node.
(Top, Indices): Adjust menus.
(Cache Variable Names, Site Defaults): Adjust text.
* doc/Makefile.am (CLEANFILES): Add files generated for CA index.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-18 07:16:04 +02:00
Ralf Wildenhues
3ab3c9b357 New FAQ node: Debugging.
* doc/autoconf.texi (Debugging): New node.
(Top, FAQ): Adjust menus.
Report by Bruno Haible.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-18 07:15:18 +02:00
Ralf Wildenhues
19e33ef7cf Document AM_MAKEFLAGS workaround to the macro override problem.
* doc/autoconf.texi (Macros and Submakes): Automake makefiles
provide AM_MAKEFLAGS to help with overriding macros in submake
invocations.
Prompted by bug report from Bruno Haible.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-18 07:15:00 +02:00
Peter Breitenlohner
e5ddeae43a Implement and document Objective C++ support.
* lib/autoconf/c.m4 (AC_LANG(Objective C++), AC_LANG_OBJCXX)
(AC_LANG_PREPROC(Objective C++), AC_PROG_OBJCXXCPP)
(AC_LANG_COMPILER(Objective C++), AC_PROG_OBJCXX)
(_AC_PROG_OBJCXX_G): New macros.
(_AC_ARG_VAR_CPPFLAGS, _AC_ARG_VAR_LDFLAGS)
(_AC_ARG_VAR_LIBS): Adjusted.
* doc/autoconf.texi (Objective C++ Compiler): New node.
(Preset Output Variables): Document OBJCXXFLAGS.
(Language Choice): Document `Objective C++' language.
* NEWS: Updated.

* tests/local.at (AT_CHECK_ENV): Ignore AC_SUBSTed Objective C++
related variables.

Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-15 06:11:05 -06:00
Ralf Wildenhues
c8c7589040 Work around DJGPP shell function return bug with command substitutions.
DJGPP bash 2.04 has a bug in that `return $ac_retval' done in a
shell function which also contains a command substitution causes
the shell to barf.  For more details and a fix see:
<http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp-workers/2009/09/09/03:35:08>
Possible workaround include putting the `return' in a subshell
or calling another function to set the status.

* lib/autoconf/general.m4 (_AC_PREPROC_IFELSE_BODY)
(_AC_COMPILE_IFELSE_BODY, _AC_LINK_IFELSE_BODY)
(_AC_RUN_IFELSE_BODY, _AC_COMPUTE_INT_BODY): Use AS_SET_STATUS
instead of `return'.
* doc/autoconf.texi (Common Shell Constructs, Shell Functions):
Document the issue.
* THANKS: Update.
Report by Rugxulo and Reuben Thomas.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-15 06:16:10 +02:00
Ralf Wildenhues
105fd64d1c Fix description of AC_CHECK_LIB regarding other deplibs.
* doc/autoconf.texi (Libraries): Library linking may not fail
even without missing additional libs.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-13 10:02:43 +02:00
Eric Blake
a30d5c4a22 Improve documentation on quoting.
* doc/autoconf.texi (Autoconf Language): Clarify quoting example.
* THANKS: Update.
Reported by santilín.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-12 07:27:53 -06:00
Ralf Wildenhues
bb09823ea7 New config.status option --config.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Implement
--config.
* doc/autoconf.texi (config.status Invocation): Document it.
* NEWS: Update.
* tests/torture.at (configure invocation): Test it.
Suggested several times, by several people, in the past.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-11 06:53:42 +02:00
Eric Blake
6ecb883bb1 Document that AS_INIT is automatically used.
* doc/autoconf.texi (Initialization Macros) <AS_INIT>: Add words
to clarify that only bare-bones scripts need a direct AS_INIT.
Suggested by Reuben Thomas.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-10 20:18:59 -06:00
Eric Blake
98410813c9 Clarify portability pitfall of test.
* doc/autoconf.texi (Limitations of Builtins) <test>: Give more
reasons why -a and -o are not portable.
Reported by Reuben Thomas.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-10 20:18:39 -06:00
Ralf Wildenhues
9c16f1a80d Document sed limitation with escaped metacharacters.
* doc/autoconf.texi (Limitations of Usual Tools) <sed>: Use `%'
rather than `/' as delimiter in an example `s' command.
Document inconsistent treatment of escaped metacharacters.
* THANKS: Update.
Report by Dave Korn, with additional input from Paolo Bonzini
and Eric Blake.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-10 06:57:58 +02:00
Ralf Wildenhues
672e09142c Document temporary directory `$tmp' for use in config.status.
* doc/autoconf.texi (Configuration Actions): Document `$tmp'.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-10 06:48:24 +02:00
Reuben Thomas
36a50d910d Mention the Autoconf archive.
* doc/autoconf.texi (Coding Style): Add a link.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-04 07:08:49 -06:00
Bruno Haible
129ac3155a Document another Solaris tr pitfall.
* doc/autoconf.texi (Limitations of Usual Tools) <tr>: Mention
that Solaris /usr/bin/tr does not only have problems with
replacing NUL bytes but discards all NUL bytes from the input.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-04 06:34:43 -06:00
Eric Blake
714bcc196f Improve wording about what goes before AC_INIT.
* doc/autoconf.texi (Initializing configure): Update wording.
(Versioning) <AC_PREREQ>: Remove misleading text, to match
autoupdate's behavior.
* THANKS: Update.
Reported by NightStrike, with input from Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-09-04 06:34:31 -06:00
Bruno Haible
2d50a0ed98 Document Solaris tr range and NUL limitations.
* doc/autoconf.texi (Limitations of Usual Tools): Mention that
Solaris /usr/bin/tr does not support ranges, nor the '\0' octal
escape.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-08-18 22:17:51 +02:00
Jeff Squyres
a2aeeaf0fd Fix typo in AC_REQUIRE description.
* doc/autoconf.texi (Prerequisite macros): Fix typo.
2009-08-10 20:05:19 +02:00
Romain Lenglet
dab22fbfe1 add AT_CHECK_EUNIT autotest macro
* lib/autotest/specific.m4: New file.
* lib/autotest/Makefile.am (dist_autotestlib_DATA): Add specific.m4.
* lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Add definitions of
variables used by AT_CHECK_EUNIT macro: ERL, ERLC, ERLCFLAGS.
* tests/autotest.at (Erlang Eunit unit tests): Add test for macro
AT_CHECK_EUNIT.
* doc/autoconf.texi (Writing Testsuites): Document macro AT_CHECK_EUNIT.
* NEWS: Mention macro AT_CHECK_EUNIT.
2009-08-02 08:20:57 +02:00
Paolo Bonzini
9b849a97c6 Clarify comparison of echo, printf, and AS_ECHO*.
Discussed starting at
<http://lists.gnu.org/archive/html/bug-autoconf/2009-07/msg00025.html>.

* doc/autoconf.texi (Limitations of Builtins): In echo's entry,
give a reason why printf is better than echo.  In printf's
entry, cross-reference echo's entry.
2009-07-30 22:41:43 +02:00
Eric Blake
9b7d3d1676 Basic improvements to INSTALL.
* doc/install.texi (Basic Installation): Use better markup.
(Multiple Architectures): Introduce the term VPATH.
(Installation Names): Mention that --prefix must be absolute.
* doc/autoconf.texi (Preset Output Variables)
(Installation Directory Variables): Consistently refer to GNU
Coding Standards.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-26 21:02:38 -06:00
Eric Blake
e18033c024 Require m4 1.4.6, and fix testsuite to support this version.
* m4/m4.m4 (AC_PROG_GNU_M4): Reject m4 1.4.5, now that we use
regexp it can't handle.
* NEWS: Mention minimum version bump.
* README: Likewise.
* README-hacking: Likewise.
* doc/autoconf.texi (Introduction, Why GNU M4): Likewise.
* tests/tools.at (autom4te --trace and whitespace): Update test so
still work with older m4 line numbers.
* tests/m4sugar.at (m4@&t@_require: nested): Likewise.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-25 17:24:47 -06:00
Bruno Haible
bd9c233305 Clarify autom4te debugging tips.
* doc/autoconf.texi (Debugging via autom4te): Fix example from
previous commit, and add clarification.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-25 09:38:39 -06:00
Eric Blake
de8a83c3e9 Document some autom4te debugging tips.
* doc/autoconf.texi (Debugging via autom4te): New node.
Suggested by Bruno Haible.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-25 06:51:59 -06:00
Eric Blake
f256382519 Document that $srcdir can be used during configure.
* doc/autoconf.texi (Preset Output Variables): Add a paragraph.
* THANKS: Update.
Reported by Monty Taylor.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-13 22:21:28 -06:00
Eric Blake
d8db042ad0 Disable asynchronous job notification for parallel tests.
* lib/autotest/general.m4 (AT_INIT) <Driver loop>: Turn off notify
mode, since zsh leaves it on after 'emulate sh'.
* doc/autoconf.texi (Limitations of Builtins) <set>: Document that
job control options are not portable.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-13 22:19:15 -06:00
Eric Blake
2b5b0dda48 Guarantee that exit status trumps output matching.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document this
better.
* tests/autotest.at (Skip, parallel skip): Enhance tests.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-13 22:03:27 -06:00
Eric Blake
c633d4a39a Fix nits in recent patches.
* configure.ac (ac_cv_dir_trailing_space): Avoid $status, for
zsh.
* doc/autoconf.texi (Writing Testsuites) <AT_FAIL_IF, AT_SKIP_IF>:
Tweak wording.
(Introduction): Recommend m4 1.4.13.
* README: Likewise.
* m4/m4.m4 (AC_PROG_GNU_M4): Likewise.  Use long option --gnu
rather than -g.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-13 21:59:47 -06:00
Paolo Bonzini
ac0fd199f9 introduce AT_SKIP_IF and AT_FAIL_IF
* NEWS: Mention AT_SKIP_IF and AT_FAIL_IF.
* doc/autoconf.texi (Autotest): Document them.
* lib/autotest/general.m4 (_AT_LINE_ESCAPED, AT_SKIP_IF,
AT_FAIL_IF, _AT_CHECK_EXIT): New.
(AT_CHECK): Use _AT_LINE_ESCAPED.
* tests/autotest.st: Add tests for AT_SKIP_IF and AT_FAIL_IF.
Use AT_SKIP_IF.
* tests/local.st: Use AT_SKIP_IF.
2009-07-13 21:46:08 +02:00
Paolo Bonzini
877876da7c revert previous push 2009-07-13 13:39:25 +02:00
Paolo Bonzini
967cf4d282 introduce AT_SKIP_IF and AT_FAIL_IF
These are lightweight versions of AT_CHECK that automatically
add the equivalent of ! in front of the command and change a
failure exit status to 77 resp. 99.  They expand to just
two lines of shell code at the expense of not supporting
tracing (but then so does AT_XFAIL_IF).

2009-07-12  Paolo Bonzini  <bonzini@gnu.org>

	* NEWS: Mention AT_SKIP_IF and AT_FAIL_IF.
	* doc/autoconf.texi (Autotest): Document them.
	* lib/autotest/general.m4 (_AT_LINE_ESCAPED, AT_SKIP_IF,
	AT_FAIL_IF, _AT_CHECK_EXIT): New.
	(AT_CHECK): Use _AT_LINE_ESCAPED.
	* tests/autotest.st: Add tests for AT_SKIP_IF and AT_FAIL_IF.
	Use AT_SKIP_IF.
	* tests/local.st: Use AT_SKIP_IF.
2009-07-12 16:31:14 +02:00
Eric Blake
1ba58ec955 Avoid syntax error in ash.
* lib/autotest/general.m4 (AT_INIT) <driver loop>: Avoid syntax
errors on shells that don't recognize <>.
* tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Also skip parallel
tests for this reason.   Skip based on the shell to be tested,
not the shell driving the testsuite.
(parallel syntax error): Rearrange similar to previous patch.
(parallel test execution): Defer skip until after serial tests.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-03 06:42:30 -06:00
Eric Blake
596644ca29 Skip test on shells that can't catch syntax failure.
* tests/autotest.at (Syntax error): Skip test if shell aborts on
syntax error (AIX ksh88) or doesn't detect it (zsh).
* doc/autoconf.texi (Limitations of Builtins) <.>: Mention these
limitations.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-02 07:17:43 -06:00
Jan Madzik
06aeca6abe Avoid AIX 6.1 ksh88 ECHO_C command substitution bug.
* lib/m4sugar/m4sh.m4 (_AS_ECHO_N_PREPARE): Ensure more than
one character is output with `\c'; reset echo output state
if buggy ksh was detected, and set ECHO_T instead of ECHO_C.
* doc/autoconf.texi (Limitations of Builtins): Document it.
* tests/m4sh.at (ECHO_C): New test.
* THANKS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-06-30 20:48:59 +02:00
William Pursell
6c358e8f6a Fix grammaro in documenation.
* doc/autoconf.texi (Guidelines): Fix grammaro.
2009-06-27 13:06:02 +02:00
Eric Blake
ba32f02aed Add m4_copy_force, m4_rename_force.
* lib/m4sugar/m4sugar.m4 (m4_copy_force, m4_rename_force): New
macros.
* tests/m4sugar.at (m4@&t@_defn): Test them.
* doc/autoconf.texi (Redefined M4 Macros) <m4_copy>: Document
them.
* NEWS: Likewise.
Suggested by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-15 06:59:03 -06:00
Eric Blake
685b65a74f Clarify m4_copy semantics.
* doc/autoconf.texi (Redefined M4 Macros) <m4_copy>: Update
documentation.
* tests/m4sugar.at (m4@&t@_defn): Enhance test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-11 06:43:39 -06:00
Eric Blake
22e57e5c5e Improve documentation on trap pitfalls.
* doc/autoconf.texi (Limitations of Builtins) <trap>: Mention new
Posix 2008 requirement on trap, and dash bug in implementing it.
Mention various shell bugs with traps defined inside subshells.
Mention older bash limitation with single-command exit trap.
<set>: Mention another 'set -e' limitation.
Reported by Jens Schmidt.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-06 22:05:47 -06:00
Eric Blake
bef5cc354c Document fallback behavior of AC_PROG_LEX.
* doc/autoconf.texi (Particular Programs) <AC_PROG_LEX>: Mention
why fallback is :, and that a --version check must be used to
determine whether flex was found.
Reported by Patrick Welche.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-06-06 10:41:47 -06:00
Jim Meyering
89f948d644 Fix syntax errors in autoconf.texi.
* doc/autoconf.texi (Erlang Libraries): @-escape curly braces
in example code.
2009-05-28 19:08:20 +02:00
Romain Lenglet
9e380c5ada New AC_ERLANG_SUBST_ERTS_VER macro.
* lib/autoconf/erlang.m4: Add macro AC_ERLANG_SUBST_ERTS_VER.
* doc/autoconf.texi (Erlang Libraries): Document
AC_ERLANG_SUBST_ERTS_VER.
* NEWS: Likewise.
* AUTHORS: Update Romain Lenglet's email address.
* THANKS: Update.
Suggested by Ruslan Babayev.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-05-28 06:19:57 -06:00
Eric Blake
5f19cfb878 Sanitize more problematic environment variables.
* doc/autoconf.texi (Environment Variable Index): Add more
entries, particularly for precious variables and known culprit
variables.  Needed to avoid overfull vbox.
(Special Shell Variables) <CLICOLOR_FORCE, GREP_OPTIONS>: Add
variables known to cause misbehavior.
* lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Unset variables
known to cause problems.
* THANKS: Update.
Based on reports from Ilya Bobir and Joey Mingrone.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-05-26 06:49:41 -06:00
Ralf Wildenhues
35e67f5c0d Document VPATH = $(variable) issue in VPATH chapter.
* doc/autoconf.texi (Variables listed in VPATH): New node.
(Top, VPATH and Make): Adjust menus.
(Build Directories): Refer to it.
Prompted by report from Bruno Haible.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-05-21 14:18:39 +02:00
Ralf Wildenhues
b29a07fffb New manual section `Parallel Make'.
* doc/autoconf.texi (Parallel Make): New node, document NetBSD
`make -jN' quirks.
(Top, Portable Make): Adjust menus.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-05-19 07:29:17 +02:00
Eric Blake
780a068d29 Document zsh bug with empty commands.
* doc/autoconf.texi (Special Shell Variables) <?>: Add mention of
more problems with $?.
2009-05-13 06:25:26 -06:00
Eric Blake
8eb0f6220d manual: Use consistent spelling of here-document.
* doc/autoconf.texi (Defining Symbols, Programming in M4sh)
(Common Shell Constructs, Macro Names, Writing Testsuites): Fix
spelling.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-24 13:15:28 -06:00
Eric Blake
5da9f24d55 Make AT_CHECK_UNQUOTED more like AC_DEFINE_UNQUOTED.
* lib/autotest/general.m4 (AT_CHECK_NOESCAPE): Keep older,
undocumented semantics, where unbalanced " cannot be used in the
stdout/stderr argument.
(AT_CHECK_UNQUOTED): Treat " in stdout/stderr as a literal, since
the text is used in double-quoted context.
* tests/autotest.at (unquoted output): New test.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Mention which
shell expansions are handled.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-24 13:15:25 -06:00
Eric Blake
bcb6b3180d Rename AT_CHECK_NOESCAPE to AT_CHECK_UNQUOTED.
* lib/autotest/general.m4 (AT_CHECK_NOESCAPE): Deprecate, in favor
of new spelling...
(AT_CHECK_UNQUOTED): ...for consistency with AC_DEFINE_UNQUOTED.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document the
rename.
* NEWS: Likewise.
* tests/autotest.at (Binary output, Cleanup): Adjust tests.
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Likewise.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-24 13:15:22 -06:00
Paolo Bonzini
00d0543653 manual: another grammar improvement.
* doc/autoconf.texi (Fortran Compiler): Avoid dependency on
pronunciation of `FCFLAGS_f90'.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-23 19:46:58 +02:00
Eric Blake
ce153844ca Change FOO placeholder to use @var{text} instead.
* doc/autoconf.texi (Configuration Actions): Rename AC_CONFIG_FOOS
to AC_CONFIG_@var{ITEMS}.
* doc/autoconf.texi (config.status Invocation): Likewise.
(AC_FOO_IFELSE vs AC_TRY_FOO): Rename node...
(AC_ACT_IFELSE vs AC_TRY_ACT): ...to this.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-23 06:17:30 -06:00
Eric Blake
46e87ded26 Add m4_argn.
* lib/m4sugar/m4sugar.m4 (m4_argn): New macro.
* NEWS: Document it.
* doc/autoconf.texi (Looping constructs) <m4_argn>: Likewise.
<m4_car, m4_cdr>: Improve documentation.
* tests/m4sugar.at (m4 lists): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-22 20:51:28 -06:00
Ralf Wildenhues
d29bb704e5 Improve description of AC_PROG_CC_C89 and AC_PROG_CC_C99.
* doc/autoconf.texi (C Compiler): Document that AC_PROG_CC_C89
and AC_PROG_CC_C99 prefer extended over strict conformance modes.
Report by Vincent Lefèvre.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-22 07:35:12 +02:00
Ralf Wildenhues
9034f132cc Revert bogus change in last commit.
* doc/autoconf.texi (Initialization Macros): Revert change.
Spotted by Eric Blake.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-21 22:59:42 +02:00
Ralf Wildenhues
ee4a036cda manual: fix trivial grammar errors.
* doc/autoconf.texi (Fortran Compiler, Initialization Macros)
(Limitations of Usual Tools, Pretty Help Strings)
(config.status Invocation): Fix `a' vs. `an' errors.
Report by Eric Blake.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-21 21:43:36 +02:00
Ralf Wildenhues
536f9ae3a4 manual: clarify m4_if synopsis.
* doc/autoconf.texi (Redefined M4 Macros): Rewrite synopsis of
m4_if in the presence of more than three arguments.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-19 01:16:56 +02:00
Ralf Wildenhues
e7c7a4735f Improve and clarify `config.status' usage documentation.
* doc/autoconf.texi (config.status Invocation): Fix markup in
synopsis.  Use `tag' instead of `file' notation for the
non-option arguments, to be consistent with the documentation
of the AC_CONFIG_* macros.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise,
use `tag' notation for non-option arguments.
Report by John Calcote.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-04-19 01:12:43 +02:00
Eric Blake
c241057ad4 Add stdout-nolog and ignore-nolog to AT_CHECK.
* lib/autotest/general.m4 (AT_DIFF_STDERR(stderr-nolog))
(AT_DIFF_STDERR(ignore-nolog), AT_DIFF_STDOUT(stdout-nolog))
(AT_DIFF_STDOUT(ignore-nolog)): New macros.
* tests/autotest.at (Logging): New test.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document the
new logging actions.
* NEWS: Likewise.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-15 06:00:56 -06:00
Eric Blake
e8f34dca8c Teach AT_CHECK about hard failures.
* lib/autotest/general.m4 (AT_INIT) <at_fn_check_skip>
<at_fn_check_status, at_fn_group_postprocess>: Handle hard
failures.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document
AT_CHECK_NOESCAPE and exit status 99.
* NEWS: Likewise.
* tests/autotest.at (Hard fail, Cleanup): New tests.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-15 06:00:24 -06:00
Eric Blake
e9a5c2211a 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>
2009-04-13 13:15:44 -06:00
Eric Blake
d7f226ee0b 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>
2009-04-13 13:15:42 -06:00
Eric Blake
0cd7cde060 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>
2009-04-13 13:15:39 -06:00
Eric Blake
ff97bd9a3f 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>
2009-04-13 13:15:37 -06:00
Eric Blake
723c9e5c0f 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>
2009-04-13 13:15:32 -06:00
Eric Blake
15163ab08a 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>
2009-04-13 06:00:30 -06:00
Ralf Wildenhues
7cff5c9787 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>
2009-04-10 16:46:42 +02:00
Ralf Wildenhues
d882037ec0 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>
2009-04-10 16:37:41 +02:00
Eric Blake
dbcfd3b29f 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>
2009-03-24 06:02:06 -06:00
Eric Blake
abee382683 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>
2009-03-17 19:33:08 -06:00
Eric Blake
efb3e8a738 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>
2009-03-17 07:39:40 -06:00
Eric Blake
e5f657f31e 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>
2009-03-17 06:38:07 -06:00
Eric Blake
996eb0c086 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>
2009-03-17 06:09:22 -06:00
Eric Blake
26a4c7275d 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>
2009-03-17 06:05:11 -06:00
Eric Blake
239b0528b2 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>
2009-03-16 17:03:27 -06:00
Ralf Wildenhues
98647c53e4 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>
2009-03-08 11:24:06 +01:00
Eric Blake
ba524e662f 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>
2009-03-02 11:12:16 -07:00
Eric Blake
b35598a688 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>
2009-02-24 09:38:01 -07:00
Eric Blake
4da1abd28b 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>
2009-02-19 14:32:36 -07:00
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
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
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
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
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
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
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
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
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
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
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
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
2cc7d57a17 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>
2008-11-21 17:00:13 -07:00
Eric Blake
bbc3dc81cc 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>
2008-11-21 08:13:04 -07:00
Eric Blake
26ba3d5318 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>
2008-11-21 06:54:51 -07:00
Eric Blake
54dd8a9379 Move case statement style discussion to m4 quoting section.
* doc/autoconf.texi (Limitations of Builtins): Move comparison of
quoting styles...
(Balancing Parentheses): ...to this new node.
Suggested by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-21 06:35:35 -07:00
Eric Blake
7791129655 Improve m4_expand robustness, part 2.
* lib/m4sugar/m4sugar.m4 (m4_expand): Support unterminated
comments, by wrapping old implementation...
(_m4_expand): ...as this, and renaming old core...
(_m4_expand_): ...to this.
(m4_text_box): Use lighter-weight _m4_expand.
* lib/m4sugar/m4sh.m4 (_AS_DETECT_EXPAND)
(_AS_DETECT_BETTER_SHELL, AS_FUNCTION_DESCRIBE): Likewise.
* lib/autotest/general.m4 (AT_KEYWORDS): Likewise.
* tests/m4sugar.at (m4@&t@_expand): Enhance test.
* tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Likewise.
* doc/autoconf.texi (Evaluation Macros) <m4_expand>: Mention new
functionality.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-20 16:05:04 -07:00
Eric Blake
fa506f9116 Add m4_chomp, m4_esyscmd_s.
* lib/m4sugar/m4sugar.m4 (m4_esyscmd_e, m4_chomp, m4_chomp_all):
New macros.
* doc/autoconf.texi (Redefined M4 Macros) <m4_esyscmd_s>: Document
them.
(Text processing Macros) <m4_chomp>: Likewise.
* NEWS: Likewise.
* tests/m4sugar.at (m4@&t@_esyscmd_s): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-20 15:42:39 -07:00
Eric Blake
644adb9065 Describe different hacks for balancing ')' in case statements.
* doc/autoconf.texi (Limitations of Builtins) <case>: Add an
exposition on various quoting styles.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-20 14:55:50 -07:00
Eric Blake
667dcc0c30 Use fn for shell functions, func for autoconf CHECK_FUNCS.
* lib/autoconf/functions.m4 (AC_CHECK_FUNC): Abbreviate shell
function names.
* lib/autoconf/general.m4 (_AC_PREPROC_IFELSE)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(AC_CHECK_DECL, AC_COMPUTE_INT): Likewise.
* lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL)
(_AC_CHECK_HEADER_COMPILE, _AC_CHECK_HEADER_PREPROC): Likewise.
* lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW, _AC_TYPE_INT)
(_AC_TYPE_UNSIGNED_INT, AC_CHECK_MEMBER): Likewise.
* lib/autotest/general.m4 (AT_INIT): Likewise.
* lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_WORK, _AS_EXIT_PREPARE)
(AS_EXIT, AS_SET_STATUS, _AS_UNSET_PREPARE, _AS_MKDIR_P)
(_AS_MKDIR_P_PREPARE, _AS_VAR_APPEND_PREPARE, AS_VAR_APPEND)
(_AS_VAR_ARITH_PREPARE, AS_VAR_ARITH): Likewise.
* doc/autoconf.texi (Shell Functions): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-18 21:33:46 -07:00
Eric Blake
e84b404ff0 Alter default value of AS_EXIT.
* lib/m4sugar/m4sh.m4 (_AS_EXIT_PREPARE): Let as_func_exit
parameter be optional.
(AS_EXIT): Use it to make better default.
(_AS_DETECT_BETTER_SHELL): Use new default.
* bin/autoconf.as (exit_missing_arg, getopt): Likewise.
* lib/autoconf/status.m4 (AC_OUTPUT): Likewise.
* tests/m4sh.at (AS@&t@_EXIT): Update test.
* doc/autoconf.texi (Common Shell Constructs) <AS_EXIT>: Mention
new default behavior.
(Limitations of Builtins) <trap>: Adjust to use new default.
* NEWS: Mention the semantic change.
Suggested by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-18 21:00:34 -07:00
Eric Blake
12bb35717b Update example to match actual Tru64 behavior.
* doc/autoconf.texi (Limitations of Builtins) <trap>: Correct
the example.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-18 20:09:05 -07:00
Eric Blake
740062eb42 Add AS_SET_STATUS, make AS_EXIT more efficient.
* lib/m4sugar/m4sh.m4 (_AS_EXIT_PREPARE, AS_SET_STATUS): New
macros.
(AS_EXIT): Rewrite to avoid forks.
(_AS_SHELL_SANITIZE): Avoid AS_EXIT prior to shell functions.
(AS_PREPARE, _AS_PREPARE): Add new preparation.
* doc/autoconf.texi (Common Shell Constructs) <AS_SET_STATUS>:
Document.
* NEWS: Mention new macro.
* tests/m4sh.at (AS@&t@_EXIT): New test.
(BASENAME_TEST): Sort.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-18 09:57:19 -07:00
Eric Blake
fed7af3616 Document Tru64 bug with 'set -e'.
* doc/autoconf.texi (Limitations of Builtins) <trap>: Mention a
bug in mixing 'set -e' with 'trap .. 0'.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-18 09:00:51 -07:00
Eric Blake
74f9305973 Document a Solaris /bin/sh bug with 'set -e'.
* doc/autoconf.texi (Shell Functions): Mention the bug.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-18 06:30:37 -07:00
Eric Blake
1a0a363042 Fix AS_ESCAPE usage bugs.
* lib/m4sugar/m4sh.m4 (_AS_VAR_APPEND_PREPARE)
(_AS_VAR_ARITH_PREPARE): Expand macros prior to adding shell
escapes.
(AS_TR_SH, AS_VAR_GET): Use _AS_ESCAPE for speed.
* doc/autoconf.texi (Polymorphic Variables) <AS_VAR_SET>: Document
caveat due to conditional AS_ESCAPE.
* tests/m4sh.at (AS@&t@_VAR basics): Enhance test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-13 12:21:40 -07:00
Eric Blake
973149e014 Make M4sh, not autoconf, guarantee sane $SHELL.
* lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Move setting of
SHELL...
* lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): ...to here.
* doc/autoconf.texi (Initialization Macros): Document the effect
on SHELL.
* tests/m4sh.at (AS@&t@_INIT_GENERATED): New test.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-12 20:32:51 -07:00
Ralf Wildenhues
afa6ce737c Fix a couple of typos in the manual.
* doc/autoconf.texi (Conditional constructs, Macro Names): Fix
typos.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-11-12 07:14:19 +01:00
Eric Blake
5bf2204ddb Match upstream standards.texi.
* doc/standards.texi: Resync from upstream.
* doc/fdl-1.3.texi: Rename...
* doc/fdl.texi: ...to this.
* doc/Makefile.am (autoconf_TEXINFOS, standards_TEXINFOS): Update
users.
* doc/autoconf.texi (GNU Free Documentation License): Likewise.
* cfg.mk (fetch): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-10 19:38:05 -07:00
Clinton Roy
44fbeef86d Pass autoreconf -I to aclocal -I
* bin/autoreconf.in (parse_args): Pass --include to aclocal.
* doc/autoconf.texi (autoreconf Invocation): Updates for above.
* NEWS: Document it.
* THANKS: Update.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-10 10:34:59 -07:00
Eric Blake
3b78b1ae08 Try 'print -r --' as a non-forking variant of 'printf %s\\n'.
* lib/m4sugar/m4sh.m4 (_AS_ECHO_PREPARE): Cater to Solaris ksh.
* doc/autoconf.texi (Limitations of Builtins) <printf>: Document
the print workaround.
Idea by Paolo Bonzini.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-10 09:06:39 -07:00
Eric Blake
3063ce9fd4 Provide a section on all tools allowed in GNU Coding Standards.
* doc/autoconf.texi (Limitations of Builtins) <read>: Sort.
<wait>: Add section.
(Limitations of Usual Tools) <awk>: Make table entry consistent.
<chgrp, mkfifo, rmdir, sleep, sort, tar> Add sections.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-10 07:20:57 -07:00
Eric Blake
0d8db08710 Further doc updates for AC_CHECK_HEADER change.
* doc/autoconf.texi (Generic Headers) <AC_CHECK_HEADER>: Mention
new default, and make it more obvious that using [-] is generally
broken.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-07 09:33:51 -07:00
Paolo Bonzini
c22cc67be7 Change `present but cannot be compiled' behavior to use compiler result.
* NEWS: Document it.
* doc/autoconf.texi (Present But Cannot Be Compiled): Document it.
* lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): Implement it
and adjust warning.
* tests/semantics.at (AC_CHECK_HEADERS): Test new semantics.
2008-11-06 10:55:31 +01:00
Eric Blake
4e009d5228 Use m4_set_map_sep in more places.
* lib/m4sugar/m4sugar.m4 (m4_set_difference, m4_set_intersection)
(m4_set_union): Use m4_set_map_sep rather than m4_set_foreach.
* doc/autoconf.texi (Set manipulation Macros) <m4_set_map>:
Enhance documentation.
<m4_set_foreach>: Mention faster alternative.
(Looping constructs) <m4_foreach>: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-05 13:31:46 -07:00
Eric Blake
a30e6f3f77 Upgrade to FDL 1.3.
* cfg.mk (fetch): Add fdl-1.3.texi.
* .gitattributes: Likewise.
* doc/autoconf.texi (GNU Free Documentation License): Point to new
upstream version.
* doc/Makefile.am (autoconf_TEXINFOS): Likewise.
(standards_TEXINFOS): Mention current dependence on older license.
* doc/fdl-1.3.texi: New upstream file.
* GNUmakefile: Resync from upstream.
* build-aux/announce-gen: Likewise.
* build-aux/texinfo.tex: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-04 06:36:20 -07:00
Ralf Wildenhues
d5445543c5 Point at AM_SUBST_NOTMAKE.
* doc/autoconf.texi (Setting Output Variables): Add cross
reference to new Automake macro AM_SUBST_NOTMAKE.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-11-03 22:52:43 +01:00
Eric Blake
9279a87aba Support multiple undiverts and dumpdefs at once.
* lib/m4sugar/m4sugar.m4 (m4_dumpdefs, m4_undivert): Allow extra
arguments.
* doc/autoconf.texi (Redefined M4 Macros) <m4_dumpdef>,
<m4_undivert>: Document argument list change.
* tests/m4sugar.at (m4@&t@_divert_stack, m4@&t@_dumpdef): Test
them.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-31 10:30:31 -06:00
Eric Blake
9f4363abb6 Simplify diversion stack handling.
* lib/m4sugar/m4sugar.m4 (m4_divert_stack): Use fewer macros, and
avoid extra newlines.
(m4_divert_stack_push): Compute location here, rather than caller.
(m4_divert_push): Update caller.
(m4_divert): Likewise, and also adjust current diversion name.
(m4_divert_pop): Simplify rule that diversion stack must never go
empty.
(_m4_require_call): Bypass diversion stack when collecting
required macro text.
(m4_init): Set current diversion without requiring m4_init.
* lib/m4sugar/m4sh.m4 (AS_INIT): Avoid too many pops.
* lib/autotest/general.m4 (AT_INIT): Likewise.
* lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Schedule wrapped
text to run prior to m4sugar cleanup.
* doc/autoconf.texi (Text processing Macros) <m4_newline>: Mention
optional argument.
(Conditional constructs) <m4_ifvaln, m4_n>: Mention use of dnl.
* NEWS: Undo blurb about m4_divert.
* tests/m4sugar.at (m4@&t@_divert_stack): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-31 10:25:24 -06:00
Eric Blake
cd9fbb8453 Better documentation of AC_CHECK_HEADER's fourth argument.
* doc/autoconf.texi (Generic Headers) <AC_CHECK_HEADER>: Mention
how to suppress compiler or preprocessor header check.
Reported by Jeff Squyres.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-30 22:05:55 -06:00
Eric Blake
10d26aa4a8 Update LINENO documentation.
* doc/autoconf.texi (Initialization Macros) <AS_INIT_GENERATED>:
(Special Shell Variables) <LINENO>: Mention that LINENO support in
child scripts may be broken.  Modernize example.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-30 11:18:09 -06:00
Eric Blake
a78b497413 Work around Solaris /bin/sh case bug.
* lib/m4sugar/m4sh.m4 (_AS_CASE, _AS_CASE_DEFAULT): Always provide
a non-empty command list.
(AS_CASE): Always guarantee that a case will match.
* doc/autoconf.texi (Limitations of Builtins) <case>: Document the
Solaris bug, and mention AS_CASE.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-30 07:40:59 -06:00
Eric Blake
7abb73425a Alter signature of AS_INIT_GENERATED.
* lib/m4sugar/m4sh.m4 (AS_INIT_GENERATED): Add parameters, and
manage here-doc and chmod in place.  This also allows future
changes for optimizing the child via diversion/m4_wrap magic.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Update
caller.
* doc/autoconf.texi (Initialization Macros) <AS_INIT_GENERATED>:
Update the documentation.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-29 06:30:40 -06:00
Bruno Haible
479ad2b6b2 Mention Sun WorkShop 6.2 OpenMP bug.
* doc/autoconf.texi (AC_OPENMP): Document portability pitfall.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-29 06:05:16 -06:00
Eric Blake
0b08f40fc7 Override m4 1.4.x dumpdef, as it breaks autom4te.
* lib/m4sugar/m4sugar.m4 (m4_dumpdef): New implementation.
* doc/autoconf.texi (Redefined M4 Macros) <m4_dumpdef>: Mention
semantic differences as well as m4_dumpdefs.
* NEWS: Likewise.
* tests/m4sugar.at (m4@&t@_dumpdef): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-28 14:02:34 -06:00
Eric Blake
bc9d68de41 Add AS_VAR_ARITH.
* lib/m4sugar/m4sh.m4 (_AS_VAR_ARITH_PREPARE, _AS_VAR_ARITH_WORKS)
(AS_VAR_ARITH): New macros.
(_AS_PREPARE, AS_PREPARE): Emit preparation.
* tests/m4sh.at (AS@&t@_VAR_ARITH): New test.
* doc/autoconf.texi (Polymorphic Variables) <AS_VAR_ARITH>:
Document new macro.
(Limitations of Usual Tools) <expr>: Mention portability problem
if first argument starts with -.
(Shell Substitutions) <$((expression))>: Mention it.
* NEWS: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-10-27 16:11:56 -06:00