M4 Macros

Code Snippets

To include an M4 file, use the sinclude function, e.g.

sinclude(build/autoconf/myMacros.m4)

This will also work.

builtin(include, /some/custom/macro.m4)

Important Macros

Checking files

AC_CHECK_FILE
AC_CHECK_FILES

Checking libs

AC_CHECK_LIB

Checking for programs

AC_CHECK_PROG

Messages

AC_MSG_CHECKING
AC_MSG_NOTICE
AC_MSG_RESULT
AC_MSG_WARN

Command-line arguments

AC_ARG_ENABLE
AC_ARG_WITH

Preprocessor defines

AC_DEFINE
AC_DEFINE_UNQUOTED

Output variables to substitute

AC_SUBST
AC_SUBST_FILE

Autconf Manual on Single HTML Page

http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_mono/autoconf.html

Current GNU Autoconf manual in PDF

http://www.gnu.org/software/autoconf/manual/autoconf.pdf

Autoconf macro archive

http://autoconf-archive.cryp.to/macros-by-category.html

Autobook

http://sourceware.org/autobook/autobook/autobook_toc.html

Checking for OpenGL (example)

http://autoconf-archive.cryp.to/ax_check_gl.html

Mozilla's configure.in

http://lxr.mozilla.org/seamonkey/source/configure.in

Guide to writing configure.in

http://www.adp-gmbh.ch/misc/tools/configure/configure_in.html

GNUlib's m4 macros

http://savannah.gnu.org/cgi-bin/viewcvs/gnulib/gnulib/m4/

Autoconf.info

http://www.nada.kth.se/cgi-bin/info?(autoconf.info)Top

  • No labels