Autotools: A Practioner's Guide to GNU Autoconf, Automake, and Libtool
B**E
Needed book to clarify autotools web of tools
The autotools-toolset is one of the most widely used tools for building and packaging programs, especially in the unix world. It promises a standard interface and portability across more systems than you could easily consider yourself. It is also one of the least understood build-systems as it is an interesting web of small little tools solving an important problem.This "Autotools" book is an excellent introduction in the subject, enabling the reader to build their own autoconf/automake build systems. It is well structured by going from easy (just using autoconf) to complex (libtool) and gradually building on the topics that it explained earlier. This makes the book easy to ready and to follow, but I would recommend to try out some of the chapters before moving to the next one to make sure you understand it well as the next chapter will assume you do :PThe book consist of 11 chapters and I'd probably logically divide it in two parts. 1-7 is sort-of the basics and then 8-11 is examples and advanced tips. Chapter 1 is a small overview chapter explaining the history of autotools and the problem that it is trying to solve. Chapter 2 covers the GNU coding standards which is important to understand as automake is build on top of that. Chapter 3-4 cover the most basic of your autotools build system: autoconf. Chapter 5 then introduces the automake tool to this and it reworks earlier examples to show how automake simplifies the work needed to be done. Chapter 6-7 then adds shared libraries to the mix and explains why they are a pain in the butt and how libtool helps with that. That sort-of covers the basics of autotools.Chapter 8-9 take an open-source project (FLAIM, a database that originated at WordPerfect) and changed the build system from normal make to autotools. Flaim is an interesting project as it covers quite a lot of languages and problems. During this, it also introduces new autotools functionality. Chapter 10 looks a bit at what is happening inside the autotools black box by explaining the m4 macro language and how to write macros yourself. The last chapter has a catalog of useful tips when creating your own autotools project.I was myself setting up a somewhat complex autotools build system and this book came with the right content and the right time. Without it, I'm not sure if I would have succeeded, especially since the autotools knowledge on the web feels quite scattered. So, I'll give this 4 stars as it was excellent. It isn't 5 stars as it is a fairly niche book and only useful for people who need to setup an autotools build system. A very useful book!
T**S
Beware! Only experts can efficiently use this book.No use for Windows either.
I build various Open Source Software such as PHP, varnish cache, nginx on Mac OSX, Windows and Linux.I guess it's no surprise that sooner or later you run into problems as you build OSS on various operating systems.Sometimes the problem is as simple as a missing dependency: You just go and install the missing dependency and you're done.But other times things are trickier: You run into some incompatible directives or symbols in one of the source files; for instance when you try to configure babl-0.1.10 on Mac OSX (Leopard/PowerPC in particular) you 're likely to run into this kind of error: "babl-palette.c:22:20: error: values.h: No such file or directory" To solve it, I had to try a different version of babl package and the version I found happened not to contain 'configure' script and that meant I had to form the configure script myself. And that meant I needed to know how the Autoconf worked.Sometimes even after you successfully built and installed the package, you may experience runtime errors. For instance, if you successfully compile and install PHP with the GD extension on Leopard/PowerPC Mac, the moment your PHP application uses GD, PHP crashes because the GD uses some function of FreeType library and that causes a crash on Leopard's CarbonCore. To eliminate that you have to recompile the FreeType by giving the "--with-quickdraw-carbon=no" option to the configure script. That means you have to know how the configure works from the point of view of the developer and that might mean you'd better know how that particular software package was prepared.Eventually I decided to learn Autotools and bought this book. But I soon found that it was quite hard to understand the contents. The basic problem seems to be that the author assumes that I'm an open source package maintainer; that's actually written inside the book. But an open source package maintainer almost certainly knows and uses Autotools, so why should she or he study a book on Autotools?At the beginning of the preface, a section where you usually see stuff like acknowledgements, the author talks about a book called "GNU Autoconf, Automake and Libtool" the 'goat book' in short and says that for more than 10 years it was the only 3rd party Autotools book. I noticed that quite accidentally after I bought this book and after I spent years understanding nothing from the book. Later I bought that 'goat book' and only then the things started to make sense. If the author had listed that 'goat book' in a place where I could notice more easily, I would go and take a look at it earlier and that would save me many troubles.I mean, the old goat book explains the Autotools way much better than this book. And just recently, I've found a "Hello World!" tutorial on Autotools on the Internet (markuskimius.wikidot.com/programming) Even that free tutorial explains the Autotools business much better than this book, because it shows you how to build any project in a portable way step by step. More importantly, it explains the rationale behind the use of each command in the autotools suite.The author also makes assumptions about when not to use Autotools and seems to conclude that Autotools should not be used to compile applications for the Windows. So he eliminates everything about MinGW/MSYS and the Cygwin. But the majority of desktops and laptops use Windows and I'm expected to be able to compile open source apps for the Windows too. For instance, I build pure-ftpd for Windows as a hobby project and I require that the project doesn't depend on cygwin1.dll, it must run just natively on Windows. That requires me to edit several source and header files, possibly config.h file and so on. This book doesn't even have a page about how to compile OSS on Windows. As a comparison, the old goat book does have several pages on Cygwin and that gives you at least clues about what to do in a Windows environment.Summary: I consider myself unlucky having bought this book. I was expecting to gain an understanding of how Autotools worked and how to build projects in a portable way. I have gained the Autotools experience using mainly other resources some of which I mentioned above and by working on my own specific projects, doing lots of trial and error routines.
J**S
Gold Mine!
I'm a Software Developer that until recently wrote mostly Windows programs. My job now has me writing Linux programs (I have an awesome job!). I've always been interested in Linux and open source projects but haven't had the time to pursue it much until my job required me to learn it.My first assignment was to add several features to a program written in C that runs on Red Hat Linux. The original programmer used the Net Beans IDE. I installed Net Beans and opened the Net Beans project file. I opened the makefile and was stunned to find that it was a confusing machine generated mess. I couldn't begin until I was confident that I knew where and why each of the makefile settings were set. I eventually decided to start from scratch and rewrite the entire application.It quickly became clear what I needed to do. I uninstalled Net Beans and decided to call the native Linux compiler / linker (GCC) directly without using an IDE. To help me along the way I ordered this book. This book quickly filled in my makefile knowledge gaps and pointed me in the right direction. Armed with this book and the GNU coding standards that it recommended, I opened up the VIM text editor and wrote one of my best programs to date. Looking at my makefile, configure script, and other source code you would think that I had been writing Linux programs for several years. I had often compiled source code using the commands `configure', `make', and `make install' but didn't totally understand the underlying process until I read this book. This book is accurate, well written, and priceless!
P**D
Almost comprehensive
I found this publication very helpful - IMO, it could have been bettered only by an even closer, under-the-covers, examination such that things like adding a new platform could be made a little more obvious - it might be that this is covered, but it's not in the index and I've yet to find it by reading thro' the material.
J**E
I LOVE IT! AND SO WILL YOU!!!!
This is a must have if you maintain packages for Linux that use automake, libtool, or autoconfig for the configure, make, make install routine of package installation. Also a good read if you plan on making packages for various distrobutions including Slackware, or if you manually install packages for your own use regardless of the distro.
T**Y
good if you're forced to use autotools
I have to do work with a project that uses autotools. This does as good a job of explaining autotools as you can get, I think. I'd definitely avoid using autotools for new projects.
J**A
.
100% recommended for newbies and advanced
N**R
C'est parfait
A very good book to learn the autotools and understand their mechanisms.
Trustpilot
2 days ago
1 month ago