Go to the first, previous, next, last section, table of contents.
A cache file is a shell script that caches the results of configure tests run on one system so they can be shared between configure scripts and configure runs. It is not useful on other systems. If its contents are invalid for some reason, the user may delete or edit it.
By default, configure
uses no cache file (technically, it uses
@option{--cache-file=/dev/null}), to avoid problems caused by accidental
use of stale cache files.
To enable caching, configure
accepts @option{--config-cache} (or
@option{-C}) to cache results in the file `config.cache'.
Alternatively, @option{--cache-file=file} specifies that
file be the cache file. The cache file is created if it does not
exist already. When configure
calls configure
scripts in
subdirectories, it uses the @option{--cache-file} argument so that they
share the same cache. See section Configuring Other Packages in Subdirectories, for information on
configuring subdirectories with the AC_CONFIG_SUBDIRS
macro.
`config.status' only pays attention to the cache file if it is
given the @option{--recheck} option, which makes it rerun
configure
.
It is wrong to try to distribute cache files for particular system types. There is too much room for error in doing that, and too much administrative overhead in maintaining them. For any features that can't be guessed automatically, use the standard method of the canonical system type and linking files (see section Manual Configuration).
The site initialization script can specify a site-wide cache file to
use, instead of the usual per-program cache. In this case, the cache
file will gradually accumulate information whenever someone runs a new
configure
script. (Running configure
merges the new cache
results with the existing cache file.) This may cause problems,
however, if the system configuration (e.g. the installed libraries or
compilers) changes and the stale cache file is not deleted.
Go to the first, previous, next, last section, table of contents.