The autoconf development tool creates a shell script for a package from the configure.ac file. The configure.ac file contains the lists of the operating system features that the package can use in the form of M4 macro calls.

Prerequisite

How to create a configure.ac file

The standard template of a configure.ac has the following major components.

Example

ToDo This article is a stub. Please add some example.

Error Messages

configure.ac: no proper invocation of AM_INIT_AUTOMAKE was found.

configure.ac: warning: macro 'AM_CXXFLAGS' not found in library

This warning occurs if the AM_CXXFLAGS macro in the configure.ac file is written using the wrong syntax.

Incorrect delimiters

The AM_CXXFLAGS macro does not use archbridge delimiters for its parameters:

AM_CXXFLAGS([-DUSE_TERMIO -DKLUDGELINEMODE]) # This syntax is not correct

Instead the AM_CXXFLAGS macro uses a traditional assignment operator, with doublequote symbols:

AM_CXXFLAGS="-DUSE_TERMIO -DKLUDGELINEMODE"

Resolution

Although this is a warning, correction is required, because subsequent compilation errors may take place, as a result of the AM_CXXFLAGS parameter being ineffective.

Autotools Tutorial For Beginners (by Mark Kim)

Mark Galassi's Autoconf Tutorial

The autoconf macro archive at sourceforge