automake-1.16: Optional

 
 6.2 Other things Automake recognizes
 ====================================
 
 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_CANONICAL_BUILD’
 ‘AC_CANONICAL_HOST’
 ‘AC_CANONICAL_TARGET’
      Automake will ensure that ‘config.guess’ and ‘config.sub’ exist.
      Also, the ‘Makefile’ variables ‘build_triplet’, ‘host_triplet’ and
      ‘target_triplet’ are introduced.  See ⇒Getting the Canonical
      System Type (autoconf)Canonicalizing.
 
 ‘AC_CONFIG_AUX_DIR’
      Automake will look for various helper scripts, such as
      ‘install-sh’, in the directory named in this macro invocation.
      (The full list of scripts is: ‘ar-lib’, ‘config.guess’,
      ‘config.sub’, ‘depcomp’, ‘compile’, ‘install-sh’, ‘ltmain.sh’,
      ‘mdate-sh’, ‘missing’, ‘mkinstalldirs’, ‘py-compile’,
      ‘test-driver’, ‘texinfo.tex’, ‘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 used, it must be given before the call to
      ‘AM_INIT_AUTOMAKE’; Automake will warn about this if it is not so.
      All other ‘AC_CONFIG_...’ macros are conventionally called after
      ‘AM_INIT_AUTOMAKE’, though they may or may not work in other
      locations, with or without warnings.
 
      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.  ⇒Finding ‘configure’ Input (autoconf)Input.
 
      Required files from ‘AC_CONFIG_AUX_DIR’ are automatically
      distributed, even if there is no ‘Makefile.am’ in this directory.
 
 ‘AC_CONFIG_LIBOBJ_DIR’
      Automake will require the sources file declared with ‘AC_LIBSOURCE’
      (see below) in the directory specified by this macro.
 
 ‘AC_CONFIG_HEADERS’
      Automake will generate rules to rebuild these headers from the
      corresponding templates (usually, the template for a ‘foo.h’ header
      being ‘foo.h.in’).
 
      As with ‘AC_CONFIG_FILES’ (⇒Requirements), parts of the
      specification using shell variables will be ignored as far as
      cleaning, distributing, and rebuilding is concerned.
 
      Older versions of Automake required the use of ‘AM_CONFIG_HEADER’;
      this is no longer the case, and that macro has indeed been removed.
 
 ‘AC_CONFIG_LINKS’
      Automake will generate rules to remove ‘configure’ generated links
      on ‘make distclean’ and to distribute named source files as part of
      ‘make dist’.
 
      As with ‘AC_CONFIG_FILES’ (⇒Requirements), parts of the
      specification using shell variables will be ignored as far as
      cleaning and distributing is concerned.  (There are no rebuild
      rules for links.)
 
 ‘AC_LIBOBJ’
 ‘AC_LIBSOURCE’
 ‘AC_LIBSOURCES’
      Automake 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.
      ⇒‘AC_LIBOBJ’ vs. ‘LIBOBJS’ (autoconf)AC_LIBOBJ vs LIBOBJS.
 
 ‘AC_PROG_RANLIB’
      This is required if any libraries are built in the package.  ⇒
      Particular Program Checks (autoconf)Particular Programs.
 
 ‘AC_PROG_CXX’
      This is required if any C++ source is included.  ⇒Particular
      Program Checks (autoconf)Particular Programs.
 
 ‘AC_PROG_OBJC’
      This is required if any Objective C source is included.  ⇒
      Particular Program Checks (autoconf)Particular Programs.
 
 ‘AC_PROG_OBJCXX’
      This is required if any Objective C++ source is included.  ⇒
      Particular Program Checks (autoconf)Particular Programs.
 
 ‘AC_PROG_F77’
      This is required if any Fortran 77 source is included.  ⇒
      Particular Program Checks (autoconf)Particular Programs.
 
 ‘AC_F77_LIBRARY_LDFLAGS’
      This is required for programs and shared libraries that are a
DONTPRINTYET       mixture of languages that include Fortran 77 (⇒Mixing Fortran
      77 With C and C++).  *NoteAutoconf macros supplied with
DONTPRINTYET       mixture of languages that include Fortran 77 (⇒Mixing Fortran
      77 With C and C++).  ⇒Autoconf macros supplied with

      Automake Macros.
 
 ‘AC_FC_SRCEXT’
      Automake will add the flags computed by ‘AC_FC_SRCEXT’ to
      compilation of files with the respective source extension (⇒
      Fortran Compiler Characteristics (autoconf)Fortran Compiler.).
 
 ‘AC_PROG_FC’
      This is required if any Fortran 90/95 source is included.  This
      macro is distributed with Autoconf version 2.58 and later.  ⇒
      Particular Program Checks (autoconf)Particular Programs.
 
 ‘AC_PROG_LIBTOOL’
      Automake will turn on processing for ‘libtool’ (⇒Introduction
      (libtool)Top.).
 
 ‘AC_PROG_YACC’
      If 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 (⇒Particular Program Checks (autoconf)Particular
      Programs.).
 
 ‘AC_PROG_LEX’
      If a Lex source file is seen, then this macro must be used.  ⇒
      Particular Program Checks (autoconf)Particular Programs.
 
 ‘AC_REQUIRE_AUX_FILE’
      For each ‘AC_REQUIRE_AUX_FILE([FILE])’, ‘automake’ will ensure that
      ‘FILE’ exists in the aux directory, and will complain otherwise.
      It will also automatically distribute the file.  This macro should
      be used by third-party Autoconf macros that require some supporting
      files in the aux directory specified with ‘AC_CONFIG_AUX_DIR’
      above.  ⇒Finding ‘configure’ Input (autoconf)Input.
 
 ‘AC_SUBST’
      The first argument is automatically defined as a variable in each
      generated ‘Makefile.in’, unless ‘AM_SUBST_NOTMAKE’ is also used for
      this variable.  ⇒Setting Output Variables (autoconf)Setting
      Output Variables.
 
      For every substituted variable VAR, ‘automake’ will add a line ‘VAR
      = VALUE’ to each ‘Makefile.in’ file.  Many Autoconf macros invoke
      ‘AC_SUBST’ to set output variables this way, e.g., ‘AC_PATH_XTRA’
      defines ‘X_CFLAGS’ and ‘X_LIBS’.  Thus, you can access these
      variables as ‘$(X_CFLAGS)’ and ‘$(X_LIBS)’ in any ‘Makefile.am’ if
      ‘AC_PATH_XTRA’ is called.
 
 ‘AM_CONDITIONAL’
      This introduces an Automake conditional (⇒Conditionals).
 
 ‘AM_COND_IF’
      This macro allows ‘automake’ to detect subsequent access within
      ‘configure.ac’ to a conditional previously introduced with
      ‘AM_CONDITIONAL’, thus enabling conditional ‘AC_CONFIG_FILES’
      (⇒Usage of Conditionals).
 
 ‘AM_GNU_GETTEXT’
      This macro is required for packages that use GNU gettext (⇒
      gettext).  It is distributed with gettext.  If Automake sees this
      macro it ensures that the package meets some of gettext’s
      requirements.
 
 ‘AM_GNU_GETTEXT_INTL_SUBDIR’
      This macro specifies that the ‘intl/’ subdirectory is to be built,
      even if the ‘AM_GNU_GETTEXT’ macro was invoked with a first
      argument of ‘external’.
 
 ‘AM_MAINTAINER_MODE([DEFAULT-MODE])’
      This macro adds an ‘--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.in’s, unless DEFAULT-MODE is ‘enable’.  This
      macro defines the ‘MAINTAINER_MODE’ conditional, which you can use
      in your own ‘Makefile.am’.  ⇒maintainer-mode.
 
 ‘AM_SUBST_NOTMAKE(VAR)’
      Prevent Automake from defining a variable VAR, even if it is
      substituted by ‘config.status’.  Normally, Automake defines a
      ‘make’ variable for each ‘configure’ substitution, i.e., for each
      ‘AC_SUBST([VAR])’.  This macro prevents that definition from
      Automake.  If ‘AC_SUBST’ has not been called for this variable,
      then ‘AM_SUBST_NOTMAKE’ has no effects.  Preventing variable
      definitions may be useful for substitution of multi-line values,
      where ‘VAR = @VALUE@’ might yield unintended results.
 
 ‘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; ⇒aclocal Invocation).