Skip to content
Snippets Groups Projects
Commit 6f188e15 authored by Brian Carrier's avatar Brian Carrier
Browse files

Cleaned up java code a bit in build / make system

parent d0ba612a
No related branches found
No related tags found
No related merge requests found
......@@ -62,8 +62,9 @@ if CPPUNIT
UNIT_TESTS=unit_tests
endif
# Compile java bindings if all of the dependencies existed
if X_JNI
JAVA_BINDINGS=bindings/java/jni bindings/java
JAVA_BINDINGS=bindings/java
else
JAVA_BINDINGS=
endif
......
......@@ -2,6 +2,9 @@ Z_PATH=@Z_PATH@
EWF_PATH=@EWF_PATH@
ANT_PROPS=
# Compile the sub directories
SUBDIRS = jni
if X_ZLIB
ANT_PROPS+=-Dlib.z.path=$(Z_PATH)
endif
......
......@@ -225,8 +225,9 @@ dnl sqlite requires pthread libraries - this was copied from its configure.ac
dnl AC_SEARCH_LIBS(pthread_create, pthread)
AC_SEARCH_LIBS(dlopen, dl)
dnl Test for java/jni so that we can compile the java bindings
dnl Test for the various java things that we need for bindings
AS_IF([test "x$enable_java" != "xno"], [
dnl javac is needed to compile the JAR file
AC_PROG_JAVAC
if test "x$JAVAC" != x; then
AX_JNI_INCLUDE_DIR
......@@ -237,14 +238,20 @@ AS_IF([test "x$enable_java" != "xno"], [
dnl Export the paths so that the makefile gets them
AC_SUBST(JNI_CPPFLAGS, $JNI_CPPFLAGS)
fi
dnl java is needed by ant
dnl we had one report of a system with javac and not java
AC_PROG_JAVA
]) dnl test enable_java
dnl Test is ant is available
AC_PATH_PROG([ANT_FOUND], [ant], [])
AM_CONDITIONAL([X_JNI],[test "x$JNI_CPPFLAGS" != x && test "x$ANT_FOUND" != x && test "x$JAVA" != x])
dnl Test is ant is available
AC_PATH_PROG([ANT_FOUND], [ant], [])
]) dnl test enable_java
dnl if we found everything we need, set ax_java_support for the
dnl status message and set X_JNI for use in Makefile
AS_IF([test "x$JNI_CPPFLAGS" != x && test "x$ANT_FOUND" != x && test "x$JAVA" != x], [ax_java_support=yes], [ax_java_support=no])
AM_CONDITIONAL([X_JNI],[test "x$ax_java_support" == "xyes"])
AC_CONFIG_COMMANDS([tsk/tsk_incs.h],
[echo "#ifndef _TSK_INCS_H" > tsk/tsk_incs.h
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment