Autotools

A Practitioner's Guide to GNU Autoconf, Automake, and Libtool
by John Calcote

July 2010, 360 pp.
ISBN: 978-1-59327-206-7

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.


About the Author

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 http://www.sourceforge.net).


Table of Contents

Acknowledgments
Foreword by Ralf Wildenhues
Introduction

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 (PDF).

View the Index (PDF).

(top)

Reviews

"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 configure.ac or Makefile.am 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

(top)

Updates

(show updates)(top)