User guide

Autotools Plug-in for Eclipse
51
The Autotools suite's most commonly-used tools are:
autoconf
Generates the configure script from an input file (e.g. configure.ac)
automake
Creates the Makefile for a project on a specific system
autoscan
Generates a preliminary input file (i.e. configure.scan), which can be edited to create a final
configure.ac to be used by autoconf
All tools in the Autotools suite are part of the Development Tools group package. You can install
this package group to install the entire Autotools suite, or simply use yum to install any tools in the
suite as you wish.
4.3.1. Autotools Plug-in for Eclipse
The Autotools suite is also integrated into the Eclipse IDE via the Autotools plug-in. This plug-in
provides an Eclipse graphical user interface for Autotools, which is suitable for most C/C++ projects.
As of Red Hat Enterprise Linux 6, this plug-in only supports two templates for new C/C++ projects:
An empty project
A "hello world" application
The empty project template is used when importing projects into the C/C++ Development Toolkit that
already support Autotools. Future updates to the Autotools plug-in will include additional graphical user
interfaces (e.g. wizards) for creating shared libraries and other complex scenarios.
The Red Hat Enterprise Linux 6 version of the Autotools plug-in also does not integrate git or
mercurial into Eclipse. As such, Autotools projects that use git repositories will need to be
checked out outside the Eclipse workspace. Afterwards, you can specify the source location for such
projects in Eclipse. Any repository manipulation (e.g. commits, updates) will need to be done via the
command line.
4.3.2. Configuration Script
The most crucial function of Autotools is the creation of the configure script. This script tests
systems for tools, input files, and other features it can use in order to build the project
15
. The
configure script generates a Makefile which allows the make tool to build the project based on the
system configuration.
To create the configure script, create an input file and feed it to an Autotools utility to create
theconfigure script. This input file is typically configure.ac or Makefile.am; the former is
usually processed by autoconf, while the latter is fed to automake.
If a Makefile.am input file is available, the automake utility creates a Makefile template (i.e.
Makefile. in), which may refer to information collected at configuration time. For example, the
Makefile may need to link to a particular library if and only if that library is already installed. When
the configure script runs, automake will use the Makefile. in templates to create a Makefile.
15
For information about tests that configure can perform, refer to the following link:
http://www.gnu.org/software/autoconf/manual/autoconf.html#Existing-Tests