lighty's life

lighty developer blog

Lighttpd Goes Scons

In my daily work at MySQL I added scons as the build-system for a cross-platform, multi-language project and am very satisfied with the results. We have Unix, Windows and MacOS X as build-platforms and Java, C, PHP and Perl as programming languages and all works nicely together in a Python written build-system.

lighttpd goes now the same way, solving the nasty autotools dependencies.

Autotools are a pain for two reasons:

  1. version incompatibilities
  2. it takes ages to rebuild the Makefiles and configure script
  3. the installation of modules via libtool takes ages too
  4. using m4 and sh as the lowest dominator

and waiting for a installation process to finish is lost time.

What is good at autotools ?

  1. make distcheck is great
  2. perfect integration into rpm building
  3. cross-compiling
  4. self-contained for a non-devs

As long as we don’t have a replacement for the ‘pro’ arguments in scons we will not drop autotools. They do there job in packaging and testing very well. But for building and developing lighttpd I’ll use scons.

The scons build-system is already in the SVN tree. It replaced autotools (automake, autoconf, libtool) and (g)make by one central tool.

You need

  1. python 2.2.x or higher
  2. scons 0.96.1 or higher
$ cp config.py config.py-sample
(adjust the features and paths)
$ scons install
  1. the checks for libraries, headers and functions are executed as ./configure did before
  2. the main binary is built
  3. the modules are created
  4. everything is installed

What else should you know about scons ?


$ scons -c [for a ‘make clean’]
$ scons check [for a ‘make check’]
$ cd src; scons -u [for a ‘make’ in the ‘src/’ directory]

In the near future autotools won’t be dropped in lighttpd. Up to now it was only tested with gcc and linux. It will need some time until everything is ported to scons, but it is worth it. Especially for the new devs struggling with autotools and there syntax and the old-devs who spend days just with waiting.