Here is an idea for writing a multiprocessor-friendly autoconf.
Basically, the idea is to change the configure phase into a Makefile
target, and use caching as a way to split it into various sub-targets that
can be executed in parallel.  The shell script might run the "sane build"
test and then spawn the Makefile.

Non-caching shell code would constitute a serialization barrier. AC_REQUIRE
would also be used to determine the required Makefile dependencies
(possibly together with some static analysis on the referenced cache
variables or #define'd symbols -- people doing strange things with
variables and evals would need to provide hints or possibly to use an
AC_SERIALIZE barrier).

It could also give an interesting way to solve the space problem by using
suffix rules:

        ac_cv_func_%: AC_CHECK_FUNC.%
                *** test body here ***

        ac_cv_func_getcwd: AC_CHECK_FUNC.getcwd 
        ac_cv_func_fork: AC_CHECK_FUNC.fork

There is too little meat in this message to provide a design, but I'm
willing to go on and provide a proof-of-concept if there's enough
interest.  This change would probably mean doing major rewrites of parts
of autoconf, and heavily using autom4te traces.

Paolo



Reply via email to