What if autoconf could be replaced by moving the configuration steps into makefiles, rather than vice-versa?
File paths and library lists can already be handled nicely with systems like pkg-config, with the only requirement that the pkg-config tool be in the path.
Why not move feature-detection and other configure sort of tasks into makefiles too?
A library of makefile pieces could be built that represent various autoconf tests, stored in a central directory like /usr/share/pkgconfig
, ready for inclusion into GNUmakefiles. Rules might look like this:
include $(shell pkg-config gnuconf-make --variable=MAKEFILE) all: check-configuration PKGCONFIG_PACKAGES=gtk2 atk lua-5.0.0 check-configuration: check-c-compiler check-cpp check-ld my-custom-check check-pkgconfig-packages my-custom-check: do something here to check some part of the build