From: Taylor R Campbell Date: Tue, 21 Oct 2014 21:09:11 +0000 (+0000) Subject: Don't pass `-isysroot -fconstant-cfstrings' if we can't find OS X SDKs. X-Git-Tag: mit-scheme-pucked-9.2.12~376^2~133 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=2416955e75b09403b1f9e36eed07e75d734e0439;p=mit-scheme.git Don't pass `-isysroot -fconstant-cfstrings' if we can't find OS X SDKs. --- diff --git a/src/microcode/configure.ac b/src/microcode/configure.ac index d93351430..c7f4b0b13 100644 --- a/src/microcode/configure.ac +++ b/src/microcode/configure.ac @@ -322,24 +322,25 @@ darwin*) else SDK=MacOSX${MACOSX} fi - MACOSX_SYSROOT= + MACOSX_SDKS= for dir in /Developer/SDKs \ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs do if test -d "${dir}"; then - MACOSX_SYSROOT=${dir} + MACOSX_SDKS=${dir} break fi done - if test -z "${MACOSX_SYSROOT}"; then + if test -z "${MACOSX_SDKS}"; 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 + 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 fi - MACOSX_CFLAGS="${MACOSX_CFLAGS} -isysroot ${MACOSX_SYSROOT}" MACOSX_CFLAGS="${MACOSX_CFLAGS} -fconstant-cfstrings" MACOSX_CFLAGS="${MACOSX_CFLAGS} -DSIGNAL_HANDLERS_CAN_USE_SCHEME_STACK" AC_MSG_NOTICE([Compiling for MacOSX version ${MACOSX}])