Index: configure.in =================================================================== RCS file: /cvs/tools/config_office/configure.in,v retrieving revision 1.55.6.6 diff -u -r1.55.6.6 configure.in --- configure.in 28 Jan 2004 10:06:12 -0000 1.55.6.6 +++ configure.in 17 Feb 2004 16:50:29 -0000 @@ -1181,16 +1181,28 @@ dnl Check if there is a java compiler at all. if test -x "$_javac_path"; then JAVAC=$_javac_path - else - AC_MSG_ERROR([$_javac_path not found set with_jdk_home]) + else + _javac_path="$with_jdk_home/gcj" + dnl Check for gcj + if test -x "$_javac_path"; then + JAVAC=$_javac_path + else + AC_MSG_ERROR([$_javac_path not found set with_jdk_home]) + fi fi _java_path="$with_jdk_home/bin/java" dnl Check if there is a java interpreter at all. if test -x "$_java_path"; then JAVA=$_java_path - else - AC_MSG_ERROR([$_java_path not found set with_jdk_home]) + else + _java_path="$with_jdk_home/gij" + dnl Check for gcj + if test -x "$_java_path"; then + JAVA=$_java_path + else + AC_MSG_ERROR([$_java_path not found set with_jdk_home]) + fi fi fi AC_MSG_CHECKING([the installed JDK]) @@ -1215,6 +1227,22 @@ AC_MSG_RESULT([checked (Kaffe $KAFFE_VER)]) AC_MSG_WARN([EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile]) echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn + JAVA_HOME=`echo $JAVAC | $SED -n "s,//*bin//*javac,,p"` + elif test `$JAVAC -v 2>&1 | grep -c "gcc version"` -gt 0; then + + dnl gcj specific tests + + GCJ_VER=`$JAVAC -dumpversion 2>&1` + if test -z "$GCJ_VER"; then + AC_MSG_ERROR([looks like gcj but version detection failed]) + fi + _gcj_ver=$GCJ_VER + + JDK=gcj + AC_MSG_RESULT([checked (gcj $GCJ_VER)]) + AC_MSG_WARN([EXPERIMENTAL: gcj is not a full JDK replacement - some projects will fail to compile]) + echo "EXPERIMENTAL: gcj is not a full JDK replacement - some projects will fail to compile" >>warn + JAVA_HOME=`echo $JAVAC | $SED -n "s,//*gcj,,p"` else dnl SUN JDK specific tests @@ -1225,10 +1253,10 @@ AC_MSG_ERROR([JDK is too old, you need at least 1.3]) fi AC_MSG_RESULT([checked (JDK $_jdk)]) + JAVA_HOME=`echo $JAVAC | $SED -n "s,//*bin//*javac,,p"` fi - JAVA_HOME=`echo $JAVAC | $SED -n "s,//*bin//*javac,,p"` else - AC_MSG_ERROR([JAVA not found. You need at least jdk-1.3]) + AC_MSG_ERROR([JAVA not found. You need at least jdk-1.3, Kaffee 1.01, or gcj]) fi dnl xsltproc not needed with JDK present. XSLTPROC=NO_XSLTPROC