]> Repos - portaudio/commitdiff
mac autoconf: support current and future SDKs (#470)
authorPhil Burk <philburk@mobileer.com>
Tue, 26 Jan 2021 23:25:10 +0000 (15:25 -0800)
committerGitHub <noreply@github.com>
Tue, 26 Jan 2021 23:25:10 +0000 (15:25 -0800)
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.

.gitignore
configure
configure.in

index 9b787f94521386038120824a21f62cf8d3bd441d..ed72e3d589db8d3a7df69962caa220b8ae2fad16 100644 (file)
@@ -17,6 +17,7 @@ lib-stamp
 lib/*
 libtool
 portaudio-2.0.pc
+autom4te.cache/*
 
 # Precompiled Headers
 *.gch
index 34a341bdd51bb1616ed8d3eb63ae12868f780726..81c70f92476227dc2e9c9fdaf7b0c6847f6a678e 100755 (executable)
Binary files a/configure and b/configure differ
index 90a811cc8848392da9064081cf628bb60c630a02..86048bdccf74b1e5873367ed2332789ca18a4357 100644 (file)
@@ -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