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.
To create a configure script with Autoconf, you need to write an Autoconf input file `configure.in' and run autoconf on it. If you write your own feature tests to supplement those that come with Autoconf, you might also write files called `aclocal. m4' and `acsite. m4'.
Autoconf is an extensible package of M4 macros that produce shell scripts to automatically configure software source code packages. These scripts can adapt the packages to many kinds of UNIX-like systems without manual user intervention.
Autotools configurationThis file is used by autoconf to create the configure shell script that users run before building. The file must contain, at the very least, the AC_INIT and AC_OUTPUT M4 macros.
autoreconf is a Autotool which is used to create automatically buildable source code for Unix-like systems. Autotool is a common name for autoconf, automake, etc. These all together are termed as Autotools.
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
.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With