From ddc7bbb07c084d4f2e1dc15f12f872aaa9ef2347 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 20 Dec 2017 22:17:13 -0800 Subject: [PATCH] Handle case where XCode SDK doesn't match running OS. --- src/microcode/configure.ac | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) 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" -- 2.25.1