Electricmonk

Ferry Boender

Programmer, DevOpper, Open Source enthusiast.

Blog

Autoconf / Automake

Monday, January 10th, 2005

I’ve been working all weekend on getting my latest project, ListPatron (which hasn’t been released yet) working with the GNU Build environment. I had to move a lot of stuff around in CVS, which I don’t particularly like since that means older checkouts won’t work anymore. Alas, nothing I can do about it, except perhaps migrate the application to something like Subversion. Too much work :-)

ListPatron is now being built by autoconf / automake, and it works great. Creating a new release is now as easy as this:

cvs checkout listpatron
./reconf.sh
./configure
make distcheck

and a new tarball will be ready for distribution. Users can simply extract the tarball and issue ./configure && make && make install and everything will be installed properly. Uninstallation? make uninstall. Done.

Doing a checkout and preparing it for development no longer requires all kinds of hacking on flags in Makefile’s and paths in the sourcecode. All that needs to be done is:

cvs checkout listpatron
./reconf.sh
./configure --datadir=`pwd` --enable-debug
make

and I can start developing in the src/ directory.

Even though this all works great, I found out it can be pretty hard setting up your project for use of autoconf and automake. You’ll have to replace all your Makefile’s with weird files named configure.in, Makefile.am, etc. Then you run tons off tools which generate tons of other files, and soon your whole development tree will be messy as hell.

Documentation was available (manual), but I didn’t find it of much use for the beginning user though. I found it lacking of general overview of the utilities and it didn’t really address the things I needed to know (“How do I get this or that feature that I’ve always used in Makefiles/my own scripts to work with autotools?”)

I’ve made some notes during the whole process of getting automake and autoconf working with my project, and perhaps I should take a day or two to write up my own tutorial.

*sigh* So many things to do, so little time.

The text of all posts on this blog, unless specificly mentioned otherwise, are licensed under this license.