Next: The top-level Makefile.am, Previous: General ideas, Up: GNU Automake [Index]
Automake requires certain variables to be defined and certain macros to be used in the package configure.in.
One such requirement is that configure.in must define the
variables PACKAGE
and VERSION
with AC_SUBST
.
PACKAGE
should be the name of the package as it appears when
bundled for distribution. For instance, Automake definees
PACKAGE
to be ‘automake’. VERSION
should be the
version number of the release that is being developed. We recommend
that you make configure.in the only place in your package where
the version number is defined; this makes releases simpler.
Automake requires the use of the macro AC_ARG_PROGRAM
if a
program or script is installed.
If your package is not a flat distribution, Automake requires the use of
AC_PROG_MAKE_SET
.
Automake will also recognize the use of certain macros and tailor the generated Makefile.in appropriately. Currently recognized macros and their effects are:
AC_CONFIG_HEADER
Automake will generate rules to automatically regenerate the config
header. If you do use this macro, you must create the file
stamp-h.in. It can be empty. Also, the AC_OUTPUT
command
in configure.in must create stamp-h, eg:
AC_OUTPUT(Makefile, [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
AC_CONFIG_AUX_DIR
Automake will look for various helper scripts, such as mkinstalldirs, in the directory named in this macro invocation. If not seen, the scripts are looked for in their “standard” locations (either the top source directory, or in the source directory corresponding to the current Makefile.am, whichever is appropriate).
AC_OUTPUT
Automake uses this to determine which files to create.
AC_PATH_XTRA
Automake will insert definitions for the variables defined by
AC_PATH_XTRA
into each Makefile.in that builds a C program
or library.
AC_CANONICAL_HOST
AC_CANONICAL_SYSTEM
AC_CHECK_TOOL
Automake will ensure that config.guess and config.sub exist.
AC_FUNC_ALLOCA
AC_FUNC_GETLOADAVG
AC_FUNC_MEMCMP
AC_STRUCT_ST_BLOCKS
fp_FUNC_FNMATCH
AC_FUNC_FNMATCH
AC_REPLACE_FUNCS
AC_REPLACE_GNU_GETOPT
Automake will ensure that the appropriate source files are part of the distribution, and will ensure that the appropriate dependencies are generated for these objects. See Building a library for more information.
Automake will also detect statements which put ‘.o’ files into
LIBOBJS
, and will treat these additional files in a similar way.
AC_PROG_RANLIB
This is required if any libraries are built in the package.
AC_PROG_INSTALL
fp_PROG_INSTALL
fp_PROG_INSTALL
is required if any scripts (see Executable Scripts) are
installed by the package. Otherwise, AC_PROG_INSTALL
is
required.
gm_PROG_LIBTOOL
AC_PROG_LIBTOOL
Automake will turn on processing for libtool
(see The
Libtool Manual in The Libtool Manual). This work is
still preliminary.
ALL_LINGUAS
If Automake sees that this variable is set in configure.in, it will check the po directory to ensure that all the named ‘.po’ files exist, and that all the ‘.po’ files that exist are named.
fp_C_PROTOTYPES
This is required when using automatic de-ANSI-fication, see Automatic de-ANSI-fication.
ud_GNU_GETTEXT
This macro is required for packages which use GNU gettext (FIXME xref). It is distributed with gettext. Automake uses this macro to ensure that the package meets some of gettext’s requirements.
jm_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.
The ‘fp_’ macros are from {No value for ‘Francois’} Pinard and the
‘jm_’ macro is from Jim Meyering. Both sets are included with
Automake. automake
will tell where the macros can be found if
they are missing.
Next: The top-level Makefile.am, Previous: General ideas, Up: GNU Automake [Index]