Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mac autoconf: support current and future SDKs #470

Merged
merged 3 commits into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ lib-stamp
lib/*
libtool
portaudio-2.0.pc
autom4te.cache/*

# Precompiled Headers
*.gch
Expand Down
39 changes: 5 additions & 34 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -15851,41 +15851,12 @@ case "${host_os}" in
;;

*)
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"
philburk marked this conversation as resolved.
Show resolved Hide resolved
mac_sysroot="-isysroot $(xcrun --sdk macosx10.5 --show-sdk-path)"
else
as_fn_error $? "Could not find 10.5 to 10.13 SDK." "$LINENO" 5
mac_version_min="-mmacosx-version-min=10.6"
mac_sysroot="-isysroot $(xcrun --sdk macosx --show-sdk-path)"
fi
esac

Expand Down
39 changes: 5 additions & 34 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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"
philburk marked this conversation as resolved.
Show resolved Hide resolved
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

Expand Down