]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Autoconf 2.61 workarounds
authorDave Hart <hart@ntp.org>
Mon, 21 Feb 2011 20:50:01 +0000 (20:50 +0000)
committerDave Hart <hart@ntp.org>
Mon, 21 Feb 2011 20:50:01 +0000 (20:50 +0000)
bk: 4d62cff9N43F51j3kpBO8qzZYPlGXg

sntp/m4/ntp_cacheversion.m4
sntp/m4/ntp_libntp.m4

index 3d943bc958a6b38d19e1a26b1a6b62c028535641..85df057d31fd75bb217433cc621073f7f250826c 100644 (file)
@@ -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.]])
index 758ff632862714aaa777d1d40def48bd499188ec..464aacb6c19d65bc866025f19f395b572c2c7c9d 100644 (file)
@@ -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