Truth is most autoconf setups are just arbitrary pastiches of other autoconf setups that the devs didn't really understand. Half the time a bunch of the test results aren't even used, or are testing for something that isn't an issue on any platform it's ever going to be compiled on.
And when that makefile breaks? At least you have a hope in hell of understanding why it broke. Autoconf breaks? Good luck.
This is probably also why libtool's configure probes no fewer than 26 different names for the Fortran compiler my system does not have, and then spends another 26 tests to find out if each of these nonexistent Fortran compilers supports the -g option.
I did this to see for myself if autotools bashing is justified and I can tell you this: If a configure script is that bad, then the project's developers did a poor job using autotools.
checking whether mkfifoat is declared without a macro... yes
Why? Nowhere in grep is there a single call to mkfifoat. Why does it care?I also liked this:
checking for MAP_ANONYMOUS... yes
checking for MAP_ANONYMOUS... yes
checking for MAP_ANONYMOUS... yes
checking for MAP_ANONYMOUS... yes
checking for MAP_ANONYMOUS... yes
checking for MAP_ANONYMOUS... yes
checking for MAP_ANONYMOUS... yesAnd the work has a bigger risk because you can't actually check on more than a couple of distributions before you ship.
.. CMake? http://www.cmake.org/
I had high hopes for scons, but that turned into a quagmire. Any build system that's going to unseat autotools will need to obviate the need for almost all custom scripts. AKA, specify the 'what', and let the user apply a 'recipe' for the 'how'. Or something...if I knew what it was supposed to look like I'd build it.
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
SET(BUILD_SHARED_LIBRARIES OFF)
SET(CMAKE_EXE_LINKER_FLAGS "-static")
The bigger problems with building a static binary on Linux are that:
1. Most Linux distros don't install static versions of libraries. You can't link in a static library dependency that doesn't exist.
2. glibc can't "really" be linked statically because of the way it's designed. See here for the gory details: https://gcc.gnu.org/ml/gcc/1998-12/msg00083.htmlNaturally, you have problems #1 and #2 with autotools or any other build system as well, since they aren't CMake problems.