]> git.ipfire.org Git - thirdparty/autoconf.git/log
thirdparty/autoconf.git
16 years agoHandle version numbers as decimal, even if they start with 0.
Eric Blake [Fri, 21 Nov 2008 04:02:22 +0000 (21:02 -0700)] 
Handle version numbers as decimal, even if they start with 0.

* lib/m4sugar/m4sugar.m4 (_m4_version_unletter): Avoid
interpreting leading zeros as octal.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoSpeed up AT_CHECK.
Eric Blake [Fri, 21 Nov 2008 00:06:22 +0000 (17:06 -0700)] 
Speed up AT_CHECK.

* lib/autotest/general.m4 (AT_CHECK, AT_CHECK_UNQUOTED): Expand
third and fourth arguments once.
(_AT_CHECK): Don't re-expand expected output.  Rearrange code for
fewer scans of arguments.
(AT_CHECK): Update caller.
(AT_INIT) <at_fn_filter_trace>: Drop parameter.
* tests/m4sugar.at (m4@&t@_split): Protect test with
quadrigraphs.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoFix XFAIL related to AT_CHECK.
Eric Blake [Fri, 21 Nov 2008 00:23:52 +0000 (17:23 -0700)] 
Fix XFAIL related to AT_CHECK.

* lib/autotest/general.m4 (AT_CHECK, AT_CHECK_UNQUOTED): Expand
first argument once.
(_AT_CHECK): Don't re-expand commands.
* tests/autotest.at (Multiline command from M4 expansion): Remove
XFAIL.
* tests/tools.at (autoupdating AU_ALIAS): Quote unbalanced paren.
* NEWS: Document the fallout.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoReduce forks in AC_DEFINE.
Eric Blake [Fri, 14 Nov 2008 04:20:18 +0000 (21:20 -0700)] 
Reduce forks in AC_DEFINE.

* lib/autoconf/general.m4 (_AC_DEFINE_Q_PRINT): New macro.
(_AC_DEFINE_Q): Use it to avoid forks for all AC_DEFINE and most
AC_DEFINE_UNQUOTED.
* lib/autoconf/fortran.m4 (_AC_FC_WRAPPERS): Properly quote #.
* tests/torture.at (Substitute and define special characters):
(Define to a 2000-byte string): Enhance tests to cover
AC_DEFINE_UNQUOTED.
(@%:@define header templates): Enhance test to cover #.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoImprove m4_expand robustness, part 2.
Eric Blake [Wed, 19 Nov 2008 18:38:18 +0000 (11:38 -0700)] 
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>
16 years agoImprove m4_expand robustness, part 1.
Eric Blake [Wed, 19 Nov 2008 16:00:55 +0000 (09:00 -0700)] 
Improve m4_expand robustness, part 1.

