From: Todd C. Miller Date: Wed, 5 Mar 2014 21:30:59 +0000 (-0700) Subject: Update Mac SDK paths. X-Git-Tag: SUDO_1_7_10p9~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a27fb303ad2cb69223593bed204803c86d381254;p=sudo Update Mac SDK paths. --HG-- branch : 1.7 --- diff --git a/mkpkg b/mkpkg index 95be6a2d0..a40d02714 100755 --- a/mkpkg +++ b/mkpkg @@ -210,7 +210,14 @@ case "$osversion" in esac if test "${osversion}" != "`$top_srcdir/pp --probe`"; then sdkvers=`echo "${osversion}" | sed 's/^macos\([0-9][0-9]\)\([0-9]*\)-.*$/\1.\2/'` - SDK_FLAGS="-isysroot /Developer/SDKs/MacOSX${sdkvers}.sdk -mmacosx-version-min=${sdkvers}" + # Newer Xcode puts /Developer under the app Contents dir. + SDK_DIR="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" + if test -d "${SDK_DIR}/MacOSX${sdkvers}.sdk"; then + SDK_DIR="${SDK_DIR}/MacOSX${sdkvers}.sdk" + elif test -d "/Developer/SDKs/MacOSX${sdkvers}.sdk"; then + SDK_DIR="/Developer/SDKs/MacOSX${sdkvers}.sdk" + fi + SDK_FLAGS="-isysroot ${SDK_DIR} -mmacosx-version-min=${sdkvers}" fi export CFLAGS="-O2 -g $ARCH_FLAGS $SDK_FLAGS" export LDFLAGS="$ARCH_FLAGS $SDK_FLAGS"