On Sat, Feb 22, 2003 at 12:34:12PM +0200, Tuomo Valkonen wrote: > > But there's absolutely no need to lock the build process behind the > checks. The checks are only necessary to check what is missing if the > build fails, or, if the user first wants to automatically check if the > script happens to manage to find everything wanted installed.
I agree. But what about having a small test program to just check if it can find all libraries and headers? The program would consist of one .c file that includes all the headers the package needs (determined from the configuration) and is compiled and linked with the same options that the main application will be compiled and linked with. When running make for the first time, a makefile rule will be invoked to build this test program. If it builds successfully, the build process continues. If there is an error, the build process interrupts. This would happen quite fast and wouldn't require the user to build the whole program before discovering that some library was missing or some option was not set. When it comes to configuration, there could be three configuration files (system.mk-style). One with default settings, one with settings generated by a configure script (optional), and one that includes the first two and lets the user override settings from them. Thus the user does not have to use configure script at all, and even if the user chooses to do so, he or she can still override the determined settings. However, this requires the maintainer to keep all these files in sync, so it would probably be best to have a master file that these are generated from by the maintainer. After some more consideration, I kind of agree with you that it is better to not use autoconf at all, because autoconf is based on the m4 macro language. This is mainly for historical reasons, it would be better to use a real scripting language, even the autoconf manual says so. A replacement for autoconf based on a real language would be able to generate better configure scripts, and the input files would be easier to understand and more concise. /Pelle
