]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
check against OX X 10.9.* with Availability.h [#3473]
authorFrancis Dupont <fdupont@isc.org>
Thu, 10 Jul 2014 15:13:15 +0000 (17:13 +0200)
committerFrancis Dupont <fdupont@isc.org>
Thu, 10 Jul 2014 15:13:15 +0000 (17:13 +0200)
ChangeLog
configure.ac

index 55c87f55208b74de634b76e3b60e0338a279ca14..edd250220414ee86cdc416bb0b3934fdec754103 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+801.   [build]         fdupont
+       Detect all OS X versions more recent than 10.9 (where
+       pthread_cond_destroy() doesn't work as documented,
+       which makes some of unit tests to fail).
+       (Trac #3473, git xxx)
+
 800.   [bug]           marcin
        DHCPv6 server is now usable on FreeBSD, NetBSD and OpenBSD systems.
         It can receive messages sent to ff02::1:2 multicast address. Also,
index 46163bf47b526e6229a1e48eec81d175480f4353..d166e3d03edda222faf1c00f1b491529512a430c 100644 (file)
@@ -238,19 +238,19 @@ case "$host" in
 
        # In OS X 10.9 (and possibly any future versions?) pthread_cond_destroy
        # doesn't work as documented, which makes some of unit tests fail.
-       # Testing a specific system and version is not a good practice, but
-       # identifying this behavior would be too heavy (running a program
-       # with multiple threads), so this is a compromise.  In general,
-       # it should be avoided to rely on 'osx_version' unless there's no
-       # viable alternative.
-       osx_version=`/usr/bin/sw_vers -productVersion`
-
-       if [ test $osx_version = "10.9" \
-        -o $osx_version = "10.9.1" \
-        -o $osx_version = "10.9.2" \
-        -o $osx_version = "10.9.3" ]; then
-           bind10_undefined_pthread_behavior=yes
-    fi
+        AC_TRY_RUN([
+       #include <Availability.h>
+       int main(void)
+       {
+       #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
+       #if __MAC_OS_X_VERSION_MIN_REQUIRED < 1090
+       return 1;
+       #else
+       return 0;
+       #endif
+       #endif
+       return 1;
+       }],[bind10_undefined_pthread_behavior=yes],[],[])
 
        # libtool doesn't work perfectly with Darwin: libtool embeds the
        # final install path in dynamic libraries and our loadable python