newbies accidentally use a stale cache file.
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): Set cache_file to /dev/null
to disable caching by default.
(_AC_INIT_HELP): Adjust the --help message.
(AC_CACHE_LOAD, AC_CACHE_SAVE): Don't print "loading/updating
/dev/null" messages.
* autoconf.texi: Note that caching is disabled, how to enable it,
and that `./config.cache' is the traditional name of the cache file.
* install.texi: Likewise.
+2000-04-05 Steven G. Johnson <stevenj@alum.mit.edu>
+
+ Disable caching by default, so as not to cause problems when
+ newbies accidentally use a stale cache file.
+
+ * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Set cache_file to /dev/null
+ to disable caching by default.
+ (_AC_INIT_HELP): Adjust the --help message.
+ (AC_CACHE_LOAD, AC_CACHE_SAVE): Don't print "loading/updating
+ /dev/null" messages.
+ * autoconf.texi: Note that caching is disabled, how to enable it,
+ and that `./config.cache' is the traditional name of the cache file.
+ * install.texi: Likewise.
+
2000-04-03 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): If any option waiting for a
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
AC_SUBST(exec_prefix, NONE)dnl
host=NONE
no_create=
-h, --help print this message
-V, --version print the version of autoconf that created configure
-q, --quiet, --silent do not print `checking...' messages
- --cache-file=FILE cache test results in FILE
+ --cache-file=FILE cache test results in FILE [disabled]
-n, --no-create do not create output files
EOF
# -------------
define(AC_CACHE_LOAD,
[if test -r "$cache_file"; then
- echo "loading cache $cache_file"
+ test "x$cache_file" != "x/dev/null" && echo "loading cache $cache_file"
dnl Some versions of bash will fail to source /dev/null, so we
dnl avoid doing that.
test -f "$cache_file" && . $cache_file
esac >>confcache
if cmp -s $cache_file confcache; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
exec_prefix=NONE
host=NONE
no_create=
-h, --help print this message
-V, --version print the version of autoconf that created configure
-q, --quiet, --silent do not print `checking...' messages
- --cache-file=FILE cache test results in FILE
+ --cache-file=FILE cache test results in FILE [disabled]
-n, --no-create do not create output files
EOF
done
if test -r "$cache_file"; then
- echo "loading cache $cache_file"
+ test "x$cache_file" != "x/dev/null" && echo "loading cache $cache_file"
test -f "$cache_file" && . $cache_file
else
echo "creating cache $cache_file"
esac >>confcache
if cmp -s $cache_file confcache; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
the files listed above (@pxref{Invoking config.status});
@item
-a shell script called @file{config.cache} that saves the results of
-running many of the tests (@pxref{Cache Files});
+an optional shell script normally called called @file{config.cache}
+(created when using @samp{configure --cache-file=./config.cache}) that
+saves the results of running many of the tests (@pxref{Cache Files});
@item
a file called @file{config.log} containing any messages produced by
Files used in configuring a software package:
@example
@group
- .-------------> config.cache
+ .-------------> [config.cache]
configure* ------------+-------------> config.log
|
[config.h.in] -. v .-> [config.h] -.
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 @file{./config.cache} as the cache file,
-creating it if it does not exist already. @code{configure} accepts the
-@samp{--cache-file=@var{file}} option to use a different cache file;
-that is what @code{configure} does when it calls @code{configure}
-scripts in subdirectories, so they share the cache.
+By default, configure uses no cache file (technically, it uses
+@samp{--cache-file=/dev/null}), so as to forestall problems caused by
+accidental use of stale cache files.
+
+To enable caching, @code{configure} accepts the optional argument
+@samp{--cache-file=@var{file}} where @var{file} is the name of the cache
+file to use, traditionally @file{./config.cache}. The cache file is
+created if it does not exist already. When @code{configure} calls
+@code{configure} scripts in subdirectories, it uses the
+@samp{--cache-file} argument so that they share the same cache.
@xref{Subdirectories}, for information on configuring subdirectories
with the @code{AC_CONFIG_SUBDIRS} macro.
-Giving @samp{--cache-file=/dev/null} disables caching, for debugging
-@code{configure}. @file{config.status} only pays attention to the cache
-file if it is given the @samp{--recheck} option, which makes it rerun
+@file{config.status} only pays attention to the cache file if it is
+given the @samp{--recheck} option, which makes it rerun
@code{configure}. If you are anticipating a long debugging period, you
can also disable cache loading and saving for a @code{configure} script
by redefining the cache macros at the start of @file{configure.in}:
#
# Give Autoconf 2.x generated configure scripts a shared default
# cache file for feature test results, architecture-specific.
-if test "$cache_file" = ./config.cache; then
+if test "$cache_file" = /dev/null; then
cache_file="$prefix/var/config.cache"
# A cache file is only valid for one C compiler.
CC=gcc
package. It may also create one or more @file{.h} files containing
system-dependent definitions. Finally, it creates a shell script
@file{config.status} that you can run in the future to recreate the
-current configuration, a file @file{config.cache} that saves the results
-of its tests to speed up reconfiguring, and a file @file{config.log}
-containing compiler output (useful mainly for debugging
-@code{configure}).
+current configuration, and a file @file{config.log} containing compiler
+output (useful mainly for debugging @code{configure}).
+
+It can also use an optional file (typically called @file{config.cache}
+and enabled with @samp{--cache-file=./config.cache}) that saves the
+results of its tests to speed up reconfiguring. (Caching is disabled by
+default to prevent problems with accidental use of stale cache files.)
If you need to do unusual things to compile the package, please try to
figure out how @code{configure} could check whether to do them, and mail
diffs or instructions to the address given in the @file{README} so they
-can be considered for the next release. If at some point
-@file{config.cache} contains results you don't want to keep, you may
-remove or edit it.
+can be considered for the next release. If you are using the cache, and
+at some point @file{config.cache} contains results you don't want to
+keep, you may remove or edit it.
The file @file{configure.in} is used to create @file{configure} by a
program called @code{autoconf}. You only need @file{configure.in} if
script, and exit.
@item --cache-file=@var{file}
-@cindex Cache, disabling
-Use and save the results of the tests in @var{file} instead of
-@file{./config.cache}. Set @var{file} to @file{/dev/null} to disable
-caching, for debugging @code{configure}.
+@cindex Cache, enabling
+Enable the cache: use and save the results of the tests in @var{file},
+traditionally @file{./config.cache}. @var{file} defaults to
+@file{/dev/null} to disable caching.
@item --quiet
@itemx --silent
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
AC_SUBST(exec_prefix, NONE)dnl
host=NONE
no_create=
-h, --help print this message
-V, --version print the version of autoconf that created configure
-q, --quiet, --silent do not print `checking...' messages
- --cache-file=FILE cache test results in FILE
+ --cache-file=FILE cache test results in FILE [disabled]
-n, --no-create do not create output files
EOF
# -------------
define(AC_CACHE_LOAD,
[if test -r "$cache_file"; then
- echo "loading cache $cache_file"
+ test "x$cache_file" != "x/dev/null" && echo "loading cache $cache_file"
dnl Some versions of bash will fail to source /dev/null, so we
dnl avoid doing that.
test -f "$cache_file" && . $cache_file
esac >>confcache
if cmp -s $cache_file confcache; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"