]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4 (AC_CACHE_LOAD): Be ready to read the cache even
authorAkim Demaille <akim@epita.fr>
Tue, 4 Jul 2000 10:34:21 +0000 (10:34 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 4 Jul 2000 10:34:21 +0000 (10:34 +0000)
when `.' is not in the PATH.
* doc/install.texi (configure Invocation): Adjust.

ChangeLog
acgeneral.m4
doc/autoconf.texi
doc/install.texi
lib/autoconf/general.m4

index d9ef60eed918ac5d2cc35161a87149fbca4f5c19..3c008f9e04d3f24c307e2a423d49d11ccb06da57 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
-2000-07-03  Akim Demaille  <akim@epita.fr>
+2000-07-04  Akim Demaille  <akim@epita.fr>
 
-       * acgeneral.m4 (_AC_INIT_PARSE_ARGS) <-C>: Use `./config.cache', not
-       `config.cache'.
+       * acgeneral.m4 (AC_CACHE_LOAD): Be ready to read the cache even
+       when `.' is not in the PATH.
        * doc/install.texi (configure Invocation): Adjust.
 
 2000-06-30  Jim Meyering  <meyering@lucent.com>
index 2c1efec132e01eb9e42c6b3e054019bf20e0cc00..068da2c67da156ba3f85508397be5d51ac503a78 100644 (file)
@@ -1280,7 +1280,7 @@ do
     cache_file=$ac_optarg ;;
 
   --config-cache | -C)
-    cache_file=./config.cache ;;
+    cache_file=config.cache ;;
 
   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
     ac_prev=datadir ;;
@@ -1612,7 +1612,7 @@ Configuration:
   -V, --version           display version information and exit
   -q, --quiet, --silent   do not print \`checking...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=./config.cache'
+  -C, --config-cache      alias for \`--cache-file=config.cache'
   -n, --no-create         do not create output files
       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
 
@@ -2254,10 +2254,15 @@ done
 # -------------
 define([AC_CACHE_LOAD],
 [if test -r "$cache_file"; then
-  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
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    echo "loading cache $cache_file"
+    case $cache_file in
+      [[\\/]]* | ?:[[\\/]]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
 else
   echo "creating cache $cache_file"
   >$cache_file
@@ -2304,7 +2309,7 @@ define([AC_CACHE_SAVE],
 # scripts and configure runs.  It is not useful on other systems.
 # If it contains results you don't want to keep, you may remove or edit it.
 #
-# By default, configure uses ./config.cache as the cache file,
+# By default, configure uses `config.cache' as the cache file,
 # creating it if it does not exist already.  You can give configure
 # the --cache-file=FILE option to use a different cache file; that is
 # what configure does when it calls configure scripts in
index 6bc99ec0ac7dabb970a032d56d59f8056f697d30..178193335a5095831db281faa1c210ae888113a5 100644 (file)
@@ -461,7 +461,7 @@ the files listed above (@pxref{config.status Invocation});
 
 @item
 an optional shell script normally called called @file{config.cache}
-(created when using @samp{configure --cache-file=./config.cache}) that
+(created when using @samp{configure --cache-file=config.cache}) that
 saves the results of running many of the tests (@pxref{Cache Files});
 
 @item
@@ -5587,8 +5587,8 @@ By default, configure uses no cache file (technically, it uses
 accidental use of stale cache files.
 
 To enable caching, @code{configure} accepts
-@option{--cache-file=@var{file}} where @var{file} is the name of the cache
-file to use, traditionally @file{./config.cache}.  The cache file is
+@option{--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
 @option{--cache-file} argument so that they share the same cache.
index 1847f6669d458a1c34780bc47bdbd57f9d547c88..e3acec1f9e28b819a38ce254c4ae9e473d73b030 100644 (file)
@@ -16,7 +16,7 @@ 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 @option{--cache-file=./config.cache} or simply
+and enabled with @option{--cache-file=config.cache} or simply
 @option{-C}) 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.)
@@ -234,12 +234,12 @@ script, and exit.
 @item --cache-file=@var{file}
 @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
+traditionally @file{config.cache}.  @var{file} defaults to
 @file{/dev/null} to disable caching.
 
 @item --config-cache
 @itemx -C
-Alias for @option{--cache-file=./config.cache}.
+Alias for @option{--cache-file=config.cache}.
 
 @item --quiet
 @itemx --silent
index 2c1efec132e01eb9e42c6b3e054019bf20e0cc00..068da2c67da156ba3f85508397be5d51ac503a78 100644 (file)
@@ -1280,7 +1280,7 @@ do
     cache_file=$ac_optarg ;;
 
   --config-cache | -C)
-    cache_file=./config.cache ;;
+    cache_file=config.cache ;;
 
   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
     ac_prev=datadir ;;
@@ -1612,7 +1612,7 @@ Configuration:
   -V, --version           display version information and exit
   -q, --quiet, --silent   do not print \`checking...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=./config.cache'
+  -C, --config-cache      alias for \`--cache-file=config.cache'
   -n, --no-create         do not create output files
       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
 
@@ -2254,10 +2254,15 @@ done
 # -------------
 define([AC_CACHE_LOAD],
 [if test -r "$cache_file"; then
-  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
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    echo "loading cache $cache_file"
+    case $cache_file in
+      [[\\/]]* | ?:[[\\/]]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
 else
   echo "creating cache $cache_file"
   >$cache_file
@@ -2304,7 +2309,7 @@ define([AC_CACHE_SAVE],
 # scripts and configure runs.  It is not useful on other systems.
 # If it contains results you don't want to keep, you may remove or edit it.
 #
-# By default, configure uses ./config.cache as the cache file,
+# By default, configure uses `config.cache' as the cache file,
 # creating it if it does not exist already.  You can give configure
 # the --cache-file=FILE option to use a different cache file; that is
 # what configure does when it calls configure scripts in