You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ji...@apache.org on 2020/12/04 12:28:59 UTC

[openoffice] branch trunk updated: Allow user to specify specific macOS SDK to use (an interesting note: Firefox baselines 10.11 for their CI)

This is an automated email from the ASF dual-hosted git repository.

jim pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 6c994c9  Allow user to specify specific macOS SDK to use (an interesting note: Firefox baselines 10.11 for their CI)
6c994c9 is described below

commit 6c994c9dd9c662add766d8f4b37491bda989c155
Author: Jim Jagielski <ji...@gmail.com>
AuthorDate: Fri Dec 4 07:26:36 2020 -0500

    Allow user to specify specific macOS SDK to use
    (an interesting note: Firefox baselines 10.11 for their CI)
    
    (cherry picked from commit a835cb2e386eac81959111e98cfd90ace4427cca)
---
 main/configure.ac | 48 ++++++++++++++++++++++++++++++++----------------
 1 file changed, 32 insertions(+), 16 deletions(-)

diff --git a/main/configure.ac b/main/configure.ac
index 32e8cfd..ac50bf6 100644
--- a/main/configure.ac
+++ b/main/configure.ac
@@ -933,6 +933,12 @@ AC_ARG_WITH(macosx-target,
 
                               Usage: --with-macosx-target=10.7
 ],with_macosx_target=$withval,with_macosx_target=10.7)
+AC_ARG_WITH(macosx-sdk,
+[  --macosx-sdk            The macOS SDK to build against
+
+                              Usage: --with-macosx-sdk=10.11
+                              (or full path: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk)
+],with_macosx_sdk=$withval,)
 AC_ARG_WITH(rat-scan,
 [  --with-rat-scan         Scan source code for license headers.
                           Use as --with-rat-scan to automatically download pre-built Rat binaries.
@@ -1152,7 +1158,7 @@ case "$build_os" in
 		   CC="`xcrun -f clang` -arch x86_64"
 		fi
 		if test ! -n "$CXX"; then
-		   CXX="`xcrun -f clang++` -stdlib=libc++ -arch x86_64"
+		   CXX="`xcrun -f clang++` -arch x86_64"
 		fi
 		# Don't use OSVERSION until we know no conflicts result from it
 		_darwin_version="`uname -r | $AWK -F . '{ print $1 }'`"
@@ -3875,7 +3881,7 @@ AC_SUBST(LIBXML_LIBS)
 
 
 dnl ===================================================================
-dnl Checks for a MacOS platform SDK compatible with an OSX 10.7 deployment target
+dnl Checks for a MacOS platform SDK compatible with deployment target
 dnl ===================================================================
 if test  "$_os" = "Darwin"; then
    sdk_target=$with_macosx_target
@@ -3887,21 +3893,31 @@ if test  "$_os" = "Darwin"; then
       AC_MSG_ERROR([SDK version < 10.7 is not longer supported])
    else
       MACOSX_DEPLOYMENT_TARGET=$sdk_target
-
-      dnl Why not MacOSX10.9.sdk? It lacks Python.h (!?)
-      dnl First look for macOS10.x SDKs (Up thru Xcode 12.1)
-      sdk_found=`xcodebuild -showsdks | $EGREP "sdk macosx10.(7|8|10|11|12|13|14|15)" | sed -e "s/.*sdk //" | tail -n1`
-      dnl If not found, look for macOS11.x SDKs (Xcode 12.2 and later)
-      if test -z "$sdk_found"; then
-         sdk_found=`xcodebuild -showsdks | $EGREP "sdk macosx11.(0)" | sed -e "s/.*sdk //" | tail -n1`
-      fi
-      if test -z "$sdk_found"; then
-         AC_MSG_ERROR([No SDK with OSX $sdk_target compatibility found])
-      else
-         AC_MSG_RESULT([yes, by using SDK $sdk_found])
+      sdk_path=$with_macosx_sdk
+      if test -z "$sdk_path"; then
+          dnl --macosx-sdk not used (or blank): We look for the SDK
+          dnl Why not MacOSX10.9.sdk? It lacks Python.h (!?)
+          dnl First look for macOS10.x SDKs (Up thru Xcode 12.1)
+          sdk_found=`xcodebuild -showsdks | $EGREP "sdk macosx10.(7|8|10|11|12|13|14|15)" | sed -e "s/.*sdk //" | tail -n1`
+          dnl If not found, look for macOS11.x SDKs (Xcode 12.2 and later)
+          if test -z "$sdk_found"; then
+             sdk_found=`xcodebuild -showsdks | $EGREP "sdk macosx11.(0)" | sed -e "s/.*sdk //" | tail -n1`
+          fi
+          if test -z "$sdk_found"; then
+             AC_MSG_ERROR([No SDK with OSX $sdk_target compatibility found])
+          else
+             AC_MSG_RESULT([yes, by using SDK $sdk_found])
+          fi
+          sdk_path=`xcodebuild -version -sdk ${sdk_found} Path`
+      elif test ! -d "$sdk_path"; then
+          sdk_found=`xcodebuild -showsdks | $EGREP "sdk macosx${sdk_path}" | sed -e "s/.*sdk //" | tail -n1`
+          if test -z "$sdk_found"; then
+             AC_MSG_ERROR([SDK macosx${sdk_path} not found by xcodebuild])
+          else
+             AC_MSG_RESULT([SDK $sdk_found])
+          fi
+          sdk_path=`xcodebuild -version -sdk ${sdk_found} Path`
       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])