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:
Phil Burk 2021-01-26 15:25:10 -08:00 committed by GitHub
commit fa525d6199
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 34 deletions

1
.gitignore vendored
View file

@ -17,6 +17,7 @@ lib-stamp
lib/* lib/*
libtool libtool
portaudio-2.0.pc portaudio-2.0.pc
autom4te.cache/*
# Precompiled Headers # Precompiled Headers
*.gch *.gch

BIN
configure vendored

Binary file not shown.

View file

@ -234,41 +234,12 @@ case "${host_os}" in
dnl as there *is* no /Developer, so we use -sdk to check 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 what SDKs are available and to get the full path of
dnl the SDKs. dnl the SDKs.
if xcodebuild -version -sdk macosx10.5 Path >/dev/null 2>&1 ; then if xcrun --sdk macosx10.5 --show-sdk-path >/dev/null 2>&1 ; then
mac_version_min="-mmacosx-version-min=10.3" mac_version_min="-mmacosx-version-min=10.5"
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.5 Path`" mac_sysroot="-isysroot $(xcrun --sdk macosx10.5 --show-sdk-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`"
else 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 fi
esac esac