autotools are not so scary

This week I was porting XSieve installation tarball to GNU standards, in particular, to using ./configure, make, make install. It was not easy, especially because my package is not standard, but I've done it. On Monday I plan to update documentation and release the version 0.0.2.

It took a time to chew the interdependencies of autoconf, automake, autoheader, libtoolize, aclocal and other stuff. My main reading were the book "Autoconf, Automake, and Libtool: Autoconf, Automake, and Libtool" and the texinfo documentation for the tools.

Initially I was sceptic about usefulness of the autotools, but now I realized thair potential. My Makefiles are greately simplified and I hope I'll be able to compile code on any platform.

The main drawback is the size of generated files. With autotools, size of the distribution package is increased from 30 Kb to 280 Kb (ten times).

There was a problem with name collision in autoconf and make. Autoconf uses the keywords if/endif, raising an error on keywords ifeq/endif which sometimes needed in Makefiles:

.../Makefile.am:XX: endif without if

To fix the problem, add to configure.ac:

MK=''; AC_SUBST(MK)

Now use the following construction in Makefile.am-files:

@MK@ifeq (...,...)
...
@MK@endif
Categories: XSieve

Updated: