[Libreoffice-commits] .: Branch 'feature/gnumake2' - 2 commits - configure.in solenv/gbuild

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Fri Jan 7 01:23:09 PST 2011


 configure.in                     |  121 +++++++++++++++++++--------------------
 solenv/gbuild/platform/macosx.mk |    9 +-
 2 files changed, 64 insertions(+), 66 deletions(-)

New commits:
commit 1bbfd1da14cad89d96218f0e3a5db899ed889542
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Fri Jan 7 03:13:05 2011 -0600

    tweak MacOs platform specific include to build on Macos

diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 75b89b7..667fecf 100755
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -62,10 +62,10 @@ else # ifeq ($(CPUNAME),POWERPC)
 gb_CPUDEFS := -DPOWERPC -DPPC
 endif
 
-ifeq ($(SYSBASE), "")
-gb_SDKDIR := /Developer/SDKs/MacOSX10.4u.sdk
-else
+ifneq ($(SYSBASE),)
 gb_SDKDIR := $(SYSBASE)/MacOSX10.4u.sdk
+else
+gb_SDKDIR := /Developer/SDKs/MacOSX10.4u.sdk
 endif
 
 
@@ -119,9 +119,10 @@ gb_LinkTarget_NOEXCEPTIONFLAGS := \
 	-fno-exceptions \
 
 gb_LinkTarget_LDFLAGS := \
-	-Wl,-syslibroot,$(gb_SDKDIR) \
 	$(subst -L../lib , ,$(SOLARLIB)) \
+
 #man ld says: obsolete	-Wl,-multiply_defined,suppress \
+# remove temporarily -Wl,-syslibroot,$(gb_SDKDIR) \
 
 ifeq ($(gb_DEBUGLEVEL),2)
 gb_COMPILEROPTFLAGS := -O0
commit b4a0afeb3373f46b30dc04f761f2e2fe44bf7668
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Fri Dec 17 00:16:09 2010 -0600

    Revert "use the 'canonical' way to find JAVA_HOME on MacOS."
    
    This reverts commit f936362120fcce5b9785851f304c95e3dc0ce9ed.

diff --git a/configure.in b/configure.in
index 7f74c8d..30a8b70 100644
--- a/configure.in
+++ b/configure.in
@@ -3665,50 +3665,47 @@ if test "$SOLAR_JAVA" != ""; then
 fi
 
 if test "$SOLAR_JAVA" != ""; then
-    if test $_os != "Darwin"; then
-        # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
-        if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
-            if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
-                # try to recover first by looking whether we have a alternatives
-                # system as in Debian or newer SuSEs where following /usr/bin/javac
-                # over /etc/alternatives/javac leads to the right bindir where we
-                # just need to strip a bit away to get a valid JAVA_HOME
-                JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
-            elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
-                # maybe only one level of symlink (e.g. on Mac)
-                JAVA_HOME=$(readlink $JAVACOMPILER)
-            fi
-            if test "$(dirname $JAVA_HOME)" = "."; then
-                # we've got no path to trim back
-                JAVA_HOME=""
-            fi
-        else
-            # else warn
-            AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
-            AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
-            echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn
-            echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn
-        fi
-        dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
-        if test "$JAVA_HOME" != "/usr"; then
-            JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
-        fi
-    else
-        if test "x$with_jdk_home" = "x"; then
-            if test -x /usr/libexec/java_home ; then
-                JAVA_HOME=$(/usr/libexec/java_home)
-            else
-                JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home"
-            fi
-        fi
-    fi
-
-    # as we drop out of this, JAVA_HOME may have been set to the empty string by readlink
+   # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
+   if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
+
+   if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
+       # try to recover first by looking whether we have a alternatives
+       # system as in Debian or newer SuSEs where following /usr/bin/javac
+       # over /etc/alternatives/javac leads to the right bindir where we
+       # just need to strip a bit away to get a valid JAVA_HOME
+       JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
+   elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
+       # maybe only one level of symlink (e.g. on Mac)
+       JAVA_HOME=$(readlink $JAVACOMPILER)
+       if test "$(dirname $JAVA_HOME)" = "."; then
+           # we've got no path to trim back
+           JAVA_HOME=""
+       fi
+   else
+       # else warn
+       AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
+       AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
+       echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn
+       echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn
+   fi
+   dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
+   if test "$JAVA_HOME" != "/usr"; then
+       if test "$_os" = "Darwin"; then
+           dnl Leopard returns a non-suitable path with readlink - points to "Current" only
+           JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
+           dnl Tiger already returns a JDK path..
+           JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
+       else
+           JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
+       fi
+   fi
+fi
+# as we drop out of this, JAVA_HOME may have been set to the empty string by readlink
 
-    dnl now if JAVA_HOME has been set to empty, then call findhome to find it
+dnl now if JAVA_HOME has been set to empty, then call findhome to find it
     if test -z "$JAVA_HOME"; then
-        if test "x$with_jdk_home" = "x"; then
-            cat > findhome.java <<_ACEOF
+      if test "x$with_jdk_home" = "x"; then
+        cat > findhome.java <<_ACEOF
 [import java.io.File;
 
 class findhome
@@ -3721,29 +3718,29 @@ class findhome
     }
 }]
 _ACEOF
-            AC_MSG_CHECKING([if javac works])
-            javac_cmd="$JAVACOMPILER findhome.java 1>&2"
-            AC_TRY_EVAL(javac_cmd)
-            if test $? = 0 && test -f ./findhome.class ; then
-                AC_MSG_RESULT([javac works])
-            else
-                echo "configure: javac test failed" >&5
-                cat findhome.java >&5
-                AC_MSG_ERROR([javac does not work - java projects will not build!])
-            fi
+        AC_MSG_CHECKING([if javac works])
+        javac_cmd="$JAVACOMPILER findhome.java 1>&2"
+        AC_TRY_EVAL(javac_cmd)
+        if test $? = 0 && test -f ./findhome.class ; then
+          AC_MSG_RESULT([javac works])
+        else
+          echo "configure: javac test failed" >&5
+          cat findhome.java >&5
+          AC_MSG_ERROR([javac does not work - java projects will not build!])
+        fi
 
-            AC_MSG_CHECKING([if gij knows its java.home])
-            JAVA_HOME=`$JAVAINTERPRETER findhome`
-            if test $? = 0 && test "$JAVA_HOME" != "" ; then
-                AC_MSG_RESULT([$JAVA_HOME])
-            else
-                echo "configure: java test failed" >&5
-                cat findhome.java >&5
-                AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
-            fi
+        AC_MSG_CHECKING([if gij knows its java.home])
+        JAVA_HOME=`$JAVAINTERPRETER findhome`
+        if test $? = 0 && test "$JAVA_HOME" != "" ; then
+          AC_MSG_RESULT([$JAVA_HOME])
         else
-            JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"`
+          echo "configure: java test failed" >&5
+          cat findhome.java >&5
+          AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
         fi
+      else
+        JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"`
+      fi
     fi
 
     dnl second sanity check JAVA_HOME if possible


More information about the Libreoffice-commits mailing list