* lib/m4sugar/m4sugar.m4 (_m4_expand): Tolerate unquoted
unbalanced `)'.
* tests/m4sugar.at (m4@&t@_expand): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoAdd m4_chomp, m4_esyscmd_s.
Eric Blake [Thu, 13 Nov 2008 04:45:42 +0000 (21:45 -0700)] 
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>
16 years agoRemove _m4_index.
Eric Blake [Thu, 13 Nov 2008 04:10:35 +0000 (21:10 -0700)] 
Remove _m4_index.

* lib/m4sugar/m4sugar.m4 (_m4_index): Delete; it is more efficient
to make callers guarantee a match.
(m4_init): Adjust caller.
* lib/autoconf/status.m4 (_AC_CONFIG_COMPUTE_DEST): Likewise.
* lib/autoconf/general.m4 (_AC_DEFINE_Q): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoDescribe different hacks for balancing ')' in case statements.
Eric Blake [Thu, 20 Nov 2008 21:29:58 +0000 (14:29 -0700)] 
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>
16 years agoSpeed up _AS_QUOTE.
Eric Blake [Thu, 20 Nov 2008 19:08:14 +0000 (12:08 -0700)] 
Speed up _AS_QUOTE.

* lib/m4sugar/m4sh.m4 (_AS_QUOTE_IFELSE): Inline into...
(_AS_QUOTE): ...here, delete unused second paramenter, and factor
choice into...
(_AS_QUOTE_MODERN, _AS_QUOTE_OLD): ...new helpers.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoFor consistency, make temporary variable match language name.
Alfred G. de Wijn [Thu, 20 Nov 2008 12:48:07 +0000 (05:48 -0700)] 
For consistency, make temporary variable match language name.

* lib/autoconf/fortran.m4 (_AC_PROG_FC_G, _AC_PROG_FC_V_OUTPUT):
Match the save/test variables' names to the FFLAGS/FCFLAGS being
saved.
* THANKS: Update.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoImprove testsuite generation.
Eric Blake [Wed, 19 Nov 2008 16:25:22 +0000 (09:25 -0700)] 
Improve testsuite generation.

* tests/local.at (AT_DATA_M4SUGAR, AT_DATA_M4SH)
(AT_DATA_AUTOCONF): Escape all quadrigraphs, not just @&t@.  Use
fewer macros.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoUse fn for shell functions, func for autoconf CHECK_FUNCS.
Eric Blake [Tue, 18 Nov 2008 16:40:03 +0000 (09:40 -0700)] 
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>
16 years agoAlter default value of AS_EXIT.
Eric Blake [Wed, 19 Nov 2008 03:58:19 +0000 (20:58 -0700)] 
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>
16 years agoUpdate example to match actual Tru64 behavior.
Eric Blake [Wed, 19 Nov 2008 03:07:19 +0000 (20:07 -0700)] 
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>
16 years agoAdd AS_SET_STATUS, make AS_EXIT more efficient.
Eric Blake [Mon, 17 Nov 2008 22:49:30 +0000 (15:49 -0700)] 
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>
16 years agoDocument Tru64 bug with 'set -e'.
Eric Blake [Tue, 18 Nov 2008 15:45:04 +0000 (08:45 -0700)] 
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>
16 years agoDocument a Solaris /bin/sh bug with 'set -e'.
Eric Blake [Tue, 18 Nov 2008 13:30:37 +0000 (06:30 -0700)] 
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>
16 years agoDetect empty list in AS_FOR.
Eric Blake [Mon, 17 Nov 2008 13:20:27 +0000 (06:20 -0700)] 
Detect empty list in AS_FOR.

* lib/m4sugar/m4sh.m4 (AS_FOR): Handle iteration over $@
properly.
* tests/m4sh.at (AS@&t@_FOR): Enhance test to catch it.
Reported by Paolo Bonzini.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoUse a different workaround for an automake quirk.
Ralf Wildenhues [Sun, 16 Nov 2008 22:03:29 +0000 (23:03 +0100)] 
Use a different workaround for an automake quirk.

* tests/Makefile.am (AUTOMAKE_OPTIONS): Remove.
(distclean_generic): New helper variable, to fool automake.
($(distclean_generic)): Depend on clean-local, to prevent
the race in the two rules with accessing and removing
$(TESTSUITE).
Report by Eric Blake.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16 years agoSimplify, avoid unbalanced parentheses from last change.
Ralf Wildenhues [Sun, 16 Nov 2008 22:00:22 +0000 (23:00 +0100)] 
Simplify, avoid unbalanced parentheses from last change.

* lib/m4sugar/m4sh.m4 (_AS_VAR_ARITH_PREPARE): Simplify, avoid
unbalanced parentheses from last change.
Spotted by Eric Blake, fix suggested by Paolo Bonzini.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16 years agoFix exit status of expr version of as_func_arith.
Ralf Wildenhues [Sun, 16 Nov 2008 21:18:07 +0000 (22:18 +0100)] 
Fix exit status of expr version of as_func_arith.

* lib/m4sugar/m4sh.m4 (_AS_VAR_ARITH_PREPARE): Count an exit
status of 1 of expr also as success, to avoid failure if the
computation result is zero.  Fixes test failures with IRIX sh,
where the expr variant of as_func_arith is used.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16 years agoDo not use read-only variable $status.
Ralf Wildenhues [Sun, 16 Nov 2008 16:54:54 +0000 (17:54 +0100)] 
Do not use read-only variable $status.

* tests/compile.at (AC_RUN_IFELSE): Use $estatus instead of
$status, for zsh.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16 years agoUse the new AS_FOR function.
Eric Blake [Sat, 15 Nov 2008 17:36:22 +0000 (10:36 -0700)] 
Use the new AS_FOR function.

* lib/autoconf/functions.m4 (AC_CHECK_FUNCS): Use new
abstraction for cleaner code.
* lib/autoconf/headers.m4 (AC_CHECK_HEADERS): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoAdd AS_FOR, undocumented for now.
Eric Blake [Sat, 15 Nov 2008 17:17:06 +0000 (10:17 -0700)] 
Add AS_FOR, undocumented for now.

* lib/m4sugar/m4sh.m4 (AS_FOR): New macro.
* tests/m4sh.at (AS@&t@_FOR): New test.
Suggested by Paolo Bonzini.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoOptimize single-argument loop.
Eric Blake [Thu, 13 Nov 2008 21:02:51 +0000 (14:02 -0700)] 
Optimize single-argument loop.

* lib/autoconf/functions.m4 (AC_CHECK_FUNCS): Avoid forks when
loop only has one argument.
* lib/autoconf/headers.m4 (AC_CHECK_HEADERS): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoFix AS_ESCAPE usage bugs.
Eric Blake [Thu, 13 Nov 2008 19:17:01 +0000 (12:17 -0700)] 
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>
16 years agoWhitespace reduction in configure.
Eric Blake [Tue, 11 Nov 2008 17:34:08 +0000 (10:34 -0700)] 
Whitespace reduction in configure.

* lib/autoconf/autoheader.m4 (AH_VERBATIM): Avoid empty lines.
* lib/autoconf/general.m4 (_AC_INIT_PREPARE, AC_CHECK_FILES):
Likewise.
(_AC_DEFINE_Q): Restore empty line, since some clients in the wild
depend on it.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoMake M4sh, not autoconf, guarantee sane $SHELL.
Eric Blake [Thu, 13 Nov 2008 03:10:09 +0000 (20:10 -0700)] 
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>
16 years agoWrap keywords in `testsuite --list' output.
Ralf Wildenhues [Wed, 12 Nov 2008 22:54:01 +0000 (23:54 +0100)] 
Wrap keywords in `testsuite --list' output.

* lib/autotest/general.m4 (AT_INIT): Rewrite --list awk script,
avoid lint warnings from gawk, wrap keyword lists to stay below
80 characters per line if possible.
* tests/autotest.at (Keyword wrapping): New test.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16 years agoBump copyright years in local.at.
Ralf Wildenhues [Wed, 12 Nov 2008 06:16:00 +0000 (07:16 +0100)] 
Bump copyright years in local.at.

* tests/local.at (AT_COPYRIGHT): Bump copyright years.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16 years agoFix a couple of typos in the manual.
Ralf Wildenhues [Wed, 12 Nov 2008 06:14:19 +0000 (07:14 +0100)] 
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>
16 years agoWork around <=m4-1.4.9 bug in m4_format.
Eric Blake [Tue, 11 Nov 2008 04:00:44 +0000 (21:00 -0700)] 
Work around <=m4-1.4.9 bug in m4_format.

* lib/m4sugar/m4sugar.m4 (_m4_index): New internal macro.
(m4_init): Only use it in older m4.
* lib/autoconf/general.m4 (_AC_DEFINE_Q): Use it to avoid
m4_format bug in older m4.
* lib/autoconf/status.m4 (_AC_CONFIG_COMPUTE_DEST): Likewise.
Reported by Bob Proulx.

Signed-off-by: Eric Blake <ebb9@byu.net>
16 years agoMatch upstream standards.texi.
Eric Blake [Tue, 11 Nov 2008 02:38:05 +0000 (19:38 -0700)] 
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>
17 years agoYet more FDL 1.3 fallout.
Eric Blake [Mon, 10 Nov 2008 23:06:59 +0000 (16:06 -0700)] 
Yet more FDL 1.3 fallout.

* NEWS: Mention manual license change.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoAvoid some regex uses.
Eric Blake [Fri, 7 Nov 2008 14:11:01 +0000 (07:11 -0700)] 
Avoid some regex uses.

* lib/autoconf/general.m4 (_AC_DEFINE_Q): Use m4_format rather
than m4_bpatsubst to grab string prefix.
* lib/autoconf/status.m4 (_AC_CONFIG_REGISTER)
(_AC_CONFIG_REGISTER_DEST, AC_CONFIG_SUBDIRS): Likewise.
(_AC_FILE_DEPENDENCY_TRACE_COLON): Use m4_translit instead of
m4_bpatsubst to change bytes.
(_AC_CONFIG_DEPENDENCY_DEFAULT): Use m4_index rather than
m4_bmatch to find byte.
(_AC_CONFIG_COMPUTE_DEST): New helper macro.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoUse more efficient macros in AC_CONFIG_SUBDIRS.
Eric Blake [Fri, 7 Nov 2008 13:20:12 +0000 (06:20 -0700)] 
Use more efficient macros in AC_CONFIG_SUBDIRS.

* lib/autoconf/status.m4 (_AC_CONFIG_FOOS, AC_CONFIG_SUBDIRS): Use
m4_map_args_w.
(_AC_OUTPUT_FILE): Use m4_map_args_sep and m4_map_args.
(_AC_OUTPUT_FILE_ADJUST_DIR): New helper macro.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoUse more efficient macros in AC_CHECK_FILES and AC_CHECK_DECLS.
Eric Blake [Fri, 7 Nov 2008 04:40:18 +0000 (21:40 -0700)] 
Use more efficient macros in AC_CHECK_FILES and AC_CHECK_DECLS.

* lib/autoconf/general.m4 (AC_CHECK_FILES): Use m4_map_args_w,
and avoid typo.
(AC_CHECK_DECLS, AC_CHECK_DECLS_ONCE): Use m4_map_args_sep.
(_AC_CHECK_FILES, _AC_CHECK_DECLS, _AC_CHECK_DECL_ONCE): New
helper macros.
(AC_LIBSOURCES): Use m4_map_args.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoUse more efficient macros in AC_CHECK_TYPES.
Eric Blake [Fri, 7 Nov 2008 00:18:35 +0000 (17:18 -0700)] 
Use more efficient macros in AC_CHECK_TYPES.

* lib/autoconf/types.m4 (AC_CHECK_TYPES, AC_CHECK_MEMBERS): Use
m4_map_args_sep.
(_AC_CHECK_TYPES, _AC_CHECK_MEMBERS): New helper macros.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoUse more efficient macros in AC_CHECK_HEADERS.
Eric Blake [Thu, 6 Nov 2008 21:04:55 +0000 (14:04 -0700)] 
Use more efficient macros in AC_CHECK_HEADERS.

* lib/autoconf/headers.m4 (AH_CHECK_HEADERS)
(AH_CHECK_HEADERS_DIRENT): Rename...
(_AH_CHECK_HEADER, _AH_CHECK_HEADER_DIRENT): ...and take only one
argument, rather than a list.
(AC_CHECK_HEADERS, AC_CHECK_HEADERS_ONCE):
Adjust callers to use m4_map_args_w.
(AC_HEADER_DIRENT): Adjust caller to use m4_map_args.
(_AC_CHECK_HEADER_ONCE): New helper macro.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoUse more efficient macros in AC_CHECK_FUNCS.
Eric Blake [Thu, 6 Nov 2008 18:33:04 +0000 (11:33 -0700)] 
Use more efficient macros in AC_CHECK_FUNCS.

* lib/autoconf/functions.m4 (_AH_CHECK_FUNCS): Rename...
(_AH_CHECK_FUNC): ...and take only one argument, rather than a
list.
(AC_CHECK_FUNCS, AC_CHECK_FUNCS_ONCE): Adjust callers to use
m4_map_args_w.
(_AC_CHECK_FUNC_ONCE): New helper macro.
(AC_REPLACE_FUNCS): Use m4_map_args_w.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoUse more efficient macro in AT_INIT.
Eric Blake [Thu, 6 Nov 2008 21:32:23 +0000 (14:32 -0700)] 
Use more efficient macro in AT_INIT.

* lib/autotest/general.m4 (AT_INIT): Use m4_map_args.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoMore FDL 1.3 fallout.
Eric Blake [Mon, 10 Nov 2008 18:09:54 +0000 (11:09 -0700)] 
More FDL 1.3 fallout.

* cfg.mk (fetch): Add gnu-oids.texi, drop fdl.texi.
* doc/Makefile.am (standards_TEXINFOS): Reflect upstream
dependency changes.
* doc/fdl.texi: Delete.
* doc/gnu-oids.texi: New upstream file.
* doc/standards.texi: Resync from upstream.
* doc/make-stds.texi: Likewise.
* build-aux/announce-gen: Likewise.
* build-aux/texinfo.tex: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoPass autoreconf -I to aclocal -I
Clinton Roy [Fri, 24 Oct 2008 02:36:47 +0000 (12:36 +1000)] 
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>
17 years agoTry 'print -r --' as a non-forking variant of 'printf %s\\n'.
Eric Blake [Mon, 10 Nov 2008 15:28:48 +0000 (08:28 -0700)] 
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>
17 years agoProvide a section on all tools allowed in GNU Coding Standards.
Eric Blake [Fri, 7 Nov 2008 21:03:21 +0000 (14:03 -0700)] 
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>
17 years agoBalance parentheses in _AC_CACHE_DUMP.
Paolo Bonzini [Sun, 9 Nov 2008 13:46:12 +0000 (14:46 +0100)] 
Balance parentheses in _AC_CACHE_DUMP.

* lib/autoconf/general.m4 (_AC_CACHE_DUMP): Balance parentheses
without introducing \).

17 years agoFurther doc updates for AC_CHECK_HEADER change.
Eric Blake [Fri, 7 Nov 2008 16:28:57 +0000 (09:28 -0700)] 
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>
17 years agoUse UTF-8 in ChangeLog.
Eric Blake [Fri, 7 Nov 2008 15:57:34 +0000 (08:57 -0700)] 
Use UTF-8 in ChangeLog.

* ChangeLog: Enforce UTF-8 encoding.
The file was converted from Latin-1 by commit b83aa7.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoSkip preprocessor check in AC_CHECK_HEADERS_ONCE.
Eric Blake [Thu, 6 Nov 2008 21:40:47 +0000 (14:40 -0700)] 
Skip preprocessor check in AC_CHECK_HEADERS_ONCE.

* lib/autoconf/headers.m4 (_AC_HEADERS_EXPANSION): Provide fourth
argument to speed up check.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoSpeed up AC_CHECK_TYPE.
Eric Blake [Thu, 6 Nov 2008 23:29:53 +0000 (16:29 -0700)] 
Speed up AC_CHECK_TYPE.

* lib/autoconf/types.m4 (AC_CHECK_TYPE): Factor out $@, and avoid
regex when enough arguments are present.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoRemove three forks per _AC_RUN_LOG_STDERR in the common case.
Paolo Bonzini [Thu, 6 Nov 2008 10:42:39 +0000 (11:42 +0100)] 
Remove three forks per _AC_RUN_LOG_STDERR in the common case.

* lib/autoconf/general.m4 (_AC_RUN_LOG_STDERR): Avoid grep/rm/cat
sequence when the program's stderr was empty, while providing a
conftest.err file even in that case.
(_AC_CACHE_DUMP): Fix mismatched parenthesis.

17 years agoChange `present but cannot be compiled' behavior to use compiler result.
Paolo Bonzini [Thu, 6 Nov 2008 09:54:51 +0000 (10:54 +0100)] 
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.

