"As crufty as autotools is, nothing comes close to being a more robust build system."
.. CMake? http://www.cmake.org/
.. 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.