mac autoconf: support current and future SDKs (#470)
Improve the way we generate the path to the SDK so that it it not tied to specific Mac versions. Also changed macosx-version-min to 10.6 Fixes #378 Fixes #468 Use xcrun instead of xcodebuild Note that "configure" was generated using autoconf on Linux.
This commit is contained in:
parent
68e1c5685b
commit
fa525d6199
|
@ -17,6 +17,7 @@ lib-stamp
|
|||
lib/*
|
||||
libtool
|
||||
portaudio-2.0.pc
|
||||
autom4te.cache/*
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
|
|
39
configure.in
39
configure.in
|
@ -234,41 +234,12 @@ case "${host_os}" in
|
|||
dnl as there *is* no /Developer, so we use -sdk to check
|
||||
dnl what SDKs are available and to get the full path of
|
||||
dnl the SDKs.
|
||||
if xcodebuild -version -sdk macosx10.5 Path >/dev/null 2>&1 ; then
|
||||
mac_version_min="-mmacosx-version-min=10.3"
|
||||
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.5 Path`"
|
||||
elif xcodebuild -version -sdk macosx10.6 Path >/dev/null 2>&1 ; then
|
||||
mac_version_min="-mmacosx-version-min=10.4"
|
||||
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.6 Path`"
|
||||
elif xcodebuild -version -sdk macosx10.7 Path >/dev/null 2>&1 ; then
|
||||
mac_version_min="-mmacosx-version-min=10.4"
|
||||
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.7 Path`"
|
||||
elif xcodebuild -version -sdk macosx10.8 Path >/dev/null 2>&1 ; then
|
||||
mac_version_min="-mmacosx-version-min=10.4"
|
||||
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.8 Path`"
|
||||
elif xcodebuild -version -sdk macosx10.9 Path >/dev/null 2>&1 ; then
|
||||
mac_version_min="-mmacosx-version-min=10.4"
|
||||
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.9 Path`"
|
||||
elif xcodebuild -version -sdk macosx10.10 Path >/dev/null 2>&1 ; then
|
||||
mac_version_min="-mmacosx-version-min=10.4"
|
||||
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.10 Path`"
|
||||
elif xcodebuild -version -sdk macosx10.11 Path >/dev/null 2>&1 ; then
|
||||
mac_version_min="-mmacosx-version-min=10.4"
|
||||
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.11 Path`"
|
||||
elif xcodebuild -version -sdk macosx10.12 Path >/dev/null 2>&1 ; then
|
||||
mac_version_min="-mmacosx-version-min=10.4"
|
||||
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.12 Path`"
|
||||
elif xcodebuild -version -sdk macosx10.13 Path >/dev/null 2>&1 ; then
|
||||
mac_version_min="-mmacosx-version-min=10.4"
|
||||
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.13 Path`"
|
||||
elif xcodebuild -version -sdk macosx10.14 Path >/dev/null 2>&1 ; then
|
||||
mac_version_min="-mmacosx-version-min=10.4"
|
||||
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.14 Path`"
|
||||
elif xcodebuild -version -sdk macosx10.15 Path >/dev/null 2>&1 ; then
|
||||
mac_version_min="-mmacosx-version-min=10.4"
|
||||
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.15 Path`"
|
||||
if xcrun --sdk macosx10.5 --show-sdk-path >/dev/null 2>&1 ; then
|
||||
mac_version_min="-mmacosx-version-min=10.5"
|
||||
mac_sysroot="-isysroot $(xcrun --sdk macosx10.5 --show-sdk-path)"
|
||||
else
|
||||
AC_MSG_ERROR([Could not find 10.5 to 10.13 SDK.])
|
||||
mac_version_min="-mmacosx-version-min=10.6"
|
||||
mac_sysroot="-isysroot $(xcrun --sdk macosx --show-sdk-path)"
|
||||
fi
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in New Issue