automake: Optional
1
1 6.2 Other things Automake recognizes
1 ====================================
1
1 Every time Automake is run it calls Autoconf to trace ‘configure.ac’.
1 This way it can recognize the use of certain macros and tailor the
1 generated ‘Makefile.in’ appropriately. Currently recognized macros and
1 their effects are:
1
1 ‘AC_CANONICAL_BUILD’
1 ‘AC_CANONICAL_HOST’
1 ‘AC_CANONICAL_TARGET’
1 Automake will ensure that ‘config.guess’ and ‘config.sub’ exist.
1 Also, the ‘Makefile’ variables ‘build_triplet’, ‘host_triplet’ and
11 ‘target_triplet’ are introduced. See ⇒Getting the Canonical
System Type (autoconf)Canonicalizing.
1
1 ‘AC_CONFIG_AUX_DIR’
1 Automake will look for various helper scripts, such as
1 ‘install-sh’, in the directory named in this macro invocation.
1 (The full list of scripts is: ‘ar-lib’, ‘config.guess’,
1 ‘config.sub’, ‘depcomp’, ‘compile’, ‘install-sh’, ‘ltmain.sh’,
1 ‘mdate-sh’, ‘missing’, ‘mkinstalldirs’, ‘py-compile’,
1 ‘test-driver’, ‘texinfo.tex’, ‘ylwrap’.) Not all scripts are
1 always searched for; some scripts will only be sought if the
1 generated ‘Makefile.in’ requires them.
1
1 If ‘AC_CONFIG_AUX_DIR’ is not given, the scripts are looked for in
1 their standard locations. For ‘mdate-sh’, ‘texinfo.tex’, and
1 ‘ylwrap’, the standard location is the source directory
1 corresponding to the current ‘Makefile.am’. For the rest, the
1 standard location is the first one of ‘.’, ‘..’, or ‘../..’
1 (relative to the top source directory) that provides any one of the
1 helper scripts. ⇒Finding ‘configure’ Input (autoconf)Input.
1
1 Required files from ‘AC_CONFIG_AUX_DIR’ are automatically
1 distributed, even if there is no ‘Makefile.am’ in this directory.
1
1 ‘AC_CONFIG_LIBOBJ_DIR’
1 Automake will require the sources file declared with ‘AC_LIBSOURCE’
1 (see below) in the directory specified by this macro.
1
1 ‘AC_CONFIG_HEADERS’
1 Automake will generate rules to rebuild these headers from the
1 corresponding templates (usually, the template for a ‘foo.h’ header
1 being ‘foo.h.in’). Older versions of Automake required the use of
1 ‘AM_CONFIG_HEADER’; this is no longer the case, and that macro has
1 indeed been removed.
1
1 As with ‘AC_CONFIG_FILES’ (⇒Requirements), parts of the
1 specification using shell variables will be ignored as far as
1 cleaning, distributing, and rebuilding is concerned.
1
1 ‘AC_CONFIG_LINKS’
1 Automake will generate rules to remove ‘configure’ generated links
1 on ‘make distclean’ and to distribute named source files as part of
1 ‘make dist’.
1
1 As for ‘AC_CONFIG_FILES’ (⇒Requirements), parts of the
1 specification using shell variables will be ignored as far as
1 cleaning and distributing is concerned. (There are no rebuild
1 rules for links.)
1
1 ‘AC_LIBOBJ’
1 ‘AC_LIBSOURCE’
1 ‘AC_LIBSOURCES’
1 Automake will automatically distribute any file listed in
1 ‘AC_LIBSOURCE’ or ‘AC_LIBSOURCES’.
1
1 Note that the ‘AC_LIBOBJ’ macro calls ‘AC_LIBSOURCE’. So if an
1 Autoconf macro is documented to call ‘AC_LIBOBJ([file])’, then
1 ‘file.c’ will be distributed automatically by Automake. This
1 encompasses many macros like ‘AC_FUNC_ALLOCA’, ‘AC_FUNC_MEMCMP’,
1 ‘AC_REPLACE_FUNCS’, and others.
1
1 By the way, direct assignments to ‘LIBOBJS’ are no longer
1 supported. You should always use ‘AC_LIBOBJ’ for this purpose.
1 ⇒‘AC_LIBOBJ’ vs. ‘LIBOBJS’ (autoconf)AC_LIBOBJ vs LIBOBJS.
1
1 ‘AC_PROG_RANLIB’
11 This is required if any libraries are built in the package. ⇒
Particular Program Checks (autoconf)Particular Programs.
1
1 ‘AC_PROG_CXX’
11 This is required if any C++ source is included. ⇒Particular
Program Checks (autoconf)Particular Programs.
1
1 ‘AC_PROG_OBJC’
11 This is required if any Objective C source is included. ⇒
Particular Program Checks (autoconf)Particular Programs.
1
1 ‘AC_PROG_OBJCXX’
11 This is required if any Objective C++ source is included. ⇒
Particular Program Checks (autoconf)Particular Programs.
1
1 ‘AC_PROG_F77’
11 This is required if any Fortran 77 source is included. ⇒
Particular Program Checks (autoconf)Particular Programs.
1
1 ‘AC_F77_LIBRARY_LDFLAGS’
1 This is required for programs and shared libraries that are a
DONTPRINTYET 11 mixture of languages that include Fortran 77 (⇒Mixing Fortran
77 With C and C++). *NoteAutoconf macros supplied with
1DONTPRINTYET 11 mixture of languages that include Fortran 77 (⇒Mixing Fortran
77 With C and C++). ⇒Autoconf macros supplied with
Automake Macros.
1
1 ‘AC_FC_SRCEXT’
1 Automake will add the flags computed by ‘AC_FC_SRCEXT’ to
11 compilation of files with the respective source extension (⇒
Fortran Compiler Characteristics (autoconf)Fortran Compiler.).
1
1 ‘AC_PROG_FC’
1 This is required if any Fortran 90/95 source is included. This
11 macro is distributed with Autoconf version 2.58 and later. ⇒
Particular Program Checks (autoconf)Particular Programs.
1
1 ‘AC_PROG_LIBTOOL’
11 Automake will turn on processing for ‘libtool’ (⇒Introduction
(libtool)Top.).
1
1 ‘AC_PROG_YACC’
1 If a Yacc source file is seen, then you must either use this macro
1 or define the variable ‘YACC’ in ‘configure.ac’. The former is
11 preferred (⇒Particular Program Checks (autoconf)Particular
Programs.).
1
1 ‘AC_PROG_LEX’
11 If a Lex source file is seen, then this macro must be used. ⇒
Particular Program Checks (autoconf)Particular Programs.
1
1 ‘AC_REQUIRE_AUX_FILE’
1 For each ‘AC_REQUIRE_AUX_FILE([FILE])’, ‘automake’ will ensure that
1 ‘FILE’ exists in the aux directory, and will complain otherwise.
1 It will also automatically distribute the file. This macro should
1 be used by third-party Autoconf macros that require some supporting
1 files in the aux directory specified with ‘AC_CONFIG_AUX_DIR’
1 above. ⇒Finding ‘configure’ Input (autoconf)Input.
1
1 ‘AC_SUBST’
1 The first argument is automatically defined as a variable in each
1 generated ‘Makefile.in’, unless ‘AM_SUBST_NOTMAKE’ is also used for
11 this variable. ⇒Setting Output Variables (autoconf)Setting
Output Variables.
1
1 For every substituted variable VAR, ‘automake’ will add a line ‘VAR
1 = VALUE’ to each ‘Makefile.in’ file. Many Autoconf macros invoke
1 ‘AC_SUBST’ to set output variables this way, e.g., ‘AC_PATH_XTRA’
1 defines ‘X_CFLAGS’ and ‘X_LIBS’. Thus, you can access these
1 variables as ‘$(X_CFLAGS)’ and ‘$(X_LIBS)’ in any ‘Makefile.am’ if
1 ‘AC_PATH_XTRA’ is called.
1
1 ‘AM_CONDITIONAL’
1 This introduces an Automake conditional (⇒Conditionals).
1
1 ‘AM_COND_IF’
1 This macro allows ‘automake’ to detect subsequent access within
1 ‘configure.ac’ to a conditional previously introduced with
1 ‘AM_CONDITIONAL’, thus enabling conditional ‘AC_CONFIG_FILES’
1 (⇒Usage of Conditionals).
1
1 ‘AM_GNU_GETTEXT’
11 This macro is required for packages that use GNU gettext (⇒
gettext). It is distributed with gettext. If Automake sees this
1 macro it ensures that the package meets some of gettext’s
1 requirements.
1
1 ‘AM_GNU_GETTEXT_INTL_SUBDIR’
1 This macro specifies that the ‘intl/’ subdirectory is to be built,
1 even if the ‘AM_GNU_GETTEXT’ macro was invoked with a first
1 argument of ‘external’.
1
1 ‘AM_MAINTAINER_MODE([DEFAULT-MODE])’
1 This macro adds an ‘--enable-maintainer-mode’ option to
1 ‘configure’. If this is used, ‘automake’ will cause
1 “maintainer-only” rules to be turned off by default in the
1 generated ‘Makefile.in’s, unless DEFAULT-MODE is ‘enable’. This
1 macro defines the ‘MAINTAINER_MODE’ conditional, which you can use
1 in your own ‘Makefile.am’. ⇒maintainer-mode.
1
1 ‘AM_SUBST_NOTMAKE(VAR)’
1 Prevent Automake from defining a variable VAR, even if it is
1 substituted by ‘config.status’. Normally, Automake defines a
1 ‘make’ variable for each ‘configure’ substitution, i.e., for each
1 ‘AC_SUBST([VAR])’. This macro prevents that definition from
1 Automake. If ‘AC_SUBST’ has not been called for this variable,
1 then ‘AM_SUBST_NOTMAKE’ has no effects. Preventing variable
1 definitions may be useful for substitution of multi-line values,
1 where ‘VAR = @VALUE@’ might yield unintended results.
1
1 ‘m4_include’
1 Files included by ‘configure.ac’ using this macro will be detected
1 by Automake and automatically distributed. They will also appear
1 as dependencies in ‘Makefile’ rules.
1
1 ‘m4_include’ is seldom used by ‘configure.ac’ authors, but can
1 appear in ‘aclocal.m4’ when ‘aclocal’ detects that some required
1 macros come from files local to your package (as opposed to macros
1 installed in a system-wide directory, ⇒aclocal Invocation).
1