M4 Macros
Code Snippets
To include an M4 file, use the sinclude function, e.g.
No Format |
---|
sinclude(build/autoconf/myMacros.m4) |
This will also work.
No Format |
---|
builtin(include, /some/custom/macro.m4) |
Important Macros
Checking files
No Format |
---|
AC_CHECK_FILE AC_CHECK_FILES |
Checking libs
No Format |
---|
AC_CHECK_LIB |
Checking for programs
No Format |
---|
AC_CHECK_PROG |
Messages
No Format |
---|
AC_MSG_CHECKING AC_MSG_NOTICE AC_MSG_RESULT AC_MSG_WARN |
Command-line arguments
No Format |
---|
AC_ARG_ENABLE AC_ARG_WITH |
Preprocessor defines
No Format |
---|
AC_DEFINE AC_DEFINE_UNQUOTED |
Output variables to substitute
No Format |
---|
AC_SUBST AC_SUBST_FILE |
Links
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