17 years agoAdd m4_map_args_w.
Eric Blake [Thu, 6 Nov 2008 00:11:15 +0000 (17:11 -0700)] 
Add m4_map_args_w.

* lib/m4sugar/m4sugar.m4 (m4_map_args_w): New macro, undocumented
for now.
(_m4_split): Allow user control over separator.
(m4_split): Adjust caller.
(m4_foreach_w, m4_append_uniq_w, _m4_text_wrap): Rewrite to use
m4_map_args_w.
* tests/m4sugar.at (m4@&t@_append): Augment test keywords.
(M4 loops): Test new interface.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoUse m4_set_map_sep in more places.
Eric Blake [Wed, 5 Nov 2008 19:09:00 +0000 (12:09 -0700)] 
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>
17 years agoUnify m4_set_foreach and m4_set_map.
Eric Blake [Wed, 5 Nov 2008 18:47:04 +0000 (11:47 -0700)] 
Unify m4_set_foreach and m4_set_map.

* lib/m4sugar/m4sugar.m4 (m4_set_map_sep): New macro, undocumented
for now.
(m4_set_contents, m4_set_foreach, m4_set_list, m4_set_listc)
(m4_set_map): Adjust callers.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoUse _m4_foreach in more places.
Eric Blake [Wed, 5 Nov 2008 18:12:42 +0000 (11:12 -0700)] 
Use _m4_foreach in more places.

