Next: Auto-generating aclocal.m4, Previous: Configuration requirements, Up: Scanning configure.ac [Contents][Index]
Every time Automake is run it calls Autoconf to trace configure.ac. This way it can recognize the use of certain macros and tailor the generated Makefile.in appropriately. Currently recognized macros and their effects are:
AC_CONFIG_HEADERSAutomake will generate rules to rebuild these headers. Older versions
of Automake required the use of AM_CONFIG_HEADER
(see Autoconf macros supplied with Automake); this is no longer the case today.
AC_CONFIG_LINKSAutomake will generate rules to remove configure generated links on
make distclean and to distribute named source files as part of
make dist.
AC_CONFIG_AUX_DIRAutomake will look for various helper scripts, such as install-sh, in the directory named in this macro invocation. (The full list of scripts is: config.guess, config.sub, depcomp, elisp-comp, compile, install-sh, ltmain.sh, mdate-sh, missing, mkinstalldirs, py-compile, texinfo.tex, and ylwrap.) Not all scripts are always searched for; some scripts will only be sought if the generated Makefile.in requires them.
If AC_CONFIG_AUX_DIR is not given, the scripts are looked for in
their ‘standard’ locations. For mdate-sh,
texinfo.tex, and ylwrap, the standard location is the
source directory corresponding to the current Makefile.am. For
the rest, the standard location is the first one of ., ..,
or ../.. (relative to the top source directory) that provides any
one of the helper scripts. See Finding ‘configure’ Input in The Autoconf Manual.
Required files from AC_CONFIG_AUX_DIR are automatically
distributed, even if there is no Makefile.am in this directory.
AC_CANONICAL_HOSTAutomake will ensure that config.guess and config.sub exist. Also, the Makefile variables ‘host_alias’ and ‘host_triplet’ are introduced. See Getting the Canonical System Type in The Autoconf Manual.
AC_CANONICAL_SYSTEMThis is similar to AC_CANONICAL_HOST, but also defines the
Makefile variables ‘build_alias’ and ‘target_alias’.
See Getting the Canonical System Type in The
Autoconf Manual.
AC_LIBSOURCEAC_LIBSOURCESAC_LIBOBJAutomake will automatically distribute any file listed in
AC_LIBSOURCE or AC_LIBSOURCES.
Note that the AC_LIBOBJ macro calls AC_LIBSOURCE. So if
an Autoconf macro is documented to call AC_LIBOBJ([file]), then
file.c will be distributed automatically by Automake. This
encompasses many macros like AC_FUNC_ALLOCA,
AC_FUNC_MEMCMP, AC_REPLACE_FUNCS, and others.
By the way, direct assignments to LIBOBJS are no longer
supported. You should always use AC_LIBOBJ for this purpose.
See AC_LIBOBJ vs. LIBOBJS in The Autoconf Manual.
AC_PROG_RANLIBThis is required if any libraries are built in the package. See Particular Program Checks in The Autoconf Manual.
AC_PROG_CXXThis is required if any C++ source is included. See Particular Program Checks in The Autoconf Manual.
AC_PROG_F77This is required if any Fortran 77 source is included. This macro is distributed with Autoconf version 2.13 and later. See Particular Program Checks in The Autoconf Manual.
AC_F77_LIBRARY_LDFLAGSThis is required for programs and shared libraries that are a mixture of languages that include Fortran 77 (see Mixing Fortran 77 With C and C++). See Autoconf macros supplied with Automake.
AC_PROG_LIBTOOLAutomake will turn on processing for libtool (see Introduction in The Libtool Manual).
AC_PROG_YACCIf a Yacc source file is seen, then you must either use this macro or define the variable ‘YACC’ in configure.ac. The former is preferred (see Particular Program Checks in The Autoconf Manual).
AC_PROG_LEXIf a Lex source file is seen, then this macro must be used. See Particular Program Checks in The Autoconf Manual.
AC_SUBST ¶The first argument is automatically defined as a variable in each generated Makefile.in. See Setting Output Variables in The Autoconf Manual.
If the Autoconf manual says that a macro calls AC_SUBST for
var, or defines the output variable var then var will
be defined in each Makefile.in generated by Automake.
E.g. AC_PATH_XTRA defines X_CFLAGS and X_LIBS, so
you can use these variables in any Makefile.am if
AC_PATH_XTRA is called.
AM_C_PROTOTYPESThis is required when using automatic de-ANSI-fication; see Automatic de-ANSI-fication.
AM_GNU_GETTEXTThis macro is required for packages which use GNU gettext (see Gettext). It is distributed with gettext. If Automake sees this macro it ensures that the package meets some of gettext’s requirements.
AM_MAINTAINER_MODE ¶This macro adds a ‘--enable-maintainer-mode’ option to
configure. If this is used, automake will cause
‘maintainer-only’ rules to be turned off by default in the
generated Makefile.ins. This macro defines the
‘MAINTAINER_MODE’ conditional, which you can use in your own
Makefile.am.
m4_include ¶Files included by configure.ac using this macro will be detected by Automake and automatically distributed. They will also appear as dependencies in Makefile rules.
m4_include is seldom used by configure.ac authors, but
can appear in aclocal.m4 when aclocal detects that
some required macros come from files local to your package (as
opposed to macros installed in a system-wide directory, see
Auto-generating aclocal.m4).
Next: Auto-generating aclocal.m4, Previous: Configuration requirements, Up: Scanning configure.ac [Contents][Index]