From: Chris Hanson Date: Thu, 21 Dec 2017 06:17:13 +0000 (-0800) Subject: Handle case where XCode SDK doesn't match running OS. X-Git-Tag: mit-scheme-pucked-x11-0.3.1~7^2~430 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=ddc7bbb07c084d4f2e1dc15f12f872aaa9ef2347;p=mit-scheme.git Handle case where XCode SDK doesn't match running OS. --- diff --git a/src/microcode/configure.ac b/src/microcode/configure.ac index feb26f8b5..ba56c05f2 100644 --- a/src/microcode/configure.ac +++ b/src/microcode/configure.ac @@ -324,12 +324,17 @@ darwin*) if test -z "${MACOSX_SDKS}"; then AC_MSG_WARN([Can't find SDKs directory, not checking for SDK]) else - MACOSX_SYSROOT=${MACOSX_SDKS}/${SDK}.sdk - if test -d "${MACOSX_SYSROOT}"; then - MACOSX_CFLAGS="${MACOSX_CFLAGS} -isysroot ${MACOSX_SYSROOT}" - else - AC_MSG_ERROR([No MacOSX SDK for version: ${MACOSX}]) - fi + MACOSX_SYSROOT= + for sysroot in ${MACOSX_SDKS}/${SDK}.sdk ${MACOSX_SDKS}/MacOSX.sdk; do + if test -d "${sysroot}"; then + MACOSX_SYSROOT=${sysroot} + MACOSX_CFLAGS="${MACOSX_CFLAGS} -isysroot ${sysroot}" + break + fi + done + if test -z "${MACOSX_SYSROOT}"; then + AC_MSG_ERROR([No MacOSX SDK for version: ${MACOSX}]) + fi fi MACOSX_CFLAGS="${MACOSX_CFLAGS} -fconstant-cfstrings" MACOSX_CFLAGS="${MACOSX_CFLAGS} -DSIGNAL_HANDLERS_CAN_USE_SCHEME_STACK"