2.5.1 only the last one is honored:
> echo "foonbar" | egrep -e 'foo' -e 'bar'
bar
> echo "foonbar" | egrep -e 'bar' -e 'foo'
foo
Reported by Nicolas Joly.
An alternative would have to use `sed', unfortunately alternation
is not portable.
* tests/actest.m4 (join): New macro.
(AC_ENV_SAVE): Join the egrep patterns into a single big one.
* tests/Makefile.am (EGREP_EXCLUDE): Rename as FILTER_MACROS.
Join the egrep patterns into a single big one.
find config.guess, install-sh etc.
Reported by Erez Zadok.
* tests/atspecific.m4 (AT_TEST_MACRO): Set AC_CONFIG_AUX_DIR to
top_srcdir in configure.in, and pass the value of top_srcdir to
configure.
(AC_CHECK_PROG): Use it. Use ifval.
(AC_CHECK_PROGS): Use ifval. Fix the quoting.
* tests/semantics.m4: Test AC_CHECK_PROG.
* tests/Makefile.am (EGREP_EXCLUDE): Add /AC_CHECK_PROGS?/.
AT macro with selects which are the AC macros to test, just
produce the list of the AC macros we want to test.
* tests/atspecific.m4 (TEST_MACRO): Removed.
* tests/Makefile.am (EGREP_EXCLUDE): New variable, performing the
selection TEST_MACRO used to do.
(macros.m4): Use it. Use AT_TEST_MACRO, not TEST_MACRO. Check
also AU macros.
Reported by Erez Zadok.
* tests/torture.m4 (config.status under extreme conditions):
Reorganized. Because files required by this test were created
outside the pair AT_SETUP/AT_CLEANUP, when the test fails and
autotest extracts this test, the `debug' script does not contain
the files it needs. Now AT_SETUP/AT_CLEANUP encloses the full
auto contained section.
Reported by Franc,ois Pinard and Rainer Orth.
* autoreconf.sh: Removed spurious `;;'.
Formatting changes.
* tests/tools.m4 (Syntax of the scripts): Run `sh -n' on all the
shell scripts.
Also remove trailing blanks.
* tests/Makefile.am (testsuite): Use sed instead of cat.
* tests/torture.m4: No longer check for a trailing space.
* autoconf.sh: Likewise.
Test it.
* acgeneral.m4 (AC_OUTPUT_HEADERS): Renamed as...
(_AC_OUTPUT_HEADERS): this. All callers changed.
Don't mess with changequote, just quote properly.
Bug 1. Because of the `#' in `ac_dA', the quotes <<>> were not
removed, and therefore the sed script contained `<<define>>'
instead of `define'. Now that the block is properly quoted, there
is no need to quote `define'.
Bug 2. Once a `#define' substitution performed, we were branching
to the top of the sed script (`t top'). This resulted in an
endless substitution of `#define foo 1' to `#define foo 1'.
Branching is not enough: you also have to fetch the next input
line, i.e., use `t' instead of `t t' in ac_dD, and don't output
`: top' in `config.defines'.
Though it was correct for `#undef' templates, just apply the same
transformation to `ac_uD' and `config.undefs'.
Bug 3. Don't try to preserve what was behind the value in the
template, since on
#define NAME "bar baz"
it leads to
#define NAME 1 baz"
Now `ac_dB' catches everything behind the NAME (making sure there
is at least a space) and `ac_dC' only outputs a space.
* tests/torture.m4: Check that various forms of `#define' header
templates are properly handled.
`AC_CHECK_TYPE',
Based on ideas from Paul Eggert and Alexandre Oliva.
* acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): Renamed as
(_AC_CHECK_TYPE_NEW): this.
(AC_CHECK_TYPES): Adjusted.
(AC_CHECK_TYPE): Renamed as
(_AC_CHECK_TYPE_OLD): This. Adjusted to _AC_CHECK_TYPE_NEW.
No longer support extra includes, stick to 2.13's interface.
(_AC_CHECK_TYPE_BUILTIN_P): New macro.
(AC_CHECK_TYPE): New macro.
* autoheader.m4 (autoheader::AC_CHECK_TYPE): Renamed as...
(autoheader::_AC_CHECK_TYPE_OLD): this.
* tests/atspecific.m4 (TEST_MACRO): Skip /^_AC_/ macros.
* tests/semantics.m4: Test the choices of AC_CHECK_TYPE (wrt _NEW
or _OLD implemenation).
* doc/autoconf.texi (Generic Types): Reorganized. Explain
everything about AC_CHECK_TYPE and Co.
AC_LINK_FILES($from, $to)
`$from' and `$to' can be lists, hence `AC_CONFIG_LINKS($to:$from)'
is wrong.
Reported by H.J. Lu.
* acgeneral.m4 (AC_LINK_FILES): Replace the m4-glue code from
AC_LINK_FILES to AC_CONFIG_LINKS, with sh-glue code.
Give a detailed update message.
(_AC_LINK_FILES_CNT): New variable. Initialize.
* tests/tools.m4 (autoupdate): No longer exercise `autoupdate'
with AC_LINK_FILES.
* acgeneral.m4 (AC_INIT_PARSE_ARGS, getopt loop): Always define
ac_optarg as the rhs of the first `=', not only on `-.*=', so that
`configure var=val' defines ac_optarg=val.
Improve the robustness to shell special characters:
- Use grep when checking that shell variable names are valid.
- Quote the quotes in ac_optarg before `eval var='$ac_optarg''.
- Quote the quotes when building ac_configure_args.
* tests/torture.m4: Test that `./configure foo=bar' works properly.
* autoheader.m4 (autoheader::AH_DEFUN): New macro.
* tests/tools.m4: New file, in charge of testing the scripts.
All the dependencies adapted.
* tests/actest.m4 (autoheader::AC_TATOOINE): New macro, used while
testing autoheader.
* tests/atspecific.m4: Create config.hin instead of config.h.in.
quotes.
* libm4.m4 (m4_split): Quote the elements of the list you produce.
* tests/base.m4: New file, testing libm4.
All callers adapted.
Test m4_wrap.
given in the prologue of acobsolete.m4.
* acgeneral.m4 (Prologue): Enter the `autoconf' name space.
(AU_DEFUN): New macro.
* autoupdate.m4: New file.
Disable the name spaces `autoconf', and `libm4'. Disable libm4.
* Makefile.am: Tuned to support the changes above.
* autoupdate.sh: Model after autoconf.sh.
Can run on several files at once (for instance m4/*.m4).
Don't touch files that are up to date.
Run m4 on autoupdate.m4f instead of playing with sed.
Use AU_DEFUN.
* acgeneral.m4 (AC_LINK_FILES, AC_ENABLE, AC_WITH): Use AU_DEFUN,
remove the call to AC_OBSOLETE.
* acspecific.m4 (AC_CYGWIN32): Likewise.
* acoldnames.m4: Replaced all the definitions via `define' or
`AC_DEFUN' to use `AU_DEFUN'.
test.
* acgeneral.m4 (AC_CHECK_SIZEOF): Don't over quote $1, some []
were left in the C code, and had the macro fail.
Use AC_INCLUDES_DEFAULT.
* doc/autoconf.texi: Mention default includes. Explain stdio.h
must always be given.
* tests/atspecific.m4 (TEST_MACRO): Updated the list of
exceptions.
(AT_CHECK_DEFINES): New macro, to check the content of config.h.
* tests/semantics.m4: All the tests are updated to use
AT_CHECK_DEFINES.
Test AC_CHECK_SIZEOF, AC_CHECK_HEADERS, and AC_CHECK_FUNCS.