(AC_REVISION): Require AC_INIT, not _AC_INIT_BINSH.
(AC_INIT): Do what _AC_INIT_BINSH used to.
Don't require _AC_INIT_VERSION, just call it.
Rename as _AC_INIT.
(AC_INIT): New macro, single expansion wrapper around _AC_INIT.
(_AC_COPYRIGHT_SEPARATOR): New.
(AC_COPYRIGHT): Use it.
Require AC_INIT, not _AC_INIT_VERSION.
* doc/autoconf.texi (Versions): Promote as first section of
`Setup'.
Rename as `Notices'.
Document AC_COPYRIGHT.
Don't give false reasons for placing AC_REVISION before AC_INIT,
the place no longer matters.
CONFIG_FILES, we had to expand _AC_OUTPUT_FILES into the KILL
diversion, because it is AC_OUTPUT_FILES which undiverted the
AC_SUBST sed script at its proper place, otherwise it would have
been undiverted at the end of `configure', leading to an sh syntax
error.
Now that we no longer use a diversion, we don't need to call
AC_OUTPUT_FILES if useless.
(AC_OUTPUT_FILES): Rename as _AC_OUTPUT_FILES.
(AC_OUTPUT_LINKS): Rename as _AC_OUTPUT_LINKS.
Automake calls it, and usually users do too. If it happens,
`--program-prefix=g' actually prepend two (or more) `g'.
* acgeneral.m4 (AC_DEFUN_ONCE): New macro.
(AC_ARG_PROGRAM): AC_DEFUNed_ONCE. Or is it AC_DEFUN_ONCE'd? :).
No longer AC_EXPAND_ONCE the help string, the macro itself is
expanded at most once.
Rename the here-doc tag EOF_SED as EOF.
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): Stop global double quoting,
failed experiment.
Merge all the var=val AC_SUBST(var) into AC_SUBST(var, val).
(AC_SUBST): Implement support for 2nd arg.
* doc/autoconf.texi (Setting Output Variables): Adjust.
Suggested by Alexandre Oliva and Lars J. Aas
* libm4.m4 (ifndef): New macro.
* acgeneral.m4 (AC_DIVERT): New macro, maps a diversion name to
its value. The diversions now have a short name, e.g., `NOTICE',
instead of the former macros which had long names, e.g.,
`AC_DIVERSION_NOTICE'.
(AC_DIVERT_PUSH): Adjust.
(AC_DIVERT_POP): Use ifndef.
(AC_DIVERSION_CURRENT): Rename as `AC_DIVERT_DIVERSION' to stay
within the `AC_DIVERT' name domain.
Adjust all callers.
* acspecific.m4: Adjust all callers.
headers if they exist (needed for some missing prototypes) and
corrects the signal handler prototype/definition. The signal
handler prototype is now prepended with an `extern "C"' for C++
compilers since some platforms explicitly require an `extern "C"'
signal handler.
comment.
* libm4.m4 (m4_quote): s/$@/$*/.
* acgeneral.m4 (AC_COPYRIGHT): Prepend `# ' to the lines that goes
on the top of `configure'. Actually, prepend `@%:@ ' so that
there are as many evaluations on both sides.
(_AC_INIT_VERSION): No longer strip `# '.
`configure'. And after all, it suits to `configure --version' too.
* acgeneral.m4 (AC_DIVERSION_DEFAULTS, AC_DIVERSION_INIT_PREPARE):
New diversion numbers.
(AC_DIVERSION_INIT): Renamed as...
(AC_DIVERSION_INIT_PARSE_ARGS): this.
(AC_DIVERT_POP): Instead of going into wild endless loops when
there are more pops than pushes, die with dignity.
(AC_COPYRIGHT): New macro.
(_AC_INIT_NOTICE): Move definition of `ac_includes_default' from
here...
(_AC_INIT_PREPARE): to here.
(_AC_INIT_NOTICE): Remove.
(AC_INIT): Use it to install Autoconf's Copyright.
(_AC_INIT_DEFAULTS): New macro.
(AC_INIT): Use it.
(AC_PREFIX_DEFAULTS): Dump in AC_DIVERSION_DEFAULTS.
(_AC_INIT_PARSE_ARGS): Dump in AC_DIVERSION_INIT_PREPARE.
* acgeneral.m4 (AC_DIVERSION_DEFAULTS): New diversion number.
(_AC_INIT_NOTICE): Move definition of `ac_includes_default' from
here...
(_AC_INIT_PREPARE): to here.
(_AC_INIT_NOTICE): Play with your diversion yourself, don't let
(AC_INIT): do it for you.
(_AC_INIT_DEFAULTS): New macro.
(AC_INIT): Use it.
* acgeneral.m4 (AC_EXPAND_ONCE): AC_PROVIDE yourself, in case
there is no AC_DEFUN associated with the text to expand.
(_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE,
_AC_ARG_VAR_HELP_PROLOGUE): Remove, instead...
(AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): do it yourself.
`configure --help'.
* acgeneral.m4 (AC_DIVERSION_HELP_BEGIN, AC_DIVERSION_HELP_ENABLE,
AC_DIVERSION_HELP_WITH, AC_DIVERSION_HELP_VAR,
AC_DIVERSION_HELP_END): New diversion numbers.
(AC_EXPAND_ONCE): New macro.
(AC_PROVIDE_IF): New macro.
(AC_BEFORE, AC_REQUIRE): Use it.
(AC_REQUIRE): Don't use indir.
(_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE,
_AC_ARG_VAR_HELP_PROLOGUE): New macros.
(AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): Expand once the
_HELP_PROLOGUE macro which corresponds.
(_AC_INIT_HELP): Adjust to AC_DIVERSION_HELP_BEGIN and
AC_DIVERSION_HELP_END.
(_AC_INIT_NOTICE, _AC_INIT_HELP): Remove the sh code which handled
the optional help strings.
(_AC_INIT_PARSE_ARGS): this.
Move the display of help and version strings to...
(_AC_INIT_HELP, _AC_INIT_VERSION): here.
(AC_INIT): Adjust. Also, fix quotation.
Any character before the colon is accepted because network drives
can be assigned characters outside the [a-zA-Z] range. DOS-style
relative paths (?:foo/bar) are also considered absolute for
Autoconf's purposes since the path '../?:foo/bar' is invalid.
* acgeneral.m4 (AC_OUTPUT_FILES): Treat DOS-style paths (?:*') as
absolute.
(AC_OUTPUT_SUBDIRS): Likewise.
(AC_PATH_PROG): Make pattern for matching DOS-style paths the same
as that used in AC_OUTPUT_FILES and AC_OUTPUT_SUBDIRS.
(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?/.
They're back to save the world.
* acspecific.m4 (AC_PROG_CC_C_O, AC_PROG_F77_C_O,
AC_PROG_MAKE_SET, AC_TYPE_GETGROUPS, AC_FUNC_GETLOADAVG,
AC_FUNC_MKTIME, AC_STRUCT_TIMEZONE, AC_F77_LIBRARY_LDFLAGS): Blast
that jelly o' changequote. Set the quotes free.
`configure', not `config.status', hence use `conftest' for tmp
files, not `$ac_cs_root'.
Removed forgotten developer comment.
Double quoting the whole body is nicer than just the part that
needs to be.
From Dan Ackroyd.
* acgeneral.m4 (AC_INIT_PARSE_ARGS, AC_INIT_PREPARE,
AC_CACHE_SAVE, AC_PREFIX_PROGRAM, AC_OUTPUT,
_AC_OUTPUT_CONFIG_STATUS, AC_OUTPUT_MAKE_DEFS, AC_OUTPUT_FILES,
_AC_OUTPUT_HEADERS, AC_OUTPUT_LINKS, AC_OUTPUT_SUBDIRS): Quit
playing with changequotes, @BKL@ and Co.! Just quote properly.
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.
* acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): It is smarter to use a
quoted here doc to output the section providing defaults for
CONFIG_*.
Don't rm the CONFIG_FILES here but in..
(AC_OUTPUT_FILES) [test -n "$CONFIG_FILES"]: here.
Hm, actually, no, just don't remove them at all, let the newly
created files replace the old ones, exactly as in
AC_OUTPUT_HEADERS.
From Graham Jenkins.
`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.
`configure' and `config.status'.
* acgeneral.m4 (AC_OUTPUT_CONFIG_STATUS): Renamed as...
(_AC_OUTPUT_CONFIG_STATUS): this.
Change the error messages from
value: invalid feature name
to
invalid feature: value
Invite the user to try --help for invalid options.
(AC_INIT_PARSE_ARGS): Likewise.
(_AC_OUTPUT_COMMANDS): This. All callers changed.
Disable the verbose message until Automake uses the new features
of `config.status'.
Reported by Jim Meyering.
* 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.
* acgeneral.m4 (AU_DEFINE): New macros, pulled out from AU_DEFUN.
Defines a macro in `autoupdate::' with all the required wrapping
for `autoupdate'.
(AU_DEFUN): Use it.
(AC_OUTPUT): When dispatching your arguments, use ifval, not
ifset!
Dispath actions to AC_CONFIG_COMMANDS not AC_OUTPUT_COMMANDS, to
avoid unneeded warnings for obsolete use of AC_OUTPUT_COMMANDS.
(autoupdate::AC_OUTPUT): New macro.
* doc/autoconf.texi (Writing configure.in, the example): Don't
advocate AC_OUTPUT with args.
(Output, AC_OUTPUT with args): Simplify the documentation, and
provide the translation into the new scheme.
Propagate what remained into the proper sections.
* acgeneral.m4 (AC_OUTPUT_COMMANDS): AU_DEFUNed in terms of
AC_CONFIG_COMMANDS.
(AC_OUTPUT_COMMANDS_CNT): New variable, declared both in
`autoconf::' and `autoupdate::'.
(AC_OUTPUT): Register your arguments to AC_OUTPUT_COMMANDS only if
there are to avoid spurious `run autoupdate' messages.
* doc/autoconf.texi (Libraries): Document the changes.
are none.
* acgeneral.m4 (AC_OUTPUT): Don't register $1 to `AC_CONFIG_FILES'
if $1 is empty.
Normalize the names of the sections in `config.status --help'.
* acgeneral.m4 (_AC_CONFIG_COMMANDS_INIT): New macro which will
collect the `INIT-CMDS'.
(AC_CONFIG_COMMANDS, AC_CONFIG_LINKS, AC_CONFIG_HEADERS,
AC_CONFIG_FILES): Use it, and also temporarily divert to -1
instead of spamming dnl everywhere.
(AC_OUTPUT_CONFIG_STATUS): Make sure to output the INIT-CMDS
before the other sections, it'd be a pity to initialize after the
use :).
* doc/autoconf.texi (Configuration Actions): New section,
documenting the common behavior of AC_CONFIG_FILES,
AC_CONFIG_HEADERS, macro AC_CONFIG_COMMANDS, and AC_CONFIG_LINKS.
(Configuration Files): Document $2 and $3 of AC_CONFIG_FILES.
(Configuration Headers): Document $2 and $3 of AC_CONFIG_HEADERS.
(Configuration Commands): Document $2 and $3 of AC_CONFIG_COMMANDS.
(Configuration Links): Document $2 and $3 of AC_CONFIG_FILES.
* acgeneral.m4 (AC_UNGNITS): Renamed as...
(_AC_VERSION_UNLETTER): this. All callers changed.
Implement the scheme proposed by Alexandre Oliva:
Nl -> (N+1).-1.(l#)
(_AC_VERSION_COMPARE): New macro.
(AC_PREREQ): Use it.
yourself, in order to give better error messages.
(AC_CONFIG_IF_MEMBER): Adapted to the above change.
Quote some regexp active characters ([+.*]).
Suggested by Alexandre Oliva.
* doc/autoconf.texi (Common Behavior): New section, to document
the common behavior of the macros.
(Standard Symbols): New subsection. Describes the transformation
of the AC_DEFINEd names.
(Default Includes): New subsection. Obvious content.
All the ``callers'' updated.
while loops which are breaking conftest.defines and
conftest.undefs into smaller snippets: just use the proper
condition for the while.
Suggested by Alexandre Oliva.
* doc/autoconf.texi (Concept Index): New section.
Various entries added.
(Typedefs): Renamed as...
(Types): this. Pay attention to not limiting the documentation to
the typedefs.
(Particular Types): Mention the equivalent generic test.
Promote the GNU coding style at various places.
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'.
* acoldnames.m4: Use `#', not `dnl'.
Don't spread `dnl' everywhere, anyway, we are in a divert(-1).
* autoconf.m4: Likewise.
* autoheader.m4: Likewise.
output can be problematic with autoupdate.
* acgeneral.m4 (AC_INIT_NOTICE): Output ac_includes_default.
(Default includes section): No longer dump ac_includes_default in
AC_DIVERSION_INIT.
* autoconf.sh: Give your name while reporting errors.
Don't spit --help for errors on arguments.
* autoreconf.sh: Likewise.
* autoheader.sh: Likewise.
More temporary files that one can browse when debugging.
Don't ${var}, just $var.
Don't dump --help when the arguments are invalid.
(config_h): Use the empty value instead of `undefined' to check
that it is defined.
* acspecific.m4: Formatting changes.
yourself. This allows to see everything that is AC_PROVIDEd via
autoconf --trace.
(AC_SPECIALIZE): define'd, not AC_DEFUN'd.
(AC_PROVIDE): Use define with a single arg, instead of an empty $2.
* acgeneral.m4 (AC_TRY_COMPILER, AC_TRY_LINK_FUNC, AC_CHECK_LIB,
AC_TRY_COMPILE, AC_TRY_LINK, AC_TRY_RUN_NATIVE, AC_CHECK_FUNC):
Use AC_LANG_CASE instead of ifelse (AC_LANG, ...).
(AC_TRY_LINK_FUNC): Quote the body the the AC_DEFUN (whoa, how
could this survive so long?!?).
* doc/autoconf.texi (Header Templates): Promote #if over #ifdef;
and #undef over #define in templates.
* acspecific.m4 (AC_DECL_SYS_SIGLIST, AC_FUNC_MMAP,
AC_FUNC_SETPGRP, AC_FUNC_VFORK, AC_FUNC_SELECT_ARGTYPES): Use #if,
not #ifdef and #ifndef, indent CPP directives.
default headers in the INIT section of configure: the reason is
that AC_INCLUDES_DEFAULT is called unquoted, and this results in
an un expected behavior. Thanks to Roman V. Shaposhnick for the
details.
The current implementation is not satisfying: the default headers
are defined in the INIT section even if they are not used.
* acgeneral.m4 (Prologue of AC_INCLUDES_DEFAULTS): Dump the
definition of ac_includes_default in the INIT section of
configure.
(AC_INCLUDES_DEFAULTS): Use it.
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.