From b25235be4c797b4845953238e7dde5d1facf3c1d Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Tue, 1 Mar 2005 15:51:17 +0000 Subject: [PATCH] INTEGRATION: CWS gcj2 (1.70.6); FILE MERGED 2005/02/02 18:40:40 cmc 1.70.6.2: #i41879# missed JAVAC -> JAVACOMPILER conversion 2005/02/02 10:27:22 cmc 1.70.6.1: #i41879# allow gij/gcj with names like gij-4/gcj-4 or gij4/gcj4, e.g. Fedora and Debian --- config_office/configure | 46 ++++++----------------------------------- 1 file changed, 6 insertions(+), 40 deletions(-) diff --git a/config_office/configure b/config_office/configure index 647b3a54aa7f..6738d964a94e 100755 --- a/config_office/configure +++ b/config_office/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.101 . +# From configure.in Revision . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59. # @@ -6430,7 +6430,7 @@ echo "${ECHO_T}checked (gcj)" >&6 { echo "$as_me:$LINENO: WARNING: EXPERIMENTAL: gij/gcj is not a full JDK replacement - some projects will fail to compile" >&5 echo "$as_me: WARNING: EXPERIMENTAL: gij/gcj is not a full JDK replacement - some projects will fail to compile" >&2;} echo "EXPERIMENTAL: gij/gcj is not a full JDK replacement - some projects will fail to compile" >>warn - JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*gij,,p"` + JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"` else _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[-A-Za-z]*//` _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` @@ -6454,8 +6454,8 @@ else fi if test "$SOLAR_JAVA" != ""; then - if test "$JDK" = "gcj"; then - javacompiler="gcj" + if test "$JDK" == "gcj"; then + javacompiler=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"` else javacompiler="javac" fi @@ -6611,12 +6611,12 @@ if test "$SOLAR_JAVA" != ""; 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 $JAVAC)) >/dev/null 2>/dev/null; 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 $JAVAC) | $SED -e s,/bin/javac$,,) + JAVA_HOME=$(readlink $(readlink $JAVACOMPILER) | $SED -e s,/bin/javac$,,) else # else warn { echo "$as_me:$LINENO: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&5 @@ -6696,40 +6696,6 @@ echo "$as_me: error: xsltproc is required" >&2;} { (exit 1); exit 1; }; } fi fi -# 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 $JAVAC)) >/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 $JAVAC) | $SED -e s,/bin/javac$,,) - else - # else warn - { echo "$as_me:$LINENO: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&5 -echo "$as_me: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&2;} - { echo "$as_me:$LINENO: WARNING: if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >&5 -echo "$as_me: WARNING: if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >&2;} - 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 -fi -# now check if $JAVA_HOME is really valid -if test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x" && \ - test "$XSLTPROC" = "NO_XSLTPROC"; then - { echo "$as_me:$LINENO: WARNING: JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >&5 -echo "$as_me: WARNING: JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >&2;} - { echo "$as_me:$LINENO: WARNING: attempted to find JAVA_HOME automatically, but apparently it failed" >&5 -echo "$as_me: WARNING: attempted to find JAVA_HOME automatically, but apparently it failed" >&2;} - { echo "$as_me:$LINENO: WARNING: in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >&5 -echo "$as_me: WARNING: in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >&2;} - echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn - echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn - echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn -fi - - if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "NetBSD" ; then