* lib/m4sugar/foreach.m4 (m4_dquote_elt, m4_join, m4_joinall)
(_m4_minmax, m4_set_add_all): Use _m4_foreach instead of
m4_foreach.
* lib/m4sugar/m4sugar.m4 (_m4_joinall): Use m4_map_args_sep
instead of m4_foreach or m4_map_args.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoUnify _m4_foreach and _m4_map.
Eric Blake [Wed, 5 Nov 2008 14:15:56 +0000 (07:15 -0700)] 
Unify _m4_foreach and _m4_map.

* lib/m4sugar/m4sugar.m4 (_m4_map): Delete, merged with...
(_m4_foreach): ...this.
(m4_foreach, m4_map, m4_mapall, m4_map_sep, _m4_mapall_sep)
(m4_map_args, m4_map_args_sep): Adjust callers.
* lib/m4sugar/foreach.m4 (_m4_map): Rename...
(_m4_foreach): ...to this, overwriting old definition.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoAdd m4_map_args_sep, undocumented for now.
Eric Blake [Tue, 4 Nov 2008 00:17:38 +0000 (17:17 -0700)] 
Add m4_map_args_sep, undocumented for now.

* lib/m4sugar/m4sugar.m4 (m4_map_args_sep): New macro.
(_m4_map): Change API to cover more of m4_map*.
* lib/m4sugar/foreach.m4 (_m4_map): Adjust to new API.
(m4_map_args): Delete.
* tests/m4sugar.at (m4@&t@_map_args and m4@&t@_curry): Enhance
test.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoImprove m4_for performance.
Eric Blake [Tue, 4 Nov 2008 19:35:09 +0000 (12:35 -0700)] 
Improve m4_for performance.

