views:

204

answers:

1

Hi,

I'm interested in the configuration/building of large C systems...

The Linux kernel uses the Kconfig language to describe the various configuration options (macros defined as CONFIG_X) and their dependencies... Basically, in each directory, there's a Kconfig file with the configuration options defined in this subsystem...

Is there any alternative to that to describe configuration options in large C systems like Apache or *-BSD ? what do people use in general ? What is the best practice ?

+1  A: 

Generally, autotools (see autotools book), i.e. GNU autoconf, automake, libtool are quite common. They are pretty flexible, but can be quite a handful to get up and running. With these you typically get a "configure" script that the end user can use to specify how to build the software (say. ./configure --with-foo --disable-bar).

CMake is increasingly popular, most notably used by KDE.

There are of course countless others as well.

janneb
but do you have a way to describe which configuration options are dependant ? or mutually-exclusive ?
LB
With autotools at least it's possible to do, yes. I'm not that experienced with cmake yet, so I can't tell.
janneb