[java-atk-wrapper] Revert "Add method to auto-detect JAVA_HOME"
- From: Ke Wang <kewang src gnome org>
- To: svn-commits-list gnome org
- Subject: [java-atk-wrapper] Revert "Add method to auto-detect JAVA_HOME"
- Date: Mon, 6 Jul 2009 02:55:42 +0000 (UTC)
commit 1ee806294ecfa4f053b32c9cd63d12541ad32179
Author: Ke Wang <ke wang sun com>
Date: Mon Jul 6 10:54:06 2009 +0800
Revert "Add method to auto-detect JAVA_HOME"
This reverts commit 6cd94a8018b0cfa7eaedde29129a0ac3f83ef45b.
INSTALL | 4 ++++
JavaInfo.java | 15 ---------------
configure.in | 43 +++++++++++++++++++++++++++----------------
wrapper/Makefile.am | 4 ++--
4 files changed, 33 insertions(+), 33 deletions(-)
---
diff --git a/INSTALL b/INSTALL
index e363b41..595d1df 100644
--- a/INSTALL
+++ b/INSTALL
@@ -9,6 +9,10 @@ run ./autogen.sh in the java-atk-wrapper directory (this directory),
Example:
./autogen.sh --prefix=/opt/gnome-2.0
+You can also include a --with-java-home argument:
+
+ ./autogen.sh --prefix=/opt/gnome-2.0 --with-java-home=/usr/java/j2sdk1.4.0
+
(2a) If you obtained the java-atk-wrapper via a tarfile,
run "./configure" in this directory with options as above.
diff --git a/configure.in b/configure.in
index df020b1..400216f 100644
--- a/configure.in
+++ b/configure.in
@@ -41,25 +41,25 @@ AC_SUBST(ATK_BRIDGE_LIB_NAME)
JAVA_REQUIRED=1.5
JAVA_ERROR_MESSAGE="Java $JAVA_REQUIRED or later is required to build java-access-bridge"
-AC_CHECK_PROG(JAVA, java, java, no)
-if test "x$JAVA" = xno; then
- AC_MSG_ERROR([$JAVA_ERROR_MESSAGE])
-fi
-AC_SUBST(JAVA)
+AC_ARG_VAR([JAVA_HOME],[Java Runtime Environment location])
-AC_CHECK_PROG(JAVAC, javac, javac, no)
-if test "x$JAVAC" = xno; then
- AC_MSG_ERROR([$JAVA_ERROR_MESSAGE])
-fi
-AC_SUBST(JAVAC)
+AC_ARG_WITH([java_home],
+ [AS_HELP_STRING([--with-java-home=PATH],
+ [Use the jdk at PATH])])
-CUR_DIR=`pwd`
-SRC_DIR=`dirname $0`
-SRC_DIR=`cd $SRC_DIR;pwd;cd $CUR_DIR`
-$JAVAC $SRC_DIR/JavaInfo.java
-JAVA_HOME="`CLASSPATH=$SRC_DIR java JavaInfo`"
+if test "x$with_java_home" != "x" ; then
+ JAVA_HOME=$with_java_home
+ AC_CHECK_FILE("$JAVA_HOME/bin/java", JAVA="$JAVA_HOME/bin/java",
+ AC_MSG_ERROR([$JAVA_ERROR_MESSAGE]))
+else
+ AC_CHECK_PROG(JAVA, java, java, no)
+ if test "x$JAVA" = xno; then
+ AC_MSG_ERROR([$JAVA_ERROR_MESSAGE])
+ fi
+fi
AC_SUBST(JAVA_HOME)
+AC_SUBST(JAVA)
CHECK_JNI
@@ -84,6 +84,17 @@ elif test $j_major_version = $min_major_version; then
fi
fi
+if test "x$JAVA_HOME" != "x" ; then
+ AC_CHECK_FILE("$JAVA_HOME/bin/javac", JAVAC="$JAVA_HOME/bin/javac",
+ AC_MSG_ERROR([$JAVA_ERROR_MESSAGE]))
+else
+ AC_CHECK_PROG(JAVAC, javac, javac, no)
+ if test "x$JAVAC" = xno; then
+ AC_MSG_ERROR([$JAVA_ERROR_MESSAGE])
+ fi
+fi
+AC_SUBST(JAVAC)
+
dnl AC_MSG_CHECKING([for Java Accessibility Utilities])
if test "x$JAVA_HOME" != "x" ; then
diff --git a/wrapper/Makefile.am b/wrapper/Makefile.am
index 666f2eb..85514c0 100644
--- a/wrapper/Makefile.am
+++ b/wrapper/Makefile.am
@@ -2,12 +2,12 @@ SUBDIRS=org
JARFILES=java-atk-wrapper.jar
DEP_CLASSES=$(wildcard org/GNOME/Accessibility/*.class)
-java_atk_wrapperdir = $(JAVA_HOME)/jre/lib/ext
+java_atk_wrapperdir = $(prefix)/share/jar
java_atk_wrapper_DATA = $(JARFILES)
EXTRA_DIST = $(properties_DATA)
-propertiesdir = $(JAVA_HOME)/jre/lib
+propertiesdir = $(prefix)/share/jar
properties_DATA = accessibility.properties
$(JARFILES) : $(DEP_CLASSES)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]