From: Chris Hanson Date: Mon, 12 Nov 2012 05:54:19 +0000 (-0800) Subject: Support new location of Xcode 4.3 and later; just warn if can't find SDKs directory. X-Git-Tag: release-9.2.0~210 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=fe161a03ec3ed0489e1fb1baef58711a9d0dabff;p=mit-scheme.git Support new location of Xcode 4.3 and later; just warn if can't find SDKs directory. --- 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"