* 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.