Author: jsc
Date: Tue Jan 21 10:37:15 2014
New Revision: 1559967

URL: http://svn.apache.org/r1559967
Log:
#114728# use 10.7 SDK as default, but allow newer SDK in configure

Modified:
    openoffice/branches/rejuvenate01/main/configure.in
    openoffice/branches/rejuvenate01/main/set_soenv.in
    openoffice/branches/rejuvenate01/main/solenv/gbuild/platform/macosx.mk
    openoffice/branches/rejuvenate01/main/solenv/inc/unxmacc.mk
    openoffice/branches/rejuvenate01/main/solenv/inc/unxmacx.mk

Modified: openoffice/branches/rejuvenate01/main/configure.in
URL: 
http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/configure.in?rev=1559967&r1=1559966&r2=1559967&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/configure.in (original)
+++ openoffice/branches/rejuvenate01/main/configure.in Tue Jan 21 10:37:15 2014
@@ -34,7 +34,7 @@ AC_ARG_WITH(dmake-url,
 ])
 AC_ARG_WITH(packager-list,
 [  --with-packager-list=<PATH TO PACK LIST>   Specify a file to drive the 
packaging process.
-                          The file must follow the format explained in
+                         The file must follow the format explained in
                           instsetoo_native/util/pack.lst
 ],,)
 AC_ARG_WITH(gnu-patch,
@@ -937,6 +937,10 @@ AC_ARG_WITH(rat-scan,
                           a separately installed library.
 ],with_rat_scan=$withval,)
 
+AC_ARG_WITH(macosx-sdk-version,
+[  --with-macosx-sdk-version=<version>   Specify the MacOSX platform SDK 
version, default is 10.7. Only 10.7 or higher is supported.
+],,)
+
 BUILD_TYPE="OOo"
 ADDITIONAL_REPOSITORIES="../ext_libraries"
 SCPDEFS=""
@@ -1078,9 +1082,9 @@ case "$build_os" in
                test_cairo=yes
                test_kde=yes
                test_cups=yes
-               test_randr=yes
+               test_randr=yes
                test_freetype=yes
-               test_gstreamer=yes
+               test_gstreamer=yes
                _os=SunOS
                AC_PATH_PROG( GNUTAR, gtar,,$PATH:/usr/sfw/bin)
                if test -z "$GNUTAR"; then
@@ -1113,10 +1117,10 @@ case "$build_os" in
                test_kde=yes
                test_kde4=yes
                test_cups=yes
-               test_randr=yes
+               test_randr=yes
                test_freetype=yes
-               test_gstreamer=yes
-               _os=Linux       
+               test_gstreamer=yes
+               _os=Linux       
                ;;
        gnu)
                test_cups=no
@@ -1126,30 +1130,36 @@ case "$build_os" in
                test_cups=no
                test_cairo=yes
                test_freetype=no
-               test_gstreamer=no
+        test_gstreamer=no
                _os=WINNT
                ;;
        darwin*) # Mac OS X
                test_cups=yes
                test_gtk=yes
                test_cairo=yes
-               test_randr=no
+        test_randr=no
                test_freetype=no
-               test_gstreamer=no
+        test_gstreamer=no
                _os=Darwin
                if test "$enable_systray" = "yes" && test "$enable_gtk" != 
"no"; then
                   AC_MSG_WARN([Disabling gtk-quickstarter - not supported on 
Mac. Use --disable-systray])
                   echo "Disabling gtk-quickstarter - not supported on Mac. Use 
--disable-systray" >>warn
                   enable_systray=no
                fi
+               if test ! -n "$CC"; then
+                  CC="`xcrun -f clang` -arch x86_64"
+               fi
+               if test ! -n "$CXX"; then
+                  CXX="`xcrun -f clang++` -arch x86_64 -std=c++11"
+               fi
                ;;
        os2*)
                test_x=no
                test_cups=no
-               test_randr=no
+        test_randr=no
                test_gtk=no
                test_freetype=no
-               test_gstreamer=no
+        test_gstreamer=no
                _os=OS2
                ;;
        freebsd*)
@@ -1158,9 +1168,9 @@ case "$build_os" in
                test_kde=yes
                test_kde4=yes
                test_cups=yes
-               test_randr=yes
+        test_randr=yes
                test_freetype=yes
-               test_gstreamer=yes
+        test_gstreamer=yes
                AC_MSG_CHECKING([the FreeBSD operating system release])
                if test -n "$with_os_version"; then
                        OSVERSION="$with_os_version"
@@ -1184,7 +1194,7 @@ case "$build_os" in
                ;;
        osf)
                test_cups=no
-               test_randr=no
+               test_randr=no
                _os=OSF1
                ;;
        netbsd)
@@ -1193,18 +1203,18 @@ case "$build_os" in
                test_kde=yes
                test_kde4=yes
                test_cups=no
-               test_randr=yes
+               test_randr=yes
                test_freetype=yes
-               test_gstreamer=yes
+               test_gstreamer=yes
                PTHREAD_CFLAGS="-pthread"
                PTHREAD_LIBS="-pthread -lpthread"
                _os=NetBSD
                ;;
        aix*)
                test_cups=no
