]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
do not clear config.cache immediately after it is created empty
authorDave Hart <hart@ntp.org>
Sat, 2 May 2009 08:37:14 +0000 (08:37 +0000)
committerDave Hart <hart@ntp.org>
Sat, 2 May 2009 08:37:14 +0000 (08:37 +0000)
bk: 49fc063asFcB1Zs66GeMAEZ_xXzePA

ChangeLog
m4/ntp_cacheversion.m4

index 5b6ac2cf98371ea4e64b5b69c362e116ae8303cf..cdbf23096ee260ec72f9b5ea93cab8567e242d23 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+* do not clear config.cache when it is already empty
 * loopfilter FLL/PLL crossover cleanup from Dave Mills.
 * Documentation updates from Dave Mills.
 * ntp-keygen cleanup from Dave Mills.
index 18a9aa6eee35dee7ed157166f6a1fbc9ce64e2eb..cbca51c9d4324e7359dcba9e496df2728b309786 100644 (file)
@@ -43,6 +43,19 @@ AC_DEFUN_ONCE([NTP_CACHEVERSION], [
            ;;
         /dev/null)
            ntp_cache_flush=0
+           ;;
+        *)
+           # This appears to be the top-level configure file.
+           # Do not clear the cache immediately after it is created
+           # empty as it is noisy.  Differentiate a newly-created 
+           # config.cache from one predating the cache version 
+           # mechanism by looking for the first cached variable set 
+           # by Autoconf
+           case "$ac_cv_path_install" in
+            '')
+               # presumably empty config.cache file
+               ntp_cache_flush=0
+           esac
        esac
        ;;
      *)
@@ -54,19 +67,19 @@ AC_DEFUN_ONCE([NTP_CACHEVERSION], [
        # ntp_cv_*_cache_version vars.
        
        c_varname_list=`set |
-                       sed 's/=.*$//' |
-                       grep -F _cv_ | 
-                       grep -v 'ntp_cv_.*_cache_version'
+                       sed -n -e 's/=.*$//' \
+                              -e '/ntp_cv_.*_cache_version/d' \
+                              -e '/_cv_/p'
                       `
        for c_varname in $c_varname_list
        do
            dnl use AS_UNSET([$c_varname]) eventually
-           eval ${c_varname}=; 
-           $as_unset $c_varname
+           eval ${c_varname}=;  $as_unset $c_varname
+           AC_MSG_NOTICE([cleared env var $c_varname])
        done
        
        dnl use AS_UNSET([c_varname_list c_varname]) eventually
-       c_varname_list=; $as_unset c_varname_list c_varname
+       c_varname_list=;  $as_unset c_varname_list c_varname
        
        AC_MSG_NOTICE([$cache_file saved by another version, ignored.])
        AC_MSG_NOTICE([configure script cache version: [$2]])