`shell.m4' and the name space `AS_*'.
* acgeneral.m4 (AC_SHELL_IFELSE, _AC_SHELL_TMPDIR, AC_SHELL_UNSET)
(AC_SHELL_MKDIR_P, AC_SHELL_DIRNAME): Rename and move to...
* shell.m4 (AS_IFELSE, AS_TMPDIR, AS_UNSET, AS_MKDIR_P)
(AS_DIRNAME): here, a new file.
Adjust all dependencies.
* tests/base.m4 (m4_wrap): Eve out into...
* tests/shell.m4: here, new file.
* tests/base.m4 (AC_SHELL_MKDIR_P)
(AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): Eve out into...
* tests/m4sugar.m4 (AS_MKDIR_P, AS_DIRNAME & AS_DIRNAME_SED):
here, new file.
Adjust the test suite.
(AC_STATE_SAVE): ... this. Save the list of all files
in the current directory.
* tests/atspecific.m4 (_AT_CHECK_AC_MACRO): Compare lists of
files created by AC_ENV_SAVE. Remove state* before and after
the test.
ambiguities let's rename `libm4' (M4 code) as `m4sugar':
Readability And Greater Understanding Stands 4 M4sugar
name coined by Lars J. Aas.
* libm4.m4: Rename as...
* m4sugar.m4: this.
All dependencies adjusted.
`AC_PREREQ'.
* tests/tools.m4: Globally, don't use `../' to invoke the tested
tools, since the PATH is properly set, and in most cases it
obfuscates the test code.
(autoupdating AC_PREREQ): New tests.
are properly templated, autoheader traces
AC_DEFINE/AC_DEFINE_UNQUOTED. Only literals can be traced, and
actually tracing non literals produces invalid autoheader input.
Hence, provide a means to trace calls to
AC_DEFINE/AC_DEFINE_UNQUOTED with literals.
* acgeneral.m4 (AC_DEFINE_TRACE, AC_DEFINE_TRACE_LITERAL): New
macros.
(AC_DEFINE, AC_DEFINE_UNQUOTED): Use AC_DEFINE_TRACE.
* autoheader.sh: Trace AC_DEFINE_TRACE_LITERAL, not
AC_DEFINE/AC_DEFINE_UNQUOTED.
it includes another AU defined macro.
* autoupdate.sh (input.m4:_au_defun): New macro.
(au.m4): Use it instead of inlining _au_enable/_au_disable
invocations in the definition of all these macros.
(input.m4:__au_enable, input.m4:__au_disable): New macros.
(input.m4:_au_enable, input.m4:_au_disable): Use them.
* tests/mktests.sh (update_exclude_list): Add `AC_OUTPUT'.
Running it twice in a configure.in is not valid.
Add `AC_LINK_FILES' since it requires arguments.
* tests/tools.m4 (autoupdating AC_LINK_FILES): New test.
autoconf and autoheader. Expected warnings disabled by "-W none"
Preceding comment removed as no longer relevant.
* tests/semantics.m4 (AC_CHECK_PROG & AC_PATH_PROG): Check
stderr from autoconf.
(AC_PATH_PROG & AC_PATH_PROGS): Likewise.
(AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Likewise.
* tests/tools.m4 (autoheader): Check that autoheader prints
a warning for missing templates. Check stderr from autoconf.
* tests/torture.m4 (config.status under extreme conditions):
Check stderr from autoconf and autoheader.
(command line interface): Check stderr from autoconf.
(AT_INIT): Let `at_stop_on_error' and `at_verbose' be `:'/`false'
variables instead of `'/`1'.
`at_check_stds' replaces `at_no_redirs'.
Rename `Snippet 3' as `Snippet 4'.
Introduce `Snippet 3' for variable initializations.
Adjust the dependencies.
(AT_CHECK): Don't show diff's result unless verbose.
function calls.
Reported by John David Anglin.
* doc/autoconf.texi (Limitations of Usual Tools): Start the AWK
section.
* tests/tools.m4 (AWK portability): New test.
In fact, rename this option as -A, --autoconf-dir.
* autoconf.sh: Complain when -m, --macrodir is used.
Accept -A, --autoconf-dir.
Use $autoconf_dir instead of $AC_MACRODIR.
Adjust --help.
* autoheader.sh: Likewise.
* autoscan.sh: Likewise.
* autoupdate.sh: Likewise.
Use $optarg.
* autoreconf.sh: Likewise.
* doc/autoconf.texi: Adjust.
* tests: Adjust the test suite.
* tests/base.m4 (m4_wrap, AC_REQUIRE, AC_SHELL_MKDIR_P): Use it.
* autoconf.sh: Properly handle the case where `$output' is `-'
(i.e., stdout).
Handle `-ofile', not only `-o file'.
AC_CONFIG_COMMANDS, AC_CONFIG_FILES): Use a shell variable instead
of an m4 variable to store what must be done, so that sh
conditionals are honored.
(_AC_OUTPUT_LINKS, _AC_OUTPUT_HEADERS,
_AC_OUTPUT_COMMANDS, _AC_OUTPUT_FILES): Adjust.
* tests/semantics.m4: Test the four AC_CONFIG sisters.
* doc/autoconf.texi (Configuration Actions): Promote the use of
literals, show it works properly with sh conditionals.
| AC_DEFUN([TEST1], [REQUIRE([TEST2a])REQUIRE([TEST2b])])
| AC_DEFUN([TEST2a], [])
| AC_DEFUN([TEST2b], [REQUIRE([TEST3])])
| AC_DEFUN([TEST3], [REQUIRE([TEST2a])])
|
| AC_INIT
| TEST1
because it produces TEST3; TEST2a; TEST2b; TEST1.
Fix this bug, implement the solution provided by Axel Thimm,
and test AC_REQUIRE.
* acgeneral.m4: Document this implementation.
(_AC_DEFUN_PRO, _AC_DEFUN_EPI, AC_REQUIRE): Be sure that macros
are emitted in the same order as they are expanded.
(AC_REQUIRE): Forbid being calling out of an AC_DEFUN'd macro (in
particular the top level).
* tests/base.m4 (AC_REQUIRE): New test.
Use this technology to compute `sizeof' even when cross-compiling.
Ideas and initial suggestion by Kaveh Ghazi.
Binary search by Bruno Haible.
* aclang.m4 (AC_LANG_BOOL_COMPILE_TRY,
AC_LANG_BOOL_COMPILE_TRY(C), AC_LANG_BOOL_COMPILE_TRY(C++),
AC_LANG_INT_SAVE, AC_LANG_INT_SAVE(C), AC_LANG_INT_SAVE(C++)): New
macros.
* acgeneral.m4 (_AC_COMPUTE_INT_COMPILE, _AC_COMPUTE_INT_RUN,
_AC_COMPUTE_INT): New.
(AC_CHECK_SIZEOF): Use them.
Check whether the type exists beforehand.
* tests/semantics.m4 (AC_CHECK_SIZEOF): Strengthen.
* acgeneral.m4 (AC_CHECK_TOOLS): New.
* aclang.m4 (AC_PROG_CXX, AC_PROG_CC, AC_PROG_F77): Use new
AC_CHECK_TOOLS macro instead of AC_CHECK_PROGS so that a cross
compiler is found by default with --host.
* doc/autoconf.texi (Generic Programs, Manual Configuration):
Describe new AC_CHECK_TOOLS macro. Fix unclear working about
AC_CHECK_PROGS.
* tests/Makefile.am (FILTER_MACROS): Adjust.
* acspecific.m4 (AC_XENIX_DIR, AC_DYNIX_SEQ, AC_IRIX_SUN,
AC_SCO_INTL): Wake up a few zombies.
* doc/autoconf.texi: Adjust.
* tests/aclocal.m4 (AC_ENV_SAVE): Likewise.
`config.status'. Fix and test.
* acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Use
`$ac_configure_args' directly, no via a tmp variable.
* tests/torture.m4 (command line interface): Test with more than
one argument.
.
|
|
/-+ / + )===( U T O U P D A T E I V
// \
=========
_//_ _\_ The ``Eiffel Tower'' Release
* autoupdate.sh: Complete rewrite. See that file for a detailed
explanation. Basically, simulate the name spaces thanks to
`autoconf --trace' and auxiliary files.
No longer use `autoupdate.m4', remove the dependencies.
Synchronize the options and `--help'.
* doc/autoconf.texi (Invoking autoupdate): Humanoupdate.
* autoupdate.m4: Delete.
* tests/Makefile.am (FILTER_MACROS): Add `AC_OUTPUT'.
Since `AC_OUTPUT' is now AU_DEFUN'd, it is extracted for testing,
while it was not before.
* tests/tools.m4 (autoupdate): Re-enable. Adjust the expected
output with the right quotation (yeah!).
Pass `-m $top_srcdir': autoupdate want the `.m4' files, not the
frozen files.
* Makefile.am (nodistpkgdataDATA): Move `acversion.m4' to
(distpkgdataDATA): here, so that all the `.m4' files are in the
source hierarchy, not split across src and build.
* acversion.m4.in: Update to today's standards.
* Makefile.am: Adjust.
lists in between parens.
(m4_foreach_quoted): new copy of the previous `m4_foreach' which
is still used by `m4_wrap'.
* acgeneral.m4 (AC_INCLUDE, AC_INCLUDES): Removed.
(AC_FOREACH): Don't use parens with `m4_foreach'.
(AC_CHECK_MEMBER, AC_CHECK_DECLS, AC_CHECK_TYPES): Adjust the
description.
* acspecific.m4 (AC_STRUCT_TIMEZONE, AC_STRUCT_ST_BLKSIZE,
AC_STRUCT_ST_BLOCKS, AC_STRUCT_ST_RDEV): Adjust.
* autoconf.texi (AC_CHECK_MEMBER, AC_CHECK_DECLS, AC_CHECK_TYPES):
Adjust their documentation.
(AC_INCLUDE): Undocument.
* tests/semantics.m4: Adjust.
* tests/actest.m4: Rename as...
* tests/aclocal.m4: this.
* tests/atspecific.m4: No longer include actest.m4.
* tests/torture.m4: Likewise.
* tests/Makefile.am: Adjust.
Reported by Jim Meyering.
* autoheader.sh: Trace AC_DEFINE and AC_DEFINE_UNQUOTED to build
the list of $syms which are defined.
* tests/tools.m4 (autoheader): New test.
* tests/atspecific.m4 (AT_TEST_MACRO): Don't check `env-after' if
the file does not exist, which may happen when a `configure' exits
brutally.
* tests/semantics.m4 (AC_CHECK_MEMBERS, AC_CHECK_TYPES): ANSI C++
forbids members named like their hosting struct, so don't do it.
* autoheader.m4: Dispatch the prototypes next to there AC_
siblings.
(AH_TEMPLATE, AH_VERBATIM): Move to...
* acgeneral.m4: here.
(AH_OUTPUT): New macro.
* autoheader.sh: Run `autoconf --trace' instead of `m4 autoheader.m4'.
* autoheader.m4: Remove.
* Makefile.am: Adjust.
* tests/tools.m4 (AH_DEFUN): Remove, no longer makes sense.
* tests/actests.m4 (autoheader::AC_TATOOINE): Remove, was used by
the test above.
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.
Autoconf testing.
* tests/suite.m4 (AT_TEST_MACRO): Moved to
* tests/atspecific.m4 (AT_TEST_MACRO): here.
* tests/syntax.m4 (TEST_MACRO): Moved to
* tests/atspecific.m4 (TEST_MACRO): here. Don't test /^AC_INIT/,
nor /^AC_PROG_(CC|CXX|F77)_(GNU|WORKS)$/: they are already
tried elsewhere.
* tests/Makefile.am: Adjusted.
for it. Just quote properly!
condition out the test case if __cpluscplus.
AC_REQUIRE AC_PROG_CC_STDC.
Fix slightly the display of the result (formerly the first run
says `none needed', and later, because of the cache `no').
(AC_C_INLINE, AC_C_VOLATILE): AC_REQUIRE AC_PROG_CC_STDC.
* doc/autoconf.texi (AC_C_CONST): Give a few hints on the
motivation for trusting the C++ compilers.
(AT_CASE): new macro.
(AT_CHECK): Use it. Don't changequote for patsubst, there is no
need.
* tests/syntax.m4 (TEST_MACRO): Don't run AC_ARG_VAR.
Reported by Jim Meyering.
Use AT_CASE.
* acgeneral.m4 (AC_CANONICAL_THING): define, not AC_DEFUN.
Don't AC_PROVIDE, there is no need.
When calling `config.sub`, also || exit 1, to catch failures from
config.sub.
* acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Use ac_val, not val.
(AC_EXEEXT): Use ac_file, not file.
* tests/actest.m4: New file, holding extra Autoconf macros used
during the testing.
(AC_ENV_SAVE): New macro, save the sh variables in a file.
* tests/suite.m4 (AT_TEST_MACRO, Generation of configure.in):
include actest.m4, and call twice AC_ENV_SAVE to compare the
variables before and after the macro.
* tests/Makefile.am (macro.m4): Don't test macros that are
required: they will be tested somewhere else.
* acgeneral.m4 (AC_CHECK_MEMBER): It is not smart to define
ac_Foo, and use AC_Foo. Got rid of AC_Member_Aggregate and
AC_Member_Member which were complicating more than simplifying.
(AC_CHECK_DECLS): Use m4 lists.
(AC_CHECK_TYPES): A comma was missing.
* autoheader.m4: (AC_CHECK_DECLS): Use m4 lists.
* doc/autoconf.texi (Generic Declarations): AC_CHECK_DELCS uses m4
lists.
* tests/semantics.m4: New file. Collection of semantical tests:
verify that the tests are positive and negative when appropriate.
Test AC_CHECK_MEMBERS, AC_CHECK_DECLS and AC_CHECK_TYPES.
Fix the bugs discovered.
* acgeneral.m4 (AC_CANONICAL_THING): Quote the
AC_REQUIRE([AC_CANONICAL_HOST]). Bug triggered by the use of
AC_CANONICAL_BUILD alone in configure.in. Also, quote the
arguments of macros (eg, ifelse([$1]...), not ifelse($1...)).
(m4_case): New macro.
(AC_LINKER_OPTION): Don't clash with user's name space
(s/i/ac_link_opt).
(AC_LIST_MEMBER_OF). You mean AC_FATAL, not AC_MSG_ERROR.
Quote properly the argument.
dnl out the empty lines that result from m4 pure code.
Don't pollute the user name space.
Use AC_SHELL_IFELSE.
(AC_F77_NAME_MANGLING): Don't use `test -o'. There are still
name space problems.
* tests/Makefile.am (macros.m4): Also fetch the macros from
acgeneral.m4.
Fix the discovered bugs.
* tests/atgeneral.m4 (AT_CHECK): Don't just exit 1 when you want
to propagate the failure of a test: exit with the same exit
status, at least to preserve 77 (=ignore).
* tests/syntax.m4 (TEST_MACRO): Run also autoheader. Don't run
this test on all the macros, some just cannot run without
arguments.
* acgeneral.m4 (AC_OUTPUT_CONFIG_STATUS): In the if egrep/fi for
#define templates, add a `:' to prevent syntax errors in
config.status when there are no AC_DEFINE performed.
* autoheader.m4 (AH_TEMPLATE): Don't use _AC_SH_QUOTE here, use it
in...
(AH_VERBATIM): here. Now AH_C_UNSIGNED_CHAR is no longer failing
(formerly it would produce a non backslashed backquote, which
made sh choke).
Introduce a new style of testing, independent from DejaGNU.
Introduce the logistics.
* configure.in: Initialize AT, and output tests/atconfig, and
tests/Makefile.
* m4/atconfig.m4: New file.
* m4/Makefile.am: Adjusted.
* aclocal.m4: Include atconfig.m4.
* Makefile.am: Adjusted.
* tests/Makefile.am: New file.
* tests/atgeneral.m4: Likewise.
* tests/atconfig.in: Likewise.
Write tests.
* tests/syntax.m4: New file, in charge of checking the validity of
the sh code produced by the macros defined in acspecific.m4.
acgeneral.m4 is not checked here, because these macros require
arguments.
* tests/suite.m4: New file. Run syntax.m4.