12

I have a large autoconf/automake project, broken into components using AC_CONFIG_SUBDIRS. Is there any way to make autoconf/configure run faster? Perhaps doing subdirs in parallel, or caching reusable findings?

I could easily write a build script that would build components in parallel, but would prefer to not add a secondary point of build structure maintainance.

2 Answers 2

8

You can cache results between multiple configure (several runs of the same configure, or recursive sub-configure) using the configure cache feature. Simply run

./configure -C

However you should remember to delete the cache when your system's configuration changes (like after installing new packages that were not found by a previous configure run). If you use some third-party macros, you may also have to fix some of them to cache their results properly (a common error is to make some configuration decision during a test that might be skipped if the result of that test is cached).

If you want to share your cache between multiple projects, you can set it up in config.site.

1
  • 2
    Agreed on just about all counts, but setting cache variables in config.site strikes me as a Bad Idea. Didn't gentoo try a confcache a few years back? IIRC, they had to back it out because it broke heaps of things.
    – Jack Kelly
    Jul 15, 2011 at 10:35
5

I'm thinking of a parallel configure which does the checks in parallel making best use of the multicore of the host. Probably the autoconf should generate bash script which can be vectorized/pipelined to make it possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.