The Shortest File

The simplest possible file has just two lines, as shown in Example 3-1.

Example 3-1. The simplest file

AC_INIT([Jupiter], [1.0])

To those new to Autoconf, these two lines appear to be a couple of function calls, perhaps in the syntax of some obscure programming language. Don't let their appearance throw you—these are M4 macro calls. The macros are defined in files distributed with the autoconf package. You can find the definition of AC_INIT, for example, in the autoconf/general.m4 file in Autoconf's installation directory (usually /usr/(local/)share/autoconf). AC_OUTPUT is defined in autoconf/status.m4.

Get Autotools now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.