Commit 3df41cb6 authored by Felix Paul Kühne's avatar Felix Paul Kühne

contrib: fixed SDK lookup using Xcode 4.2 or later

(cherry picked from commit 6b521aaf)

Conflicts:

	contrib/bootstrap
	contrib/src/main.mak
parent d9f70192
......@@ -144,14 +144,26 @@ add_make_enabled()
check_macosx_sdk()
{
[ -z "${OSX_VERSION}" ] && echo "OSX_VERSION not specified, assuming 10.5" && OSX_VERSION=10.5
SDK="/Developer/SDKs/MacOSX${OSX_VERSION}.sdk"
if [ ! -d "${SDK}" ]
if test -z "$SDKROOT"
then
echo "
*** ${SDK} does not exist, please install required SDK, or use export OSX_VERSION=10.6 ***
"
SDKROOT=`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk
echo "SDKROOT not specified, assuming $SDKROOT"
fi
if [ ! -d "${SDKROOT}" ]
then
SDKROOT_NOT_FOUND=`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk
SDKROOT=`xcode-select -print-path`/SDKs/MacOSX$OSX_VERSION.sdk
echo "SDKROOT not found at $SDKROOT_NOT_FOUND, trying $SDKROOT"
fi
if [ ! -d "${SDKROOT}" ]
then
echo "*** ${SDKROOT} does not exist, please install required SDK, or set SDKROOT manually. ***"
exit 1
fi
add_make "MACOSX_SDK=${SDKROOT}"
add_make "OSX_VERSION ?= ${OSX_VERSION}"
}
......
......@@ -115,8 +115,6 @@ endif
ifdef HAVE_MACOSX
MIN_OSX_VERSION=10.5
MACOSX_SDK=/Developer/SDKs/MacOSX$(OSX_VERSION).sdk
PATH :=$(abspath ../../extras/tools/build/bin):$(abspath ../$(BUILD)/bin):$(PATH)
CC=gcc-4.2
CXX=g++-4.2
AR=ar
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment