Skip to Main Content
Autotools
book

Autotools

by John Calcote
July 2010
Intermediate to advanced content levelIntermediate to advanced
360 pages
11h 12m
English
No Starch Press
Content preview from Autotools

The Shortest configure.ac File

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

Example 3-1. The simplest configure.ac file

AC_INIT([Jupiter], [1.0])
AC_OUTPUT

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.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

GNU Autoconf, Automake, and Libtool

GNU Autoconf, Automake, and Libtool

Gary V. Vaughan, Ben Elliston, Tom Tromey, Ian Lance Taylor
Red Hat® Linux® 7 Unleashed

Red Hat® Linux® 7 Unleashed

Bill Ball, David Pitts

Publisher Resources

ISBN: 9781593272067Errata