-               test_randr=no
+               test_randr=no
                test_freetype=yes
-               test_gstreamer=yes
+               test_gstreamer=yes
                PTHREAD_LIBS=-pthread
                echo "AIX is an alpha port --- Use at own risk" >> warn
                _os=AIX
@@ -3934,6 +3944,44 @@ AC_SUBST(SYSTEM_LIBXML)
 AC_SUBST(LIBXML_CFLAGS)
 AC_SUBST(LIBXML_LIBS)
 
+
+dnl ===================================================================
+dnl Checks for MacOS platform SDK. Default is 10.7
+dnl ===================================================================
+if test  "$_os" = "Darwin"; then
+   AC_MSG_CHECKING([checking MacOS platform SDK])
+   sdk_version=10.7
+
+  if test -n "$with_macosx_sdk_version"; then
+        sdk_version=$with_macosx_sdk_version
+  fi
+ 
+   sdk_minor=`echo $sdk_version | cut -d"." -f2`
+
+   if test "$sdk_minor" -lt "7"; then
+      AC_MSG_ERROR([SDK version < 10.7 is not longer supported])
+   else                  
+      AC_MSG_RESULT([yes])
+      if test "$sdk_minor" -ge "7"; then
+                MACOSX_DEPLOYMENT_TARGET=$sdk_version
+         fi
+
+         sdk_path=`xcodebuild -version -sdk macosx$MACOSX_DEPLOYMENT_TARGET 
Path`
+         AC_MSG_CHECKING([for $sdk_path])
+         if test -d "$sdk_path"; then
+        AC_MSG_RESULT([yes])
+         else
+         AC_MSG_ERROR([No proper MacOS platform SDK, not found])
+         fi
+
+         MACOSX_SDK_PATH=$sdk_path
+   fi
+
+fi
+AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
+AC_SUBST(MACOSX_SDK_PATH)
+
+
 dnl ===================================================================
 dnl Check for system python
 dnl ===================================================================
@@ -3958,10 +4006,10 @@ if test "$_os" = "Darwin" && test "$with
          
          if test -d 
"/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver";
 then
                 
PYTHON_CFLAGS="-I/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"
-         elif test -d 
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/python$_python_ver";
 then
-                
PYTHON_CFLAGS="-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/python$_python_ver"
  
+         elif test -d "$MACOSX_SDK_PATH/usr/include/python$_python_ver"; then
+                
PYTHON_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/python$_python_ver"  
          else
-                
PYTHON_CFLAGS="-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"
+                
PYTHON_CFLAGS="-I$MACOSX_SDK_PATH/System/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"
          fi
    else
                AC_MSG_ERROR([Python 2.7.1 or higher is required])
@@ -4821,6 +4869,7 @@ AC_SUBST(SYSTEM_GRAPHITE)
 AC_SUBST(GRAPHITE_LIBS)
 AC_SUBST(GRAPHITE_CFLAGS)
 
+
 dnl ===================================================================
 dnl Checks for libraries.
 dnl ===================================================================

