Oct 7 2008

autotools

I’ve been known to knock autotools (autoconf and automake and friends), but let it not be forgotten that I have also been known to say that alternative pickings are pretty slim.

Part of the problem with autotools is that it’s easy to make an unmaintainable and unusable mess, and one that is essentially opaque to the uninitiated.

But, on the other hand, it’s equally easy to use autotools in a sane way which is just as easy or easier than writing makefiles and whatnot by hand. Once you get over the initial learning curve. That has been a big caveat. I’ve climbed that curve a few times and it goes in one ear and out the other.

Well, a friend pointed out an excellent tutorial on autotools which demystifies autotools. It also makes a good reference for next week when you’ve forgotten everything.

If you’re writing code to distribute, you should consider using autotools (and doing so sanely), and this is a good starting point. But that’s not the only reason to check it out. You may just be curious, or you may wish to learn how this works so you can contribute patches and bring sanity to your favorite project’s build system.

But whatever you do, never ever just copy someone else’s autotools configuration into yours and apply “shotgun debugging” to shoehorn it into your project. That is the wrong approach and the primary cause of so many broken autotools setups.