[java-atk-wrapper] Specify propertiesdir and jardir on configure time



commit 8dd8a73821e0598a1663cc8c1ab38e146fdb6a63
Author: Fridrich Štrba <fridrich strba bluewin ch>
Date:   Fri Oct 27 18:05:52 2017 +0200

    Specify propertiesdir and jardir on configure time

 configure.ac        | 23 +++++++++++++++++++++--
 wrapper/Makefile.am |  9 ++-------
 2 files changed, 23 insertions(+), 9 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c2d1f07..b3b225c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,9 +59,12 @@ AC_ARG_WITH([jdk_auto_detect],
             [],
             [with_jdk_auto_detect=yes])
 if test "x$with_jdk_auto_detect" = "xyes"; then
-  `javac $JAVACFLAGS -classpath $CUR_DIR/wrapper/org/GNOME/Accessibility $CUR_DIR/JavaInfo.java`
+  `javac -nowarn $JAVACFLAGS -classpath $CUR_DIR/wrapper/org/GNOME/Accessibility $CUR_DIR/JavaInfo.java`
   JDK_SRC=`java JavaInfo`
-  JAVA_HOME=`java JavaInfo`/jre
+  JAVA_HOME="${JDK_SRC}/jre"
+  if test ! -d ${JAVA_HOME}; then
+    JAVA_HOME="${JDK_SRC}"
+  fi
 else
   if test -z "$JDK_SRC"; then
     AC_MSG_ERROR("You should specify JDK_SRC")
@@ -150,6 +153,22 @@ if test -z "$XPROP"; then
 fi
 AC_SUBST(XPROP)
 
+AC_ARG_WITH(jardir, AS_HELP_STRING([--with-jardir=[dirname]],[Directory for installing the 
java-atk-wrapper.jar file]))
+if test -z "$with_jardir" ; then
+    JARDIR=${JAVA_HOME}/lib
+else
+    JARDIR=$with_jardir
+fi
+AC_SUBST(JARDIR)
+
+AC_ARG_WITH(propertiesdir, AS_HELP_STRING([--with-propertiesdir=[dirname]],[Directory for installing the 
accessibility.properties file]))
+if test -z "$with_propertiesdir" ; then
+    PROPERTIESDIR=${JAVA_HOME}/conf
+else
+    PROPERTIESDIR=$with_propertiesdir
+fi
+AC_SUBST(PROPERTIESDIR)
+
 AC_CONFIG_FILES([
     Makefile
     jni/Makefile
diff --git a/wrapper/Makefile.am b/wrapper/Makefile.am
index c12d00f..f9eff42 100644
--- a/wrapper/Makefile.am
+++ b/wrapper/Makefile.am
@@ -3,13 +3,8 @@ JARFILES=java-atk-wrapper.jar
 ALL_CLASSES=org/GNOME/Accessibility/*.class
 DEP_CLASSES=$(wildcard $(ALL_CLASSES))
 
-if USER
-java_atk_wrapperdir = $(JAVA_HOME)/lib/ext
-propertiesdir = $(JAVA_HOME)/lib
-else
-java_atk_wrapperdir = $(HOME)$(JAVA_HOME)/lib/ext
-propertiesdir = $(HOME)$(JAVA_HOME)/lib
-endif
+java_atk_wrapperdir = $(JARDIR)
+propertiesdir = $(PROPERTIESDIR)
 
 java_atk_wrapper_DATA = $(JARFILES)
 properties_DATA = accessibility.properties


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]