You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2016/10/17 00:19:48 UTC

svn commit: r1765198 - /openoffice/branches/AOO414/main/configure.in

Author: arielch
Date: Mon Oct 17 00:19:48 2016
New Revision: 1765198

URL: http://svn.apache.org/viewvc?rev=1765198&view=rev
Log:
i127137 - Better macOS SDK detection

Modified:
    openoffice/branches/AOO414/main/configure.in

Modified: openoffice/branches/AOO414/main/configure.in
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO414/main/configure.in?rev=1765198&r1=1765197&r2=1765198&view=diff
==============================================================================
--- openoffice/branches/AOO414/main/configure.in (original)
+++ openoffice/branches/AOO414/main/configure.in Mon Oct 17 00:19:48 2016
@@ -3937,34 +3937,30 @@ dnl ====================================
 dnl Checks for a MacOS platform SDK compatible with an OSX 10.7 deployment target
 dnl ===================================================================
 if test  "$_os" = "Darwin"; then
-   sdk_target=10.7
+   sdk_major=10
+   sdk_minor=7
+   sdk_target="${sdk_major}.${sdk_minor}"
    AC_MSG_CHECKING([checking SDK compatiblity with OSX $sdk_target])
-
-   sdk_minor=`echo $sdk_target | cut -d"." -f2`
-
-   if test "$sdk_minor" -lt "7"; then
-      AC_MSG_ERROR([SDK version < 10.7 is not longer supported])
+   sdk_found=`xcodebuild -showsdks | egrep "sdk macosx10.[[0-9]]+$" | sed -e "s/.*sdk macosx//" | tail -n1`
+   if test -z "$sdk_found"; then
+      AC_MSG_ERROR([No macOS SDK with macosx${sdk_target} compatibility found])
    else
-      MACOSX_DEPLOYMENT_TARGET=$sdk_target
-
-      sdk_found=`xcodebuild -showsdks | egrep "sdk macosx10.(7|8|9|10|11)" | sed -e "s/.*sdk //" | tail -n1`
-      if test -z "$sdk_found"; then
-         AC_MSG_ERROR([No SDK with OSX $sdk_target compatibility found])
+      sdk_found_minor=`echo $sdk_found | cut -d"." -f2`
+      if test "$sdk_found_minor" -lt "$sdk_minor"; then
+          AC_MSG_ERROR([SDK version < $sdk_target is not longer supported])
       else
-         AC_MSG_RESULT([yes, by using SDK $sdk_found])
-      fi
-
-      sdk_path=`xcodebuild -version -sdk ${sdk_found} Path`
-      AC_MSG_CHECKING([for $sdk_path])
-      if test -d "$sdk_path"; then
-         AC_MSG_RESULT([yes])
-      else
-         AC_MSG_ERROR([not found!])
-      fi
-
-      MACOSX_SDK_PATH=$sdk_path
+          MACOSX_DEPLOYMENT_TARGET=$sdk_target
+          AC_MSG_RESULT([yes, by using SDK $sdk_found])
+          sdk_path=`xcodebuild -version -sdk macosx${sdk_found} Path`
+          AC_MSG_CHECKING([for $sdk_path])
+          if test -d "$sdk_path"; then
+            AC_MSG_RESULT([yes])
+          else
+            AC_MSG_ERROR([not found!])
+         fi
+         MACOSX_SDK_PATH=$sdk_path
+     fi
    fi
-
 fi
 AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
 AC_SUBST(MACOSX_SDK_PATH)