From fe161a03ec3ed0489e1fb1baef58711a9d0dabff Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 11 Nov 2012 21:54:19 -0800 Subject: [PATCH] Support new location of Xcode 4.3 and later; just warn if can't find SDKs directory. --- src/microcode/achost.ac | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/microcode/achost.ac b/src/microcode/achost.ac index f8b0d04dc..10038b7cc 100644 --- a/src/microcode/achost.ac +++ b/src/microcode/achost.ac @@ -143,9 +143,22 @@ darwin*) else SDK=MacOSX${MACOSX} fi - MACOSX_SYSROOT=/Developer/SDKs/${SDK}.sdk - if test ! -d "${MACOSX_SYSROOT}"; then - AC_MSG_ERROR([No MacOSX SDK for version: ${MACOSX}]) + MACOSX_SYSROOT= + for dir in /Developer/SDKs \ + /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs + do + if test -d "${dir}"; then + MACOSX_SYSROOT=${dir} + break + fi + done + if test -z "${MACOSX_SYSROOT}"; then + AC_MSG_WARN([Can't find SDKs directory, not checking for SDK]) + else + MACOSX_SYSROOT=${MACOSX_SYSROOT}/${SDK}.sdk + if test ! -d "${MACOSX_SYSROOT}"; then + AC_MSG_ERROR([No MacOSX SDK for version: ${MACOSX}]) + fi fi MACOSX_CFLAGS="${MACOSX_CFLAGS} -isysroot ${MACOSX_SYSROOT}" MACOSX_CFLAGS="${MACOSX_CFLAGS} -fconstant-cfstrings" -- 2.25.1