GNU Autoconf, Automake, and Libtool (2nd Edition)

Quick Overview

Overall, this was a good book. It greatly enhanced my understanding and ability to use the GNU Autotools. It did suffer from a few weaknesses, the main one being that it was out of date by the time I got my copy from the local LUG

Publisher Information

Title GNU Autoconf, Automake, and Libtool (2nd Edition)
Publisher New Riders Publishing
ISBN 1578701902
Authors Gary V. Vaughan and Thomas Tromey
Reviewer Clinton Ebadi <unknown_lamer at unknownlamer dot org>

Table of Contents

  1. History
  2. How to run Configure, and the Most Useful Standard Makefile Targets
  3. Introducing 'Makefile's
  4. Using GNU Autotools to Manage a "Minimal Project"
  5. Writing a Portable 'configure.in'
  6. Introducing GNU Automake
  7. A Small GNU Autotools Project
  8. Bootstrapping
  9. Introducing GNU Libtool
  10. Using GNU Libtool with 'configure.in' and 'Makefile.am'
  11. A Large GNU Autotools Project
  12. Rolling Distribution Tarballs
  13. Installing and Uninstalling Configured Projects
  14. Writing Portable C with GNU Autotools
  15. Writing Portable C++ with GNU Autotools
  16. Dynamic Loading
  17. Using GNU libltdl
  18. Advanced GNU Automake Usage
  19. A Complex GNU Autotools Project
  20. GNU M4
  21. Writing Portable Bourne Shell
  22. Writing New Macros for Autoconf
  23. Migrating and Existing Package to GNU Autotools
  24. Using Autotools with Cygnus' Cygwin
  25. Cross Compilation with GNU Autotools

Most Useful Chapters

There were several very useful chapters. One of the most useful was the chapter on GNU M4. M4 is a bit confusing, so it helped to provide a gentle introduction. The chapter on M4 doesn't go as in-depth as the tutorial in the GNU M4 manual, but it provides enough information to get started. The GNU libltdl chapters were also useful. I would recommend using GNU libltdl to anyone who wants to dynamically open libraries. Libltdl works on a number of UNIX systems, as well as Windows. The Portable C++ chapter was probably the most useful chapter. Yes, C++ is standardized and GNU GCC 3 provides a mostly standards compliant library and compiler (everything but export..grr), but how many people are using GCC 3? Writing portable C++ is still really difficult, so the chapter on it was very useful.

Least Useful Chapter

There was one chapter that I feel wasn't really needed: How to Write Portable C. C has been standardized since 1989! If someone is using a system with a K&R compiler, the odds of them wanting to install new software is probably low. If you are running an old copy of UNIX, and can't get a new vendor compiler for free, install GCC. It isn't that difficult! For most people reading the chapter on portable C is waste because it focuses too much on writing C that will compile with K&R compilers. It is made worse by the other chapters that use K&R style C! The chapter would be more useful if it provided more advice on how to write portable ANSI C89. A good overview of the differences between C89 and C99 would have been nice as well (e.g. the size of an array doesn't need to be known at compile time anymore).

Why this book is good

This book uses a single project all the way through: a simple shell library. This library allows for the creation of shells. It starts out small and grows in size and complexity as the book goes on. This provides a nice introduction to the Autotools. The book covers more than just the autotools: it covers portability. What good are the autotools (which were designed to aid portability) when the source to a program isn't portable? It also covers extending Autoconf with new macros, but sadly doesn't do the same for Automake. Once you have finished this book, you end up with a nice bit of knowledge on the Autotools. It even covers converting an existing project to the Autotools, which is a big help if you already have an project that doesn't use them and you want their features.

Out of Date...Oops

Yes, this book is a bit out of date. It covers Autoconf 2.13 and Automake 1.4. Autoconf 2.5 and Automake 1.5 have both been released and are both slightly incompatible with the old versions. The difference is very small for Autoconf 2.5, but a large number of projects will not work with Automake 1.5. The book mentions the shortcomings of Automake 1.4 and shows how they will be fixed in a future version (1.5), so it already provides a little bit of information on porting to Automake 1.5. The authors also said that the next version of Automake should be backwards compatible; that goal was not met. If you hit a snag you can always look up the change in the Automake manual.

Summary

Despite being out of date, it is a very good book. I recommend it to anyone who doesn't know how to use the Autotools and wants to use them, or to anyone who has a small amount of knowledge about them (like me) and wants to really know how to use them. If I had to rate it on a scale of one to ten, I would give it a seven. It goes into more than just the Autotools and shows how to write portable code from the experience of the authors.

Rating: 7/10

Last modified: Wed Jun 12 11:25:45 EDT 2002