* lib/m4sugar/m4sugar.m4 (_m4_for): Alter API to make it easier to
avoid m4_define by some clients.
(m4_for): Adjust caller.
* lib/m4sugar/foreach.m4 (_m4_foreach, m4_case, m4_bmatch)
(_m4_cond, _m4_bpatsubsts, _m4_shiftn, m4_do, m4_reverse)
(_m4_map, m4_map_args, m4_map_args_pair, _m4_list_pad)
(_m4_list_cmp): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoAdjust expected output.
Eric Blake [Wed, 5 Nov 2008 04:22:16 +0000 (21:22 -0700)] 
Adjust expected output.

* tests/torture.at (Missing templates): Reflect added quoting.
Detected by Bob Proulx's buildbot.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoReject arguments with leading =; test previous patch.
Eric Blake [Wed, 5 Nov 2008 02:13:38 +0000 (19:13 -0700)] 
Reject arguments with leading =; test previous patch.

* tests/base.at (configure arguments): Test this.
Reported by Jeff Squyres.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoReject arguments with leading =.
Eric Blake [Tue, 4 Nov 2008 15:20:00 +0000 (08:20 -0700)] 
Reject arguments with leading =.

* lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Detect case of
missing variable name, with fewer forks.  Quote invalid arguments
in message, in case they include spaces.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS)
(_AC_OUTPUT_MAIN_LOOP): Quote invalid arguments.
* lib/autotest/general.m4 (AT_INIT): Likewise.
Reported by Jeff Squyres.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoUpgrade to FDL 1.3.
Eric Blake [Tue, 4 Nov 2008 13:36:20 +0000 (06:36 -0700)] 
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>
17 years agoPoint at AM_SUBST_NOTMAKE.
Ralf Wildenhues [Mon, 3 Nov 2008 21:52:43 +0000 (22:52 +0100)] 
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>
17 years agoDispatch on AC_LANG_CONFTEST
Paolo Bonzini [Mon, 3 Nov 2008 09:25:23 +0000 (10:25 +0100)] 
Dispatch on AC_LANG_CONFTEST

* lib/autoconf/c.m4 (AC_LANG_CONFTEST(C)): Define instead of
AC_LANG_SOURCE(C).
* lib/autoconf/general.m4 (_AC_INIT_PREPARE): Add a comment at the
top of confdefs.h, which also works around cpp deficiencies.
* lib/autoconf/lang.m4 (AC_LANG_DEFINE): Define AC_LANG_CONFTEST(xyz)
(AC_LANG_CONFTEST): Dispatch based on _AC_LANG.
(AC_LANG_CONFTEST()): New.

17 years agoReorganize definition of languages
Paolo Bonzini [Mon, 3 Nov 2008 09:20:11 +0000 (10:20 +0100)] 
Reorganize definition of languages

