This debate has cropped up on a mailing list for a project I'm involved in. Unfortunately we're quite a small bunch at the moment, so I want to ask a wider audience.
We're writing a C library (for arbitrary precision arithmetic) and are investigating build systems. Currently we have a bash script in desperate need of work. I believe we can't use autotools etc due to licensing (bsd vs gpl). So I suggested we use a modern scripting language like python or perl.
The question is: is having something like perl or python around at build time an unrealistic dependency on Unix-like platforms these days?
1 Answer 1
You absolutely can use autotools, as there are absolutely no licensing restrictions on the configure scripts or any generated files.
That aside, I consider autotools to be quite broken technically in many ways, and prefer alternative solutions.
CMake is popular these days for C++ projects and works well irrespective of your language of choice. It generates makefiles in much the same way autotools does, but it can also generate build solutions for several IDEs and toolchains other than GNU. I use it in my own projects. KDE and several other major projects depend on it, so it's quite common to see on development systems.
SCons is popular in some circles, and many people seem to quite like it. It only requires Python, and the likelihood that you don't have python installed on a *nix system is quite slim these days.
Rake is another good make system, and depends only on Ruby.
It's safe to say that Python and Perl are everywhere (moreso Perl than Python). Depending on them is completely reasonable on any Linux or Unix environment. Indeed, bootstrapping a Linux distribution requires the presence of Perl, and getting to the point of a graphical environment all but necessitates the presence of Python.
x86
inline asm that reads the output ofcpuid
and we grabuname -m
too, but remember, you can havei686/core2
etc... so it gets more complicated. We also need to support "generic" (from C) builds. Everything is written first in C, then we optimise it.