You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2013/05/08 20:55:19 UTC

svn commit: r1480405 - in /openoffice/branches/rejuvenate01/main: RepositoryFixes.mk configure.in set_soenv.in

Author: hdu
Date: Wed May  8 18:55:19 2013
New Revision: 1480405

URL: http://svn.apache.org/r1480405
Log:
#i122195# change configure to allow XCode4 MacOSX builds

- the latest XCode4 is available only with SDK >= 10.7
- the native STL on this platform is libc++
- allow 64bit MacOSX builds

The changes to configure are incomplete but they allow other developers
to join the fun now of tweaking our configure scripts till all the new
features in this branch work on all of our target platforms out of the box

Modified:
    openoffice/branches/rejuvenate01/main/RepositoryFixes.mk
    openoffice/branches/rejuvenate01/main/configure.in
    openoffice/branches/rejuvenate01/main/set_soenv.in

Modified: openoffice/branches/rejuvenate01/main/RepositoryFixes.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/RepositoryFixes.mk?rev=1480405&r1=1480404&r2=1480405&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/RepositoryFixes.mk (original)
+++ openoffice/branches/rejuvenate01/main/RepositoryFixes.mk Wed May  8 18:55:19 2013
@@ -50,7 +50,7 @@ gb_Library_FILENAMES := $(patsubst salhe
 gb_Library_FILENAMES := $(patsubst ucbhelper:libucbhelper%,ucbhelper:libucbhelper4%,$(gb_Library_FILENAMES))
 
 ifeq ($(USE_SYSTEM_STL),YES)
-gb_Library_FILENAMES := $(patsubst stl:%,stl:libstdc++.dylib,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst stl:%,stl:libc++.dylib,$(gb_Library_FILENAMES))
 gb_Library_TARGETS := $(filter-out stl,$(gb_Library_TARGETS))
 endif
 

Modified: openoffice/branches/rejuvenate01/main/configure.in
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/configure.in?rev=1480405&r1=1480404&r2=1480405&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/configure.in (original)
+++ openoffice/branches/rejuvenate01/main/configure.in Wed May  8 18:55:19 2013
@@ -1743,18 +1743,18 @@ if test \( "$_os" != "WINNT" -o "$WITH_M
    fi
    if test "$_os" = "Darwin" -a "$GCCVER" -ge "040100" ; then
       if test -z "$save_CC" -a -x "$GCC_HOME/bin/gcc-4.0" ; then
-         export CC=$GCC_HOME/bin/gcc-4.0
+#         export CC=$GCC_HOME/bin/gcc-4.0
           dnl  export CC to have it available in set_soenv -> config.guess
          GCCVER2=`"$CC" -dumpversion | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
          if test "$GCCVER2" -ge "040000" -a "$GCCVER2" -lt "040100" ; then
             GCCVER=$GCCVER2
          fi
       fi
-      if test "$GCCVER" -ge "040100" ; then
-         AC_MSG_ERROR([You need to use the gcc-4.0 compiler (gcc $_gcc_version won't work with the MacOSX10.4u.sdk) - set CC accordingly])
-      else
+#      if test "$GCCVER" -ge "040100" ; then
+#         AC_MSG_ERROR([You need to use the gcc-4.0 compiler (gcc $_gcc_version won't work with the MacOSX10.4u.sdk) - set CC accordingly])
+#      else
          AC_MSG_RESULT([implicitly using CC=$CC])
-      fi
+#      fi
    else
       AC_MSG_RESULT([checked (gcc $_gcc_version)])
    fi
@@ -2401,22 +2401,22 @@ if test "$GXX" = "yes"; then
    _gpp_version=`$CXX -dumpversion`
    _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'`
 
-   if test "$_os" = "Darwin" -a "$_gpp_majmin" -ge "401" ; then
-      if test -z "$save_CXX" -a -x "$GCC_HOME/bin/g++-4.0" ; then
-         CXX=$GCC_HOME/bin/g++-4.0
-         _gpp_majmin_2=`"$CXX" -dumpversion | $AWK -F. '{ print \$1*100+\$2 }'`
-         if test "$_gpp_majmin_2" -ge "400" -a "$_gpp_majmin_2" -lt "401" ; then
-            _gpp_majmin=$_gpp_majmin_2
-         fi
-      fi
-      if test "$_gpp_majmin" -ge "401" ; then
-         AC_MSG_ERROR([You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly])
-      else
-         AC_MSG_RESULT([implicitly using CXX=$CXX])
-      fi
-   else
+#   if test "$_os" = "Darwin" -a "$_gpp_majmin" -ge "401" ; then
+#      if test -z "$save_CXX" -a -x "$GCC_HOME/bin/g++-4.0" ; then
+#         CXX=$GCC_HOME/bin/g++-4.0
+#         _gpp_majmin_2=`"$CXX" -dumpversion | $AWK -F. '{ print \$1*100+\$2 }'`
+#         if test "$_gpp_majmin_2" -ge "400" -a "$_gpp_majmin_2" -lt "401" ; then
+#            _gpp_majmin=$_gpp_majmin_2
+#         fi
+#      fi
+#      if test "$_gpp_majmin" -ge "401" ; then
+#         AC_MSG_ERROR([You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly])
+#      else
+#         AC_MSG_RESULT([implicitly using CXX=$CXX])
+#      fi
+#   else
       AC_MSG_RESULT([checked (g++ $_gpp_version)])
-   fi
+#   fi
 
    if test "$_gpp_majmin" = "304"; then
       AC_MSG_CHECKING([whether $CXX has the enum bug])
@@ -2915,6 +2915,7 @@ fi
 dnl ===================================================================
 dnl system stl sanity tests
 dnl ===================================================================
+if false ; then # TODO: update TR1 compliant STLs
 if test "$USE_SYSTEM_STL" = "YES"; then
    AC_MSG_CHECKING([if hash_map will be in __gnu_cxx namespace])
    AC_LANG_PUSH([C++])
@@ -3001,6 +3002,7 @@ _ACEOF
 
    AC_LANG_POP([C++])
 fi
+fi # endof TODO: update TR1 compliant STLs
 
 AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
 
@@ -4088,26 +4090,15 @@ dnl ====================================
 AC_MSG_CHECKING([which python to use])
 if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then
    with_system_python=yes
-
-   _python="/Library/Frameworks/Python.framework/Versions/Current/bin/python" 
-   _python_version=`$_python -c "import platform; print platform.python_version();"`
-   
-   if test "$_python_version" = "2.7.4" ; then
-      AC_MSG_RESULT([compiling against system python (version $_python_version)])
-
-	  _python_ver=`$_python -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"`
-	  
-   	  PYTHON_CFLAGS="-I/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"
-   else
-		AC_MSG_ERROR([Python 2.7.4 is required])
-   fi
-
+   AC_MSG_RESULT([compiling against MacOSX10.7u.sdk (python version 2.7)])
+###   PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3"
+   PYTHON_CFLAGS="-I/Applications/Xcode.app/Contents/Developer//Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/python2.7"
    PYTHON_LIBS="-framework Python"
 elif test -n "$with_system_python" -o -n "$with_system_libs" && \
 	test "$with_system_python" != "no"; then
    with_system_python=yes
    AC_MSG_RESULT([external])
-   AM_PATH_PYTHON([2.3])
+   AM_PATH_PYTHON([2.7])
 
    python_include=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'));"`
    python_version=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"`

Modified: openoffice/branches/rejuvenate01/main/set_soenv.in
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/set_soenv.in?rev=1480405&r1=1480404&r2=1480405&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/set_soenv.in (original)
+++ openoffice/branches/rejuvenate01/main/set_soenv.in Wed May  8 18:55:19 2013
@@ -759,29 +759,41 @@ elsif ( $platform =~ m/os2/ ) 
 elsif ( $platform =~ m/darwin/ ) 
 {     print "Setting Mac OS X/Darwin specific values... ";
       $BIG_SVX        = "TRUE";
-      $COM            = "GCC";
       $COMPATH        = '@COMPATH@'; 
-      if ($platform =~ m/^i[3456]86/)
+      print "Darwin platform = " . $platform ." ";
+      if( $CC =~ "gcc" )
       {
-          print "Setting values for Mac OS X/Darwin on x86... ";
+          print "Setting values for MacOSX/Darwin for Xcode<=3";
+          $COM            = "GCC";
           $outfile        = "MacOSXX86Env.Set"; 
           $CPU            = "I";
           $CPUNAME        = "INTEL";
           $OUTPATH        = "unxmacxi";
       }
-      elsif ($platform =~ m/^powerpc/)
+      elsif ($platform =~ m/^i[3456]86/)
       {
-          print "Setting values for Mac OS X/Darwin on PowerPC... ";
-          $outfile        = "MacOSXPPCEnv.Set"; 
-          $CPU            = "P";
-          $CPUNAME        = "POWERPC";
-          $OUTPATH        = "unxmacxp";
+          print "Setting values for MacOSX/Darwin on x86_32... ";
+          $COM            = "CLANG";
+          $outfile        = "MacOSXX32Env.Set"; 
+          $CPU            = "I";
+          $CPUNAME        = "INTEL";
+          $OUTPATH        = "unxmacci";
       }
-      if (@GCCVER@ >= 30401) {
-	  $CVER           = "C341";
-      } else {
-	  $CVER           = "C300";
+      elsif ($platform =~ m/^x86_64/)
+      {
+          print "Setting values for MacOSX/Darwin on x86_64... ";
+          $COM            = "CLANG";
+          $outfile        = "MacOSXX64Env.Set";
+          $CPU            = "X";
+          $CPUNAME        = "X86_64";
+          $OUTPATH        = "unxmaccx";
+      }
+      else
+      {
+	  print "\nset_soenv: Unknown MacOSX/Darwin platform: $platform\n";
+	  exit 1;
       }
+      $CVER           = "DUMMY_CVER";
       $GUI            = "UNX";
       $GVER           = "VCL";
       $INPATH         = $OUTPATH.$PROEXT;
@@ -954,7 +966,7 @@ if ($STLPORT4 ne $no_stl) {
 } else {
         $ps_STLPORT_LIB         = "";
         $L_STLPORT_LIB          = "";
-        $STLPORT_stlport        = $I.$SRC_ROOT.$SOLVER.$ds.$UPD.$ds.$INPATH.$INC.$ds."stl";
+        $STLPORT_stlport        = $I."/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/";
         $STLPORT_inc_stlport    = "";
 }
 
@@ -994,12 +1006,10 @@ $XINC                 = PathFormat('@XIN
 
 # Mac OS X/Darwin only variables.
 if ( $platform =~ m/darwin/ )
-{  $FRAMEWORKSHOME       = $ds."Developer".$ds."SDKs".$ds."MacOSX10.4u.sdk".$ds."System".$ds."Library".$ds."Frameworks";
-   if ( $XLIB eq "no_x_libraries" ) {
-      $GUIBASE  = "aqua";
-   } else {
-      $GUIBASE  = "unx";
-   }
+{
+    $FRAMEWORKSHOME = $ds."Applications".$ds."Xcode.app".$ds."Contents".$ds."Developer".$ds."Platforms".$ds."MacOSX.platform";
+    $FRAMEWORKSHOME .= $ds."Developer".$ds."SDKs".$ds."MacOSX10.7.sdk".$ds."System".$ds."Library".$ds."Frameworks";
+    $GUIBASE  = "aqua";
 }
 
 # The project's workstamp.
@@ -1512,14 +1522,8 @@ elsif ($platform =~ m/cygwin/)
    }
 }
 elsif ($platform =~ m/darwin/)
-{  $SOLARINC         .= $STLPORT_stlport.
-						$I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Versions".$ds."Current".$ds."Headers".
-                        $I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Headers";
-   # [ed] 6/15/02 Add in X11 headers as appropriate for the build
-   if ($GUIBASE eq "unx") {
-      $SOLARINC      .= $I.$XINC.
-                        $I.$XINC.$ds."freetype2";
-   }
+{  $SOLARINC .= $STLPORT_stlport.
+                $I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Headers";
 }
 else
 {  AddWarning( "set_soenv", "$platform not configured for system dependant include dir" );
@@ -1755,10 +1759,10 @@ 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.4 sdk
+# unless you want to do runtime checks for 10.5 api, you also want to use the 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.4",       "e" );
+    ToFile( "MACOSX_DEPLOYMENT_TARGET",       "10.7",       "e" );
 }
 
 #