[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: configure speedup proposal: add --assume-c99 and --assume-posix2008

From: Bob Friesenhahn
Subject: Re: configure speedup proposal: add --assume-c99 and --assume-posix2008 flags
Date: Sun, 23 Mar 2014 12:00:34 -0500 (CDT)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Sun, 23 Mar 2014, John Spencer wrote:

there are many configure scripts out there that still check for things that are standard since at least 10 years, and doing this extensively and over and over (people building software themselves usually build more than one package) consumes a lot of time (especially due to the non-parallel nature of configure scripts). often configure scripts take longer to finish than compiling the source code itself on decent machines with multiple cpu cores.


having an option like --assume-c99 could provide a shortcut so all checks

I don't like any approach which hard-codes assumptions in Autoconf. Hard-coded assumptions can easily be wrong and configure scripts could be used ten years later without being re-generated with the latest rules.

The Autoconf configuration cache mechanism (e.g. --config-cache) is very effective. In my test here, using --config-cache reduced repeated configure run time from 20 seconds to 5 seconds. By transcribing selected lines from config.cache to, these cached values can be made the default for a system. Modern autoconf searches for both $prefix/share/ and $prefix/etc/ and will use whichever ones are found.


egrep '^ac_cv_func_select' config.cache >> /usr/local/share/config.cache

and in /usr/local/share/

. /usr/local/share/config.cache

In fact, one could take a boilerplate, use it to create a bare configure, and then use most of its config.cache to form

With this approach, Autoconf can be optimized for a system with known behavior without placing brittle assumptions within Autoconf itself.

A separate script could be used to create a reusable subset of config.cache based on a specification.

BTFW that some software might not configure correctly given the presence of a file. In my experience, a file can cause harm when configuring GCC.

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]