From e1184eaa8d7bd8a6ce313c51ec050ba506c2f425 Mon Sep 17 00:00:00 2001 From: Dave Hart Date: Sat, 2 May 2009 08:37:14 +0000 Subject: [PATCH] do not clear config.cache immediately after it is created empty bk: 49fc063asFcB1Zs66GeMAEZ_xXzePA --- ChangeLog | 1 + m4/ntp_cacheversion.m4 | 25 +++++++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b6ac2cf9..cdbf23096 100644 --- 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. diff --git a/m4/ntp_cacheversion.m4 b/m4/ntp_cacheversion.m4 index 18a9aa6ee..cbca51c9d 100644 --- a/m4/ntp_cacheversion.m4 +++ b/m4/ntp_cacheversion.m4 @@ -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]]) -- 2.47.3