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.
`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.
`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.
* 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?!?).
Be kind to Automake: list the arguments of selected macros
(for instance AC_SUBST will list each variable which may be
substitued).
* autoconf.sh (--trace, --output): New options.
Implement tracing of macros.
trap also on 0, so that there is no need to rm here and there.
* autoconf.texi (Output): Document --trace and --output.
Fix a bit of the brokenness of AC_CHECK_TYPE.
* acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): New macro, inspired from
the former AC_CHECK_TYPE. This macro is exactly the one that
ought to be named AC_CHECK_TYPE: it just checks, and executes user
actions. In the future, this macro ought to be renamed
AC_CHECK_TYPE.
There is a big difference with the former AC_CHECK_TYPE: instead
of grepping in the headers, it tries to compile a variable
declaration. This is both safer, slower, and better, since now we
can check for compiler types (e.g., unsigned long long).
(AC_CHECK_TYPES): The looping and AC_DEFINEing version of the
previous macro. Uses m4 loops.
(AC_CHECK_TYPE): Reimplemented on top of AC_CHECK_TYPE_INTERNAL.
* autoheader.m4 (AH_CHECK_TYPE, AH_CHECK_TYPES): New macros,
hooked.
* autoconf.texi (@ovar): New macro, for optional variables.
(Generic Typedefs): Document AC_CHECK_TYPES.
* autoheader.texi: (AH_CHECK_TYPE, AH_CHECK_TYPES): New macros.
(Epilogue): Hooks them.
Provide a means to specify commands to run before config.status is
created (and, for symmetry, after it is created).
This is typically needed by Automake so that AC_REPLACEd functions
go through deansification via
LIBOBJS=`echo $LIBOBJS | sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
and/or by Libtool which needs to define LTLIBOBJS and others:
LTLIBOBJS=`echo $LIBOBJS | sed 's/\.o/\.lo/g'`
AC_SUBST(LTLIBOBJS)
* acgeneral.m4 (AC_OUTPUT_PRE_COMMANDS): New growing string.
Initialize.
(AC_OUTPUT_POST_COMMANDS): Likewise.
(AC_CONFIG_PRE_COMMANDS): New macro, grows AC_OUTPUT_PRE_COMMANDS.
(AC_CONFIG_PRE_COMMANDS): Likewise.
(AC_OUTPUT): Run AC_OUTPUT_PRE_COMMANDS before
AC_OUTPUT_CONFIG_STATUS, and AC_OUTPUT_POST_COMMANDS after.
Rename the family AC_NEED_DECL as AC_CHECK: it is more uniform,
but keep defining NEED_FOO_DECL when `foo' is not declared. Files
not using Autoconf behave better when declarations lacks than when
they are wrong. So the unset position should off, hence #if NEEDS
instead of #if !HAVE (which is triggered when HAVE is not set).
* acgeneral.m4 (AC_NEED_DECL): Renamed as...
(AC_CHECK_DECL): This. Make sure the arguments are the usual
IF-FOUND, IF-NOT-FOUND.
(AC_NEED_DECLS, AC_CHECK_DECLS): Likewise.
* autoconf.texi (Generic Declarations): Document the changes
aforementioned.
* autoheader.m4 (AH_NEED_DECLS): Renamed as
(AH_CHECK_DECLS): This.
(AH_HOOKS): Hook AH_CHECK_DECLS on AC_CHECK_DECLS instead of
_NEED_.
New macro: AC_CONFIG_FILES which is very much like AC_OUTPUT but
that one associates commands to run when a config file is
created. For instance for a shell script `foo', one uses
AC_CONFIG_FILES(foo, chmod +x foo).
In addition, check that the same name is never used twice in
config files, headers, subdirs and links.
* acgeneral.m4 (m4_append): Don't insert new line between
elements.
(m4_list_append): New macro.
(AC_CONFIG_IF_MEMBER): New macro which tests if a file is member
of a config list.
(AC_CONFIG_UNIQUE): New macro which ensures that a config file
name is not yet used.
(AC_CONFIG_HEADER, AC_CONFIG_LINKS, AC_CONFIG_SUBDIRS): Use
AC_CONFIG_UNIQUE.
* acgeneral.m4 (AC_CONFIG_FILES): New macro.
(AC_LIST_FILES): New list, which stores arguments of
AC_CONFIG_LISTS the same as AC_LIST_LINKS stores AC_CONFIG_LINKS
etc.
(AC_OUTPUT): No longer rely on $1 to designate the config files:
register them via AC_CONFIG_FILES. All uses of $1 replaced by
uses of AC_LIST_FILES.
(AC_OUTPUT_FILES): Run the commands associated to the
CONFIG_FILES.