summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Toorop <willem@nlnetlabs.nl>2019-03-12 16:53:49 +0100
committerWillem Toorop <willem@nlnetlabs.nl>2019-03-12 16:53:49 +0100
commit60735b51fd473c03009d5dbd9c6e2c74670be7c7 (patch)
tree57a03ffa2d7608dd4ae58ac562f0e231d4b20721
parentc5fcd8ab8ee1b66d0ef75b02f72ccfc3ebf50cf5 (diff)
downloadldns-60735b51fd473c03009d5dbd9c6e2c74670be7c7.tar.gz
bugfix #4106: find the SDK on MacOS X <= 10.6
-rw-r--r--configure.ac8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index b4014425..9368c370 100644
--- a/configure.ac
+++ b/configure.ac
@@ -855,12 +855,18 @@ ACX_CHECK_UNUSED_ATTRIBUTE
if echo $build_os | grep darwin > /dev/null; then
sdk_p=`xcode-select -print-path`;
sdk_v="$( /usr/bin/xcrun --show-sdk-version )";
+ # xcrun only got that option in 10.7
+ if test -z "$sdk_v" ; then
+ sdk_c="10.6"
+ sdk_v="10.6"
+ fi
+ SYSROOT="$( find ${sdk_p} -name MacOSX${sdk_v}.sdk )"
case $sdk_v in
10.9|10.8) sdk_c="10.7";;
10.11|10.10|*) sdk_c="10.10";;
esac
export MACOSX_DEPLOYMENT_TARGET="${sdk_c}";
- export CFLAGS="$CFLAGS -mmacosx-version-min=${sdk_c} -isysroot ${sdk_p}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${sdk_v}.sdk";
+ export CFLAGS="$CFLAGS -mmacosx-version-min=${sdk_c} -isysroot ${SYSROOT}"
fi
AC_DEFINE([SYSCONFDIR], [sysconfdir], [System configuration dir])