From: Phil Burk Date: Tue, 26 Jan 2021 23:25:10 +0000 (-0800) Subject: mac autoconf: support current and future SDKs (#470) X-Git-Tag: v19.7.0~33 X-Git-Url: https://andrewgundersen.net/repos?a=commitdiff_plain;h=fa525d61997f3b62eaf0c14a47d663abe9e1b821;p=portaudio 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. --- diff --git a/.gitignore b/.gitignore index 9b787f9..ed72e3d 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ lib-stamp lib/* libtool portaudio-2.0.pc +autom4te.cache/* # Precompiled Headers *.gch diff --git a/configure b/configure index 34a341b..81c70f9 100755 Binary files a/configure and b/configure differ diff --git a/configure.in b/configure.in index 90a811c..86048bd 100644 --- a/configure.in +++ b/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