* lib/autoconf/c.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Objective C),
_AC_LANG_ABBREV(C), _AC_LANG_ABBREV(C++), _AC_LANG_ABBREV(Objective C),
_AC_LANG_PREFIX(C), _AC_LANG_PREFIX(C++), _AC_LANG_PREFIX(Objective C)):
Replace definitions with usage of AC_LANG_DEFINE.
(Sections 2b, 2c): Delete.
(Sections 1b, 1c): Move after section 2a.
* lib/autoconf/erlang.m4 (AC_LANG(Erlang), _AC_LANG_ABBREV(Erlang),
_AC_LANG_PREFIX(Erlang), AC_LANG_SOURCE(Erlang)): Replace definitions
with usage of AC_LANG_DEFINE.
(AC_LANG_ERLANG): Define using AU_DEFUN.
* lib/autoconf/fortran.m4 (AC_LANG(Fortran), AC_LANG(Fortran 77),
_AC_LANG_ABBREV(Fortran), _AC_LANG_ABBREV(Fortran 77),
_AC_LANG_PREFIX(Fortran), _AC_LANG_PREFIX(Fortran 77),
_AC_LANG_SOURCE(Fortran), AC_LANG_SOURCE(Fortran 77)): Replace
definitions with usage of AC_LANG_DEFINE.
* lib/autoconf/lang.m4 (AC_LANG_DEFINE, AC_LANG_SOURCE()): New.

17 years agoCommit ChangeLog entry
Paolo Bonzini [Mon, 3 Nov 2008 09:43:35 +0000 (10:43 +0100)] 
Commit ChangeLog entry

17 years agoUse preprocessor in cpp tests.
Paolo Bonzini [Mon, 3 Nov 2008 09:19:44 +0000 (10:19 +0100)] 
Use preprocessor in cpp tests.

* tests/c.at (CPP tests): Use AC_CHECK_HEADERS(..., [-]).

17 years agoRename _AC_CHECK_HEADER_OLD and _AC_CHECK_HEADER_NEW.
Paolo Bonzini [Fri, 31 Oct 2008 15:53:17 +0000 (16:53 +0100)] 
Rename _AC_CHECK_HEADER_OLD and _AC_CHECK_HEADER_NEW.

* lib/autoconf/headers.m4 (AC_CHECK_HEADER): Adjust naming.
(_AC_CHECK_HEADER_PREPROC_BODY): New name of _AC_CHECK_HEADER_OLD_BODY.
(_AC_CHECK_HEADER_COMPILE_BODY): New name of _AC_CHECK_HEADER_NEW_BODY.
(_AC_CHECK_HEADER_PREPROC): New name of _AC_CHECK_HEADER_OLD.
(_AC_CHECK_HEADER_COMPILE): New name of _AC_CHECK_HEADER_NEW.
* tests/semantics.at (AC_CHECK_HEADERS_OLD, AC_CHECK_HEADER_NEW):
Give better name.

17 years agoSupport multiple undiverts and dumpdefs at once.
Eric Blake [Thu, 30 Oct 2008 21:51:26 +0000 (15:51 -0600)] 
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>
17 years agoSimplify diversion stack handling.
Eric Blake [Thu, 30 Oct 2008 21:32:56 +0000 (15:32 -0600)] 
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>
17 years agoSimplify expansion stack handling.
Eric Blake [Thu, 30 Oct 2008 18:16:15 +0000 (12:16 -0600)] 
Simplify expansion stack handling.

* lib/m4sugar/m4sugar.m4 (m4_expansion_stack): Use fewer macros;
always output 'top level'.
(_m4_expansion_stack_entry): New macro, to format the string only
when needed.
(m4_expansion_stack_push): Only push a macro name.
(m4_warn, _m4_defun_pro): Update callers.
(m4_expansion_stack_pop, m4_expansion_stack_dump): Delete.
(_m4_defun_epi, m4_fatal): Inline the calls.
* tests/m4sugar.at (m4@&t@_expansion_stack): New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoBetter documentation of AC_CHECK_HEADER's fourth argument.
Eric Blake [Fri, 31 Oct 2008 04:05:55 +0000 (22:05 -0600)] 
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>
17 years agoFix LINENO testsuite failure.
Eric Blake [Fri, 31 Oct 2008 00:50:39 +0000 (18:50 -0600)] 
Fix LINENO testsuite failure.

* tests/m4sh.at (AT_DATA_LINENO): Use AS_LINENO_PREPARE, not
undocumented _AS_PREPARE, and move unset earlier in script.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoUpdate LINENO documentation.
Eric Blake [Thu, 30 Oct 2008 16:56:11 +0000 (10:56 -0600)] 
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>
17 years agoDo not check for $LINENO in generated scripts.
Paolo Bonzini [Thu, 30 Oct 2008 14:19:49 +0000 (15:19 +0100)] 
Do not check for $LINENO in generated scripts.

* lib/m4sugar/m4sh.m4 (_AS_PREPARE): Do not call _AS_LINENO_PREPARE,
and explain why.

