|
|
| The two required macros..
|
| AC_INIT(package-name, e-mail)
| first macro with the name of the package (project) and
the e-mail address of the one to blame.
|
| AC_OUTPUT(Makefile man/Makefile
etc.)
| generates output makefiles; first argument is a
whitespace-separated list of files; looks for these files (and also these
files with suffix .in) and converts them to output files while
substituting the output variable values; accepts optional arguments with
command to be executed before and/or after.
|
| Other macros..
|
| AC_PREREQ(autoconf-version)
| ensures that at least the indicated version is
essential to the build; older versions are not up to it.
|
| AC_REVISION(info)
| no dollar signs or double quotes.
|
| AC_COPYRIGHT(notice)
| will show up on both the head of configure and
in configure --version.
|
| AM_INIT_AUTOMAKE(project, version)
| initializes automake.
|
| AM_PROG_LIBTOOL
| initializes libtool.
|
| AC_PROG_CC
| checks for C compiler.
|
| AC_PROG_CXX
| checks for C++ compiler.
|
| AC_CHECK_PROG(VAR, prog,
SUCC-VAR-VALUE, FAIL-VAR_VAL)
| checks to see if prog exists on $PATH; if
extant, VAR gets what is in SUCC-VAR-VAL, if not,
FAIL-VAR-VAL.
|
| AC_CHECK_LIB(lib-, sym))
| checks for present of symbol in a library; can run
optional shell codes as third and fourth arguments on success or failure;
upon success, will prepend -llib to compiler flags
and define macro HAVE_LIB(lib).
|
| AC_MSG_ERROR(error-message)
| can be passed as last argument to AC_CHECK_LIB
and others to cause error-message to get printed out prior to
exiting with failure.
|
| AC_HEADER_STDC
| checks for standard headers.
|
| AC_CHECK_HEADERS(header-list)
| checks for presence of headers specified as first
argument; if found, HAVE_header is defined (with header
in all caps).
| AC_C_CONST
| checks for typedefs, structures, etc..
|
| AC_HEADER_TIME
| checks out compiler characteristics.
|
| AC_CHECK_FUNCS(func-list)
| checks for presence of standard C library functions; if
found, HAVE_func is defined.
|
| AC_DEFINE(define)
| can be used anywhere in configure.ac to define a
C-preprocessor macro; accepts and optional argument to indicate value of
macro, AC_DEFINE(DEBUG_LEVEL, 9); for shell expansion, use
AC_DEFINE_UNQUOTED.
|
| AC_ARG_ENABLE
| allows for definition of another command-line option
(see tutorial).
|
| AC_SUBST(substring)
| aids in substitution of occurrences of one file for
another.
|
| AC_OUTPUT(Makefile, man/Makeifle)
| puts out files.
| |