automake: Public Macros
1
1 6.4.1 Public Macros
1 -------------------
1
1 ‘AM_INIT_AUTOMAKE([OPTIONS])’
1 Runs many macros required for proper operation of the generated
1 Makefiles.
1
1 Today, ‘AM_INIT_AUTOMAKE’ is called with a single argument: a
1 space-separated list of Automake options that should be applied to
1 every ‘Makefile.am’ in the tree. The effect is as if each option
1 were listed in ‘AUTOMAKE_OPTIONS’ (⇒Options).
1
1 This macro can also be called in another, _deprecated_ form:
1 ‘AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])’. In this form,
1 there are two required arguments: the package and the version
1 number. This usage is mostly obsolete because the PACKAGE and
1 VERSION can be obtained from Autoconf’s ‘AC_INIT’ macro. However,
1 differently from what happens for ‘AC_INIT’ invocations, this
1 ‘AM_INIT_AUTOMAKE’ invocation supports shell variables’ expansions
1 in the ‘PACKAGE’ and ‘VERSION’ arguments (which otherwise defaults,
1 respectively, to the ‘PACKAGE_TARNAME’ and ‘PACKAGE_VERSION’
11 defined via the ‘AC_INIT’ invocation; ⇒The ‘AC_INIT’ macro
(autoconf)AC_INIT.); and this can be still be useful in some
1 selected situations. Our hope is that future Autoconf versions
1 will improve their support for package versions defined dynamically
1 at configure runtime; when (and if) this happens, support for the
1 two-args ‘AM_INIT_AUTOMAKE’ invocation will likely be removed from
1 Automake.
1
1 If your ‘configure.ac’ has:
1
1 AC_INIT([src/foo.c])
1 AM_INIT_AUTOMAKE([mumble], [1.5])
1
1 you should modernize it as follows:
1
1 AC_INIT([mumble], [1.5])
1 AC_CONFIG_SRCDIR([src/foo.c])
1 AM_INIT_AUTOMAKE
1
1 Note that if you’re upgrading your ‘configure.ac’ from an earlier
1 version of Automake, it is not always correct to simply move the
1 package and version arguments from ‘AM_INIT_AUTOMAKE’ directly to
1 ‘AC_INIT’, as in the example above. The first argument to
1 ‘AC_INIT’ should be the name of your package (e.g., ‘GNU
1 Automake’), not the tarball name (e.g., ‘automake’) that you used
1 to pass to ‘AM_INIT_AUTOMAKE’. Autoconf tries to derive a tarball
1 name from the package name, which should work for most but not all
1 package names. (If it doesn’t work for yours, you can use the
1 four-argument form of ‘AC_INIT’ to provide the tarball name
1 explicitly).
1
1 By default this macro ‘AC_DEFINE’’s ‘PACKAGE’ and ‘VERSION’. This
1 Automake options::):
1 AM_INIT_AUTOMAKE([no-define ...])
1
1 ‘AM_PATH_LISPDIR’
1 Searches for the program ‘emacs’, and, if found, sets the output
1 variable ‘lispdir’ to the full path to Emacs’ site-lisp directory.
1
1 Note that this test assumes the ‘emacs’ found to be a version that
1 supports Emacs Lisp (such as GNU Emacs or XEmacs). Other emacsen
1 can cause this test to hang (some, like old versions of MicroEmacs,
1 start up in interactive mode, requiring ‘C-x C-c’ to exit, which is
1 hardly obvious for a non-emacs user). In most cases, however, you
1 should be able to use ‘C-c’ to kill the test. In order to avoid
1 problems, you can set ‘EMACS’ to “no” in the environment, or use
1 the ‘--with-lispdir’ option to ‘configure’ to explicitly set the
1 correct path (if you’re sure you have an ‘emacs’ that supports
1 Emacs Lisp).
1
1 ‘AM_PROG_AR([ACT-IF-FAIL])’
1 You must use this macro when you use the archiver in your project,
1 if you want support for unusual archivers such as Microsoft ‘lib’.
1 The content of the optional argument is executed if the archiver
1 interface is not recognized; the default action is to abort
1 configure with an error message.
1
1 ‘AM_PROG_AS’
1 Use this macro when you have assembly code in your project. This
1 will choose the assembler for you (by default the C compiler) and
1 set ‘CCAS’, and will also set ‘CCASFLAGS’ if required.
1
1 ‘AM_PROG_CC_C_O’
1 This is an obsolescent macro that checks that the C compiler
1 supports the ‘-c’ and ‘-o’ options together. Note that, since
1 Automake 1.14, the ‘AC_PROG_CC’ is rewritten to implement such
1 checks itself, and thus the explicit use of ‘AM_PROG_CC_C_O’ should
1 no longer be required.
1
1 ‘AM_PROG_LEX’
11 Like ‘AC_PROG_LEX’ (⇒Particular Program Checks
(autoconf)Particular Programs.), but uses the ‘missing’ script on
1 systems that do not have ‘lex’. HP-UX 10 is one such system.
1
1 ‘AM_PROG_GCJ’
1 This macro finds the ‘gcj’ program or causes an error. It sets
1 ‘GCJ’ and ‘GCJFLAGS’. ‘gcj’ is the Java front-end to the GNU
1 Compiler Collection.
1
1 ‘AM_PROG_UPC([COMPILER-SEARCH-LIST])’
1 Find a compiler for Unified Parallel C and define the ‘UPC’
1 variable. The default COMPILER-SEARCH-LIST is ‘upcc upc’. This
1 macro will abort ‘configure’ if no Unified Parallel C compiler is
1 found.
1
1 ‘AM_MISSING_PROG(NAME, PROGRAM)’
1 Find a maintainer tool PROGRAM and define the NAME environment
1 variable with its location. If PROGRAM is not detected, then NAME
1 will instead invoke the ‘missing’ script, in order to give useful
11 advice to the user about the missing maintainer tool. ⇒
maintainer-mode, for more information on when the ‘missing’
1 script is appropriate.
1
1 ‘AM_SILENT_RULES’
11 Control the machinery for less verbose build output (⇒Automake
Silent Rules).
1
1 ‘AM_WITH_DMALLOC’
1 Add support for the Dmalloc package (http://dmalloc.com/). If the
1 user runs ‘configure’ with ‘--with-dmalloc’, then define
1 ‘WITH_DMALLOC’ and add ‘-ldmalloc’ to ‘LIBS’.
1