From eb68816377b1cde5ed6ba7673030a72b45035cdc Mon Sep 17 00:00:00 2001 From: Dave Hart Date: Mon, 21 Feb 2011 20:50:01 +0000 Subject: [PATCH] Autoconf 2.61 workarounds bk: 4d62cff9N43F51j3kpBO8qzZYPlGXg --- sntp/m4/ntp_cacheversion.m4 | 9 ++++++++- sntp/m4/ntp_libntp.m4 | 25 ++++++++++++------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/sntp/m4/ntp_cacheversion.m4 b/sntp/m4/ntp_cacheversion.m4 index 3d943bc95..85df057d3 100644 --- a/sntp/m4/ntp_cacheversion.m4 +++ b/sntp/m4/ntp_cacheversion.m4 @@ -59,11 +59,13 @@ AC_DEFUN_ONCE([NTP_CACHEVERSION], [ # Parent configure just created cache from empty, # flushing would be counterproductive. ntp_cache_flush=0; + ;; esac esac ;; *) # configure cache version mismatches config.cache version + ;; esac case "$ntp_cache_flush" in @@ -100,7 +102,12 @@ AC_DEFUN_ONCE([NTP_CACHEVERSION], [ for c_varname in $c_varname_list do - AS_UNSET([$c_varname]) + dnl AS_UNSET([$c_varname]) + dnl With Autoconf 2.61 and automake 1.10.3, using AS_UNSET + dnl here triggers generation of a syntax error in configure. + dnl Once we require a newer Autoconf we can revert to the + dnl AS_UNSET code. + { eval $c_varname=; unset $c_varname; } done AC_MSG_NOTICE([[$cache_file saved by another version, ignored.]]) diff --git a/sntp/m4/ntp_libntp.m4 b/sntp/m4/ntp_libntp.m4 index 758ff6328..464aacb6c 100644 --- a/sntp/m4/ntp_libntp.m4 +++ b/sntp/m4/ntp_libntp.m4 @@ -357,8 +357,7 @@ case "$have_pthreads" in AC_CHECK_LIB( [c_r], [sigwait], - [have_sigwait=yes], - [] + [have_sigwait=yes] ) esac case "$have_sigwait" in @@ -385,12 +384,12 @@ case "$have_pthreads" in ;; *-solaris*) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS], [1]) - AC_CHECK_FUNC( - [pthread_setconcurrency], - [AC_DEFINE([CALL_PTHREAD_SETCONCURRENCY], [1], - [why not HAVE_P_S?])], - [] - ) + AC_CHECK_FUNCS([pthread_setconcurrency]) + case "$ac_cv_func_pthread_setconcurrency" in + yes) + AC_DEFINE([CALL_PTHREAD_SETCONCURRENCY], [1], + [why not HAVE_P_S?]) + esac ;; *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*) AC_DEFINE([HAVE_UNIXWARE_SIGWAIT], [1], [deviant sigwait?]) @@ -407,7 +406,7 @@ case "$have_pthreads" in *-solaris2.1[[0-9]]) AC_CACHE_CHECK( [if extra braces are needed for PTHREAD_ONCE_INIT], - [ntp_cv_brace_pthread_once_init], + [ntp_cv_braces_around_pthread_once_init], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ @@ -415,14 +414,14 @@ case "$have_pthreads" in ]], [[ static pthread_once_t once_test = - { PTHREAD_ONCE_INIT }; + PTHREAD_ONCE_INIT; ]] )], - [ntp_cv_brace_pthread_once_init=yes], - [ntp_cv_brace_pthread_once_init=no] + [ntp_cv_braces_around_pthread_once_init=no], + [ntp_cv_braces_around_pthread_once_init=yes] )] ) - case "$ntp_cv_brace_pthread_once_init" in + case "$ntp_cv_braces_around_pthread_once_init" in yes) hack_shutup_pthreadonceinit=yes esac -- 2.47.3