A Practitioner's Guide to GNU Autoconf, Automake, and Libtool
by John Calcote
July 2010, 360 pp.
This book is currently out of stock

The GNU Autotools make it easy for developers to create software that is portable across many Unix-like operating systems. Although the Autotools are used by thousands of open source software packages, they have a notoriously steep learning curve. And good luck to the beginner who wants to find anything beyond a basic reference work online.

Autotools is the first book to offer programmers a tutorial-based guide to the GNU build system. Author John Calcote begins with an overview of high-level concepts and a quick hands-on tour of the philosophy and design of the Autotools. He then tackles more advanced details, like using the M4 macro processor with Autoconf, extending the framework provided by Automake, and building Java and C# sources. He concludes the book with detailed solutions to the most frequent problems encountered by first-time Autotools users.

You'll learn how to:

  • Master the Autotools build system to maximize your software's portability
  • Generate Autoconf configuration scripts to simplify the compilation process
  • Produce portable makefiles with Automake
  • Build cross-platform software libraries with Libtool
  • Write your own Autoconf macros

Autotools focuses on two projects: Jupiter, a simple "Hello, world!" program, and FLAIM, an existing, complex open source effort containing four separate but interdependent subprojects. Follow along as the author takes Jupiter's build system from a basic makefile to a full-fledged Autotools project, and then as he converts the FLAIM projects from complex hand-coded makefiles to the powerful and flexible GNU build system.

Author Bio 

John Calcote is a Senior Software Engineer and Architect at Novell, Inc. He's been writing and developing portable networking and system-level software for over 20 years and is active in developing, debugging, and analyzing diverse open source software packages. He is currently a project administrator of the OpenSLP, OpenXDAS, DNX, and FLAIM projects (open source software available at

Table of contents 

Foreword by Ralf Wildenhues

Chapter 1: A Brief Introduction to the GNU Autotools
Chapter 2: Understanding the GNU Coding Standards
Chapter 3: Configuring Your Project with Autoconf
Chapter 4: More Fun with Autoconf: Configuring User Options
Chapter 5: Automatic Makefiles with Automake
Chapter 6: Building Libraries with Libtool
Chapter 7: Library Interface Versioning and Runtime Dynamic Linking
Chapter 8: FLAIM: An Autotools Example
Chapter 9: FLAIM Part II: Pushing the Envelope
Chapter 10: Using the M4 Macro Processor with Autoconf
Chapter 11: A Catalog of Tips and Reusable Solutions

View the detailed Table of Contents
View the Index


"In my opinion you will find no better introduction to this complex subject."
Slashdot (Read More)

"The book has plenty of variable reference tables, command line input/output examples and switches, Bourne shell scripts, Macro printouts, best practice recommendations and honest recognition of the passion that developers have about their tools. This refreshing approach shows how the author is in tune with the real world practices and curmudgeons who are resistant to change."
Dr. Dobb's (Read More)

“If you’re a newcomer who wants to know how it works behind the scenes in detail, you just have to read it.”
Flameeyes's Weblog (Read More)

"If you have looked inside or and felt horrified by the use of ugly, incomprehensible macros, this book is for you. I may not have become an Autotools fan, but at least I'm not afraid of them."
Computer Science House


Page 28:
Line 7 of Listing 2-8 reads: main.o: main.c. It should instead read: display.o: display.c.


Page 69:
Listing 3-10 should read as follows, with the final three lines added to the end of the listing:
# VPATH-related substitution variables
srcdir          = @srcdir@
VPATH           = @srcdir@

jupiter: main.c
  $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(srcdir)/main.c


Page 87:
Line 3 of Listing 3-23 reads:
$(CC) -I. -I$(srcdir) -I.. $(CPPFLAGS) $(CFLAGS) -o $@ main.c
It should instead read:
$(CC) $(CPPFLAGS) $(CFLAGS) -I. -I$(srcdir) -I.. -o $@ $(srcdir)/main.c


Page 93:
Line 9 of Listing 4-2 reads:
$(CC) $(CFLAGS) $(CPPFLAGS) -I. -I$(srcdir) -I.. -o $@ main.c
It should instead read:
$(CC) $(CFLAGS) $(CPPFLAGS) -I. -I$(srcdir) -I.. -o $@ $(srcdir)/main.c


Line 13 of Listing 4-3 reads:
  $(INSTALL) –d $(DESTDIR)$(bindir)/jupiter
It should instead read:
  $(INSTALL) -d $(DESTDIR)$(bindir)


Page 101:
The final three lines of Listing 4-2 read:
jupiter: main.c
  $(CC) $(CFLAGS) $(CPPFLAGS) -I. -I$(srcdir) -I.. -o $@ main.c $(LIBS)

They should instead read:
jupiter: main.c
  $(CC) $(CFLAGS) $(CPPFLAGS) -I. -I$(srcdir) -I.. \
    -o $@ $(srcdir)/main.c $(LIBS)


Page 104:
The final four lines of Listing 4-2 read:
jupiter: main.c
  $(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) -I. -I$(srcdir) -I.. \
    -o $@ main.c $(LIBS)

They should instead read:
jupiter: main.c
  $(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) -I. -I$(srcdir) -I.. \
    -o $@ $(srcdir)/main.c $(LIBS)