Don't pass `-isysroot -fconstant-cfstrings' if we can't find OS X SDKs.
authorTaylor R Campbell <campbell@mumble.net>
Tue, 21 Oct 2014 21:09:11 +0000 (21:09 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Wed, 22 Oct 2014 00:19:47 +0000 (00:19 +0000)
src/microcode/configure.ac

index d93351430defd0e57d0aa2211e5426789c8736a2..c7f4b0b13d3d914c22e044d5346bcfa279bb884e 100644 (file)
@@ -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}])