Automake scans the package's `configure.in' to determine certain
information about the package. Some
autoconf macros are required
and some variables must be defined in `configure.in'. Automake
will also use information from `configure.in' to further tailor its
Automake also supplies some Autoconf macros to make the maintenance
easier. These macros can automatically be put into your
`aclocal.m4' using the
Here are the other macros which Automake requires but which are not run
Makefileare treated as `Makefile's. Other listed files are treated differently. Currently the only difference is that a `Makefile' is removed by
make distclean, while other files are removed by
You may need the following macros in some conditions, even though they are not required.
stripwhen you run
make install-strip. However
stripmight not be the right tool to use in cross-compilation environments, therefore Automake will honor the
STRIPenvironment variable to overrule the program used to perform stripping. Automake will not set
STRIPitself. If your package is not setup for cross-compilation you do not have to care (
stripis ok), otherwise you can set
STRIPautomatically by calling
AC_CHECK_TOOL([STRIP],[strip])from your `configure.in'.
Automake will also recognize the use of certain macros and tailor the generated `Makefile.in' appropriately. Currently recognized macros and their effects are:
AM_CONFIG_HEADER, which is similar to
AC_CONFIG_HEADER(see section `Configuration Header Files' in The Autoconf Manual), but does some useful Automake-specific work.
AC_PATH_XTRAinto each `Makefile.in' that builds a C program or library. See section `System Services' in The Autoconf Manual.
AC_CANONICAL_HOST, but also defines the `Makefile' variables `build_alias' and `target_alias'. See section `Getting the Canonical System Type' in The Autoconf Manual.
automake -awill not install the sources. See section Building a library, for more information. Also, see section `Particular Function Checks' in The Autoconf Manual.
LIBOBJS, and will treat these additional files as if they were discovered via
AC_REPLACE_FUNCS. See section `Generic Function Checks' in The Autoconf Manual.
libtool(see section `Introduction' in The Libtool Manual).
configure. If this is used,
automakewill cause `maintainer-only' rules to be turned off by default in the generated `Makefile.in's. This macro is disallowed in `Gnits' mode (see section The effect of
--gnits). This macro defines the `MAINTAINER_MODE' conditional, which you can use in your own `Makefile.am'.
Automake includes a number of Autoconf macros which can be used in your
package; some of them are actually required by Automake in certain
situations. These macros must be defined in your `aclocal.m4';
otherwise they will not be seen by
aclocal program will automatically generate `aclocal.m4'
files based on the contents of `configure.in'. This provides a
convenient way to get Automake-provided macros, without having to
search around. Also, the
aclocal mechanism is extensible for use
by other packages.
aclocal scans all the `.m4' files it can find,
looking for macro definitions. Then it scans `configure.in'. Any
mention of one of the macros found in the first step causes that macro,
and any macros it in turn requires, to be put into `aclocal.m4'.
The contents of `acinclude.m4', if it exists, are also automatically included in `aclocal.m4'. This is useful for incorporating local macros into `configure'.
aclocal tries to be smart about looking for new
in the files it scans. It will warn if it finds duplicates. It also
tries to copy the full text of the scanned file into `aclocal.m4',
including both `#' and `dnl' comments. If you want to make a
comment which will be completely ignored by
`##' as the comment leader.
aclocal accepts the following options:
aclocalwill search to find the `.m4' files. When this option is given, normal processing is suppressed. This option can be used by a package to determine where to install a macro file.
strtodfunction is not available, or does not work correctly (like the one on SunOS 5.4), add `strtod.o' to output variable
error_at_lineis not found, then add `error.o' to
TIOCGWINSZrequires `<sys/ioctl.h>', then define
TIOCGWINSZcan be found in `<termios.h>'.
AC_DEFINE's `PACKAGE' and `VERSION'. This can be avoided by passing in a non-empty third argument.
includestatements. This macro is automatically invoked when needed; there should be no need to invoke it manually.
emacs, and, if found, sets the output variable
lispdirto the full path to Emacs' site-lisp directory.
AC_PROG_CC_C_O, but it generates its results in the manner required by automake. You must use this instead of
AC_PROG_CC_C_Owhen you need this functionality.
CCto make it so. This macro tries various options that select ANSI C on some system or another. It considers the compiler to be in ANSI C mode if it handles function prototypes correctly. If you use this macro, you should check after calling it whether the C compiler has been set to accept ANSI C; if not, the shell variable
am_cv_prog_cc_stdcis set to `no'. If you wrote your source code in ANSI C, you can make an un-ANSIfied copy of it by using the
ansi2knroption (see section Automatic de-ANSI-fication).
AC_DECL_YYTEXT(see section `Particular Program Checks' in The Autoconf Manual), but uses the
missingscript on systems that do not have
lex. `HP-UX 10' is one such system. Autoconf 2.50 and higher, in order to simplify the interface, includes the body of
AC_PROG_LEX. To ensure backward compatibility,
AC_DECL_YYTEXTis nevertheless defined as an invocation of
AM_PROG_LEXinvokes both, it causes an annoying but benign warning (
AC_PROG_LEXinvoked multiple times) which you should just ignore. In the future, once Automake requires Autoconf 2.50, this issue will be fixed, but the current compatibility with Autoconf 2.13 prevents this.
gcjprogram or causes an error. It sets `GCJ' and `GCJFLAGS'.
gcjis the Java front-end to the GNU Compiler Collection.
installwhich can be used to
stripa program at installation time. This macro is automatically included when required.
am_cv_sys_posix_termiosto `yes'. If not, set the variable to `no'.
WITH_DMALLOCand add `-ldmalloc' to
configurecommand line. If specified (the default), then the `regex' regular expression library is used, `regex.o' is put into `LIBOBJS', and `WITH_REGEX' is defined.. If `--without-regex' is given, then the `rx' regular expression library is used, and `rx.o' is put into `LIBOBJS'.
aclocal program doesn't have any built-in knowledge of any
macros, so it is easy to extend it with your own macros.
This is mostly used for libraries which want to supply their own
Autoconf macros for use by other programs. For instance the
gettext library supplies a macro
should be used by any package using
gettext. When the library is
installed, it installs this macro so that
aclocal will find it.
A file of macros should be a series of
aclocal programs also understands
AC_REQUIRE, so it is
safe to put each macro in a separate file. See section `Prerequisite Macros' in The Autoconf Manual, and section `Macro Definitions' in The Autoconf Manual.
A macro file's name should end in `.m4'. Such files should be installed in `$(datadir)/aclocal'.