17 years agoDon't check for non-POSIX extensions in suggested tests.
Eric Blake [Thu, 30 Oct 2008 15:39:57 +0000 (09:39 -0600)] 
Don't check for non-POSIX extensions in suggested tests.

* lib/m4sugar/m4sh.m4 (_AS_VAR_APPEND_WORKS): Remove suggestion;
we still use += if available, but should not reject shells (like
dash) that don't provide it.
(_AS_DETECT_SUGGESTED): Document a policy for m4sh.
Reported by Paolo Bonzini.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoPass CONFIG_SHELL down to generated scripts, and re-export SHELL.
Paolo Bonzini [Thu, 30 Oct 2008 14:13:56 +0000 (15:13 +0100)] 
Pass CONFIG_SHELL down to generated scripts, and re-export SHELL.

* lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): If proceeding
with a given CONFIG_SHELL, move it to SHELL.
(AS_INIT_GENERATED): Re-export SHELL.

17 years agoWork around Solaris /bin/sh case bug.
Eric Blake [Thu, 30 Oct 2008 12:56:44 +0000 (06:56 -0600)] 
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>
17 years agoRequire _AS_CR_PREPARE where appropriate and fix ChangeLog.
Paolo Bonzini [Thu, 30 Oct 2008 12:54:27 +0000 (13:54 +0100)] 
Require _AS_CR_PREPARE where appropriate and fix ChangeLog.

* lib/m4sugar/m4sh.m4 (_AS_PREPARE): Call _AS_CR_PREPARE.
(AS_PREPARE): Require _AS_CR_PREPARE.

17 years agotrim down the length of the shell function test
Paolo Bonzini [Thu, 30 Oct 2008 09:23:40 +0000 (10:23 +0100)] 
trim down the length of the shell function test

* lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_WORK): Condense.

17 years agoAvoid walking the entire PATH when looking for a better shell.
Paolo Bonzini [Thu, 30 Oct 2008 08:52:22 +0000 (09:52 +0100)] 
Avoid walking the entire PATH when looking for a better shell.

* lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Test shell characteristics
as the PATH is walked.

17 years agoAdd third argument to _AS_PATH_WALK
Paolo Bonzini [Thu, 30 Oct 2008 08:51:32 +0000 (09:51 +0100)] 
Add third argument to _AS_PATH_WALK

* lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Do not call _AS_CR_PREPARE.
(_AS_PATH_WALK): Add third optional argument.

17 years agoFix LINENO detection to work around bash and pdksh limitations.
Eric Blake [Wed, 29 Oct 2008 16:39:53 +0000 (10:39 -0600)] 
Fix LINENO detection to work around bash and pdksh limitations.

* lib/m4sugar/m4sh.m4 (_AS_LINENO_WORKS): Enhance the test, so
that we can choose which of two tests to trust.
(_AS_RUN): Set flag when alternate shell is running.
(_AS_DETECT_EXPAND): New macro.
(_AS_DETECT_BETTER_SHELL): Use it to massage LINENO tests.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoMention proper fix for zsh users.
Eric Blake [Wed, 29 Oct 2008 21:44:28 +0000 (15:44 -0600)] 
Mention proper fix for zsh users.

* lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Recommend zsh
version known to work.
Suggested by Paolo Bonzini.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoDocument current beta-quality status.
Eric Blake [Wed, 29 Oct 2008 15:27:11 +0000 (09:27 -0600)] 
Document current beta-quality status.

* configure.ac: Reflect fact that change to git-version-gen
produces -, but not always a letter, on non-release builds.
* BUGS: Mention known issues.
* lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Ask for help in
debugging platforms with deficient shells.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoAlter signature of AS_INIT_GENERATED.
Eric Blake [Tue, 28 Oct 2008 22:37:54 +0000 (16:37 -0600)] 
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>
17 years agoUse _m4_stack_reverse in m4_set.
Eric Blake [Tue, 28 Oct 2008 21:35:23 +0000 (15:35 -0600)] 
Use _m4_stack_reverse in m4_set.

* lib/m4sugar/m4sugar.m4 (_m4_set_contents_1)
(_m4_set_contents_2): Rewrite to share _m4_stack_reverse
implementation.
(m4_set_contents, m4_set_foreach, m4_set_list, m4_set_listc)
(m4_set_map): Adjust callers to new API.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoAdd m4_stack_foreach_sep.
Eric Blake [Tue, 28 Oct 2008 21:11:16 +0000 (15:11 -0600)] 
Add m4_stack_foreach_sep.

* lib/m4sugar/m4sugar.m4 (m4_stack_foreach_sep)
(m4_stack_foreach_sep_lifo): New macros.
(_m4_stack_reverse): Adjust prototype, to support it.
(m4_copy): Use fewer macros.
* tests/m4sugar.at (m4@&t@_stack_foreach): Rename...
(m4@&t@_stack): ...and add m4_stack_foreach_sep tests.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoMention Sun WorkShop 6.2 OpenMP bug.
Bruno Haible [Wed, 29 Oct 2008 10:47:23 +0000 (11:47 +0100)] 
Mention Sun WorkShop 6.2 OpenMP bug.

