scconfig - Simple C Config
Ever got annoyed by a 3 MB long ./configure script that took more time
to run than the actual compilation of the software later? Ever got bitten by
a bug in this ./configure script then spent a week on trying to get autoconf/automake/m4
magic to work? Then this project may be a good alternative for your software.
The idea is that the ./configure script should be modular. Small modules
should do separate simple things and they should be able to run alone for testing,
without the whole slow and big infrastructure. Still there should be a framework
that collects all data and knows what to run. After trying this with project
libgpmi, I found that there was a big problem with this: there's no script
language which is all:
- portable (so you have a single script and configure doesn't need its own ./configure before it can be run)
- doesn't require extra software to be installed on any POSIX-like system, including old UNIX systems
- powerful enough to allow "databases", test compiles and other things easily in a framework.
I concluded that the only solution is to rewrite the whole set of scripts as
an ANSI C program. ANSI C compiler is there on any system where I would use
scconfig; actually the software I am configuring already needs ANSI C. The task
itself, testing a bunch of different test programs with different paths and
compiler settings, is not something that's much easier to code in a scripting
language than in C.
So scconfig mainly offers a framework to store test results, dependencies
between tests and do test compiles/runs. The user may write simple functions
in modules that test-compile and run various small test programs and store
the result in a tree-like database. On the other layer, this tree can be used
to generate makefiles or other text files using an extremely simple built-in
template system. Of course the user is not bound to use this templating system,
any C program that generates output would do.
No release yet, please use svn://repo.hu/scconfig/trunk