macosx: locate the best newest SDK present on the computer.
With recent versions of XCode, PC/SC headers are hidden inside the SDK folder inside XCode app, and the global path is not guaranteed to be present. This allows to build easily from source without depending on a specific XCode/OSX version.
This commit is contained in:
parent
8ed4db76c8
commit
1145bed320
|
@ -530,7 +530,11 @@ if test "${enable_pcsc}" = "yes"; then
|
||||||
if test -z "${PCSC_CFLAGS}"; then
|
if test -z "${PCSC_CFLAGS}"; then
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
*-*-darwin*)
|
*-*-darwin*)
|
||||||
PCSC_CFLAGS="-I/System/Library/Frameworks/PCSC.framework/Headers"
|
# Locate the latest SDK.
|
||||||
|
SDKS_PATH="$(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs"
|
||||||
|
SDK_PATH="${SDK_PATH:-$SDKS_PATH/$(ls -1 ${SDKS_PATH} | sort -n -t. -k2 -r | head -1)}"
|
||||||
|
# and set the PC/SC include path
|
||||||
|
PCSC_CFLAGS="-I$SDK_PATH/System/Library/Frameworks/PCSC.framework/Versions/Current/Headers"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
PCSC_CFLAGS="-I/usr/include/PCSC"
|
PCSC_CFLAGS="-I/usr/include/PCSC"
|
||||||
|
|
Loading…
Reference in New Issue