Modified: openoffice/branches/rejuvenate01/main/set_soenv.in
URL: 
http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/set_soenv.in?rev=1559967&r1=1559966&r2=1559967&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/set_soenv.in (original)
+++ openoffice/branches/rejuvenate01/main/set_soenv.in Tue Jan 21 10:37:15 2014
@@ -102,7 +102,7 @@ my ( $oldPATH, $SRC_ROOT, $SO_HOME, $JAV
      $SOLARSRC, $DEVROOT, $SOLARVER, $SOLARVERSION, $WORKDIR, $OUTDIR, 
$SOLARENV, 
      $STAR_INIROOT, $STAR_INIROOTOLD, $STAR_STANDLST, $STAR_SSCOMMON, 
$STAR_SSOLARINI, 
      $DMAKEROOT, $CLASSPATH, $XCLASSPATH, $COMPATH, $CXX_X64_BINARY, 
$LINK_X64_BINARY, $LIBMGR_X64_BINARY,
-     $MSPDB_PATH, $MIDL_PATH, $CSC_PATH,
+     $MSPDB_PATH, $MIDL_PATH, $CSC_PATH, $MACOSX_DEPLOYMENT_TARGET, 
$MACOSX_SDK_PATH,
      $PATH, $SOLAREXTRAINC, $SOLAREXTRALIB, $SOLARLIB, 
      $SOLARINC, $LOCALINI, $FRAMEWORKSHOME, $COMEX, $PERL, 
      $COMP_ENV, $ILIB, $JAVAHOME, $PSDK_HOME, $DIRECTXSDK_LIB, $USE_NEW_SDK, 
$FRAME_HOME, 
@@ -1685,10 +1685,11 @@ if ( $platform =~ m/darwin/ )
 {
 # MAXOSX_DEPLOYMENT_TARGET : The minimum version required to run the build,
 # build can assume functions/libraries of that version to be available
-# unless you want to do runtime checks for 10.5 api, you also want to use the 
10.7 sdk
+# unless you want to do runtime checks for 10.5 api, you also want to use the 
10.6 or 10.7 sdk
 # (safer/easier than dealing with the MAC_OS_X_VERSION_MAX_ALLOWED macro)
 # http://developer.apple.com/technotes/tn2002/tn2064.html
-    ToFile( "MACOSX_DEPLOYMENT_TARGET",       "10.7",       "e" );
+    ToFile( "MACOSX_DEPLOYMENT_TARGET",       "@MACOSX_DEPLOYMENT_TARGET@",    
   "e" );
+    ToFile( "MACOSX_SDK_PATH",       "@MACOSX_SDK_PATH@",       "e" );
 }
 
 #

Modified: openoffice/branches/rejuvenate01/main/solenv/gbuild/platform/macosx.mk
URL: 
http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/solenv/gbuild/platform/macosx.mk?rev=1559967&r1=1559966&r2=1559967&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/solenv/gbuild/platform/macosx.mk 
(original)
+++ openoffice/branches/rejuvenate01/main/solenv/gbuild/platform/macosx.mk Tue 
Jan 21 10:37:15 2014
@@ -71,11 +71,9 @@ gb_CPUDEFS := -DX86_64
 endif
 
 ifeq ($(strip $(SYSBASE)),)
-#SDK_PATH := `xcodebuild -version -sdk macosx$(MACOSX_DEPLOYMENT_TARGET) Path`
-SDK_PATH := 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
-gb_SDKDIR := $(SDK_PATH)
+gb_SDKDIR := $(MACOSX_SDK_PATH)
 else
-gb_SDKDIR := $(SYSBASE)/MacOSX10.7.sdk
+gb_SDKDIR := $(SYSBASE)/MacOSX$(MACOSX_DEPLOYMENT_TARGET).sdk
 endif
 
 

Modified: openoffice/branches/rejuvenate01/main/solenv/inc/unxmacc.mk
URL: 
http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/solenv/inc/unxmacc.mk?rev=1559967&r1=1559966&r2=1559967&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/solenv/inc/unxmacc.mk (original)
+++ openoffice/branches/rejuvenate01/main/solenv/inc/unxmacc.mk Tue Jan 21 
10:37:15 2014
@@ -40,10 +40,8 @@ CDEFS+=-DGLIBC=2 -D_PTHREADS -D_REENTRAN
 # (safer/easier than dealing with the MAC_OS_X_VERSION_MAX_ALLOWED macro)
 # http://developer.apple.com/technotes/tn2002/tn2064.html
 # done in setsolar/configure now. left here for documentation
-#MACOSX_DEPLOYMENT_TARGET=10.7
-#.EXPORT: MACOSX_DEPLOYMENT_TARGET
 CDEFS+=-DQUARTZ 
-EXTRA_CDEFS*=-isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
+EXTRA_CDEFS*=-isysroot $(MACOSX_SDK_PATH)
 
 # Name of library where static data members are initialized
 # STATICLIBNAME=static$(DLLPOSTFIX)

Modified: openoffice/branches/rejuvenate01/main/solenv/inc/unxmacx.mk
URL: 
http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/solenv/inc/unxmacx.mk?rev=1559967&r1=1559966&r2=1559967&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/solenv/inc/unxmacx.mk (original)
+++ openoffice/branches/rejuvenate01/main/solenv/inc/unxmacx.mk Tue Jan 21 
10:37:15 2014
@@ -40,12 +40,8 @@ CDEFS+=-DGLIBC=2 -D_PTHREADS -D_REENTRAN
 # (safer/easier than dealing with the MAC_OS_X_VERSION_MAX_ALLOWED macro)
 # http://developer.apple.com/technotes/tn2002/tn2064.html
 # done in setsolar/configure now. left here for documentation
-#MACOSX_DEPLOYMENT_TARGET=10.7
-#.EXPORT: MACOSX_DEPLOYMENT_TARGET
 CDEFS+=-DQUARTZ
-#SDK_PATH=`xcodebuild -version -sdk macosx$(MACOSX_DEPLOYMENT_TARGET) Path`
-SDK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
-EXTRA_CDEFS*=-isysroot $(SDK_PATH)
+EXTRA_CDEFS*=-isysroot $(MACOSX_SDK_PATH)
 
 # Name of library where static data members are initialized
 # STATICLIBNAME=static$(DLLPOSTFIX)
@@ -202,7 +198,7 @@ LINK*=$(CXX)
 LINKC*=$(CC)
 
 # assure backwards-compatibility
-EXTRA_LINKFLAGS*=$(ARCH_FLAGS) -L$(SDK_PATH)
+EXTRA_LINKFLAGS*=$(ARCH_FLAGS) -L$(MACOSX_SDK_PATH)
 # Very long install_names are needed so that install_name_tool -change later on
 # does not complain that "larger updated load commands do not fit:"
 LINKFLAGSRUNPATH_URELIB=-install_name 
'@__________________________________________________URELIB/$(@:f)'


Reply via email to