autoconf: Cache Files
1
1 7.4.2 Cache Files
1 -----------------
1
1 A cache file is a shell script that caches the results of configure
1 tests run on one system so they can be shared between configure scripts
1 and configure runs. It is not useful on other systems. If its contents
1 are invalid for some reason, the user may delete or edit it, or override
1 documented cache variables on the `configure' command line.
1
1 By default, `configure' uses no cache file, to avoid problems caused
1 by accidental use of stale cache files.
1
1 To enable caching, `configure' accepts `--config-cache' (or `-C') to
1 cache results in the file `config.cache'. Alternatively,
1 `--cache-file=FILE' specifies that FILE be the cache file. The cache
1 file is created if it does not exist already. When `configure' calls
1 `configure' scripts in subdirectories, it uses the `--cache-file'
1 argument so that they share the same cache. ⇒Subdirectories,
1 for information on configuring subdirectories with the
1 `AC_CONFIG_SUBDIRS' macro.
1
1 `config.status' only pays attention to the cache file if it is given
1 the `--recheck' option, which makes it rerun `configure'.
1
1 It is wrong to try to distribute cache files for particular system
1 types. There is too much room for error in doing that, and too much
1 administrative overhead in maintaining them. For any features that
1 can't be guessed automatically, use the standard method of the canonical
1 system type and linking files (⇒Manual Configuration).
1
1 The site initialization script can specify a site-wide cache file to
1 use, instead of the usual per-program cache. In this case, the cache
1 file gradually accumulates information whenever someone runs a new
1 `configure' script. (Running `configure' merges the new cache results
1 with the existing cache file.) This may cause problems, however, if
1 the system configuration (e.g., the installed libraries or compilers)
1 changes and the stale cache file is not deleted.
1
1 If `configure' is interrupted at the right time when it updates a
1 cache file outside of the build directory where the `configure' script
1 is run, it may leave behind a temporary file named after the cache file
1 with digits following it. You may safely delete such a file.
1