[PATCH] java: Rename JNI target, use JNI_INSTALL_DIR as provided through configure
This allows us to install the shared object to a different (e.g. /usr/lib/jni) with less pain. --- java/Makefile.am | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/java/Makefile.am b/java/Makefile.am index ef78773..d9db6f4 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -67,7 +67,8 @@ libguestfs-${VERSION}.jar: $(libguestfs_jar_class_files) # JNI source. -lib_LTLIBRARIES = libguestfs_jni.la +jnilib_LTLIBRARIES = libguestfs_jni.la +jnilibdir = $(JNI_INSTALL_DIR) libguestfs_jni_la_SOURCES = \ com_redhat_et_libguestfs_GuestFS.h \ com_redhat_et_libguestfs_GuestFS.c -- 1.7.9
On 02/02/2012 10:25 PM, Hilko Bengen wrote:
This allows us to install the shared object to a different (e.g. /usr/lib/jni) with less pain. --- java/Makefile.am | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/java/Makefile.am b/java/Makefile.am index ef78773..d9db6f4 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -67,7 +67,8 @@ libguestfs-${VERSION}.jar: $(libguestfs_jar_class_files)
# JNI source.
-lib_LTLIBRARIES = libguestfs_jni.la +jnilib_LTLIBRARIES = libguestfs_jni.la +jnilibdir = $(JNI_INSTALL_DIR) libguestfs_jni_la_SOURCES = \ com_redhat_et_libguestfs_GuestFS.h \ com_redhat_et_libguestfs_GuestFS.c
Grepping for JNI_INSTALL_DIR in my java directory gives: Makefile:JNI_INSTALL_DIR = ${libdir} Makefile.in:JNI_INSTALL_DIR = @JNI_INSTALL_DIR@ so this looks like a no-op in the default case. ACK. Matt -- Matthew Booth, RHCA, RHCSS Red Hat Engineering, Virtualisation Team GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
--- configure.ac | 8 ++++++-- java/Makefile.am | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 5caca32..d2bd4a3 100644 --- a/configure.ac +++ b/configure.ac @@ -919,8 +919,12 @@ if test "x$with_java_home" != "xno"; then dnl Where to install jarfiles. dnl XXX How to make it configurable? - JAR_INSTALL_DIR=\${prefix}/share/java - JNI_INSTALL_DIR=\${libdir} + if test -z $JAR_INSTALL_DIR; then + JAR_INSTALL_DIR=\${prefix}/share/java + fi + if test -z $JNI_INSTALL_DIR; then + JNI_INSTALL_DIR=\${libdir} + fi dnl JNI version. jni_major_version=`echo "$VERSION" | awk -F. '{print $1}'` diff --git a/java/Makefile.am b/java/Makefile.am index ef78773..d9db6f4 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -67,7 +67,8 @@ libguestfs-${VERSION}.jar: $(libguestfs_jar_class_files) # JNI source. -lib_LTLIBRARIES = libguestfs_jni.la +jnilib_LTLIBRARIES = libguestfs_jni.la +jnilibdir = $(JNI_INSTALL_DIR) libguestfs_jni_la_SOURCES = \ com_redhat_et_libguestfs_GuestFS.h \ com_redhat_et_libguestfs_GuestFS.c -- 1.7.9
participants (2)
-
Hilko Bengen -
Matthew Booth