* doc/autoconf.texi (AC_OPENMP): Document portability pitfall.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoRewrite handling of diversion and expansion stack.
Paolo Bonzini [Tue, 28 Oct 2008 11:18:55 +0000 (12:18 +0100)] 
Rewrite handling of diversion and expansion stack.

* NEWS: Document stricter requirement on m4_init.
* lib/m4sugar/m4sugar.m4 (m4_divert_stack): New, replacing
_m4_divert_n_stack.
(_m4_divert_stack_push): New.
(m4_divert): Use _m4_divert_stack_push and replace m4_define with
m4_popdef.
(m4_divert_push): Use _m4_divert_stack_push.
(m4_divert_pop): Use m4_divert_stack instead of _m4_divert_n_stack,
pop _m4_divert_stack instead of m4_divert_stack.
(m4_expansion_stack): New.  Update comment above it.
(m4_expansion_stack_push, m4_expansion_stack_pop): Work on
_m4_expansion_stack instead of m4_expansion_stack.
(m4_expansion_stack_dump): Check presence of _m4_expansion_stack
instead of m4_expansion_stack.  Use m4_expansion_stack's expansion
instead of the definition, and compensate for the trailing newline
in the expansion.
(m4_warn, _m4_defun_pro, _m4_defun_epi): Check presence of
_m4_expansion_stack instead of m4_expansion_stack.
(m4_newline): Expand first argument after the newline.
(m4_init): Use m4_divert_stack instead of _m4_divert_n_stack,
* tests/m4sugar.at (m4_append, m4_text_wrap): Invoke m4_init.
* tests/tools.at (whitespace in file names, the empty token): Likewise.

17 years agoReduce forks while searching for better shell.
Eric Blake [Wed, 29 Oct 2008 03:31:12 +0000 (21:31 -0600)] 
Reduce forks while searching for better shell.

* lib/m4sugar/m4sh.m4 (_AS_DETECT_REQUIRED)
(_AS_DETECT_SUGGESTED): No need to provide extra subshell; _AS_RUN
already does the job.
(_AS_DETECT_BETTER_SHELL): Simplify AS_EXIT when not run in a trap
0 context.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoUndo needless efforts to protect $2 in $2_t.
Eric Blake [Wed, 29 Oct 2008 02:45:58 +0000 (20:45 -0600)] 
Undo needless efforts to protect $2 in $2_t.

* lib/autoconf/types.m4 (_AC_TYPE_INT_BODY)
(_AC_TYPE_UNSIGNED_INT_BODY): Reduce extra quoting.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoFix parallel test execution output lossage.
Ralf Wildenhues [Tue, 28 Oct 2008 21:04:36 +0000 (22:04 +0100)] 
Fix parallel test execution output lossage.

* lib/autotest/general.m4 (_AT_CHECK): Truncate files to hold
standard output and standard error before the test, use append
mode for writing.
* THANKS: Update.
Caught by Bob Proulx' build daemons, analysis and suggested fix
by Stéphane Chazelas.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17 years agoUse m4_map_args in more places.
Eric Blake [Tue, 28 Oct 2008 19:44:53 +0000 (13:44 -0600)] 
Use m4_map_args in more places.

* lib/m4sugar/m4sugar.m4 (m4_defn, m4_dumpdef, m4_popdef)
(m4_undefine, m4_combine): Use m4_map_args, rather than
m4_foreach.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoOverride m4 1.4.x dumpdef, as it breaks autom4te.
Eric Blake [Tue, 28 Oct 2008 18:14:06 +0000 (12:14 -0600)] 
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>
17 years agoAllow m4sugar to be used without autom4te, such as in bison.
Eric Blake [Tue, 28 Oct 2008 16:28:04 +0000 (10:28 -0600)] 
Allow m4sugar to be used without autom4te, such as in bison.

* lib/m4sugar/m4sugar.m4 (m4_text_wrap, m4_qlen): Document that
alternate escape sequences can be used.
(m4_text_box): Likewise.  Don't output quadrigraphs.
(m4_qdelta): Delete unused macro.

Signed-off-by: Eric Blake <ebb9@byu.net>
17 years agoadd m4_stack_foreach and m4_stack_foreach_lifo
Paolo Bonzini [Tue, 28 Oct 2008 10:27:31 +0000 (11:27 +0100)] 
add m4_stack_foreach and m4_stack_foreach_lifo

* lib/m4sugar/m4sugar.m4 (_m4_stack_reverse): New from _m4_copy.
(m4_stack_foreach, m4_stack_foreach_lifo): New.
(m4_copy): Use m4_stack_foreach and m4_curry.
(_m4_dumpdefs_down, _m4_dumpdefs_up): Remove.
(m4_dumpdefs): Rewrite using m4_stack_foreach_lifo.
* tests/m4sugar.at (m4_stack_foreach): New test.

17 years agouse a shell function for AC_TYPE_INTx_T
Paolo Bonzini [Mon, 20 Oct 2008 13:35:59 +0000 (15:35 +0200)] 
use a shell function for AC_TYPE_INTx_T

* lib/autoconf/types.m4 (_AC_TYPE_INT_BODY, _AC_TYPE_UNSIGNED_INT_BODY): New.
(_AC_TYPE_INT, _AC_TYPE_UNSIGNED_INT): Define and use a shell function.