From: Danny Al-Gaaf Date: Fri, 4 Jan 2013 17:51:31 +0000 (+0100) Subject: configure.ac: change junit4 handling X-Git-Tag: v0.57~196^2~4^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=61437ee24e4f1c887fd431f5dc2dc4827bdbbfa5;p=ceph.git configure.ac: change junit4 handling Change handling of --with-debug and junit4. Add a new conditional HAVE_JUNIT4 to be able to build ceph-test package also if junit4 isn't available. In this case simply don't build libcephfs-test.jar, but the rest of the tools. Signed-off-by: Danny Al-Gaaf --- diff --git a/configure.ac b/configure.ac index 15430ddc1734..832054b29260 100644 --- a/configure.ac +++ b/configure.ac @@ -309,8 +309,10 @@ AS_IF([test "x$enable_cephfs_java" = "xyes"], [ junit4_jar=`find $dir -name junit4.jar | head -n 1` AS_IF([test -r "$junit4_jar"], [ EXTRA_CLASSPATH_JAR=`dirname $junit4_jar`/junit4.jar - AC_SUBST(EXTRA_CLASSPATH_JAR)], [ - AC_MSG_ERROR([Cannot find junit4.jar (apt-get install junit4)])])]) + AC_SUBST(EXTRA_CLASSPATH_JAR) + [have_junit4=1]], [ + AC_MSG_NOTICE([Cannot find junit4.jar (apt-get install junit4)]) + [have_junit4=0]])]) # Check for Java programs: javac, javah, jar PATH_save=$PATH @@ -341,6 +343,7 @@ AS_IF([test "x$enable_cephfs_java" = "xyes"], [ # Setup output var AC_SUBST(JDK_CPPFLAGS) ]) +AM_CONDITIONAL(HAVE_JUNIT4, [test "$have_junit4" = "1"]) # jni? # clear cache (from java above) -- this whole thing will get diff --git a/src/java/Makefile.am b/src/java/Makefile.am index 1f8788583184..788bea2c29b5 100644 --- a/src/java/Makefile.am +++ b/src/java/Makefile.am @@ -51,7 +51,7 @@ CLEANFILES = -rf java/com/ceph/fs/*.class $(JAVA_H) libcephfs.jar BUILT_SOURCES = $(JAVA_H) # build the tests if *both* --enable-cephfs-java and --with-debug were specifed -if WITH_DEBUG +if HAVE_JUNIT4 JAVA_TEST_CLASSES = $(JAVA_TEST_SRC:test/%.java=%.class) ESCAPED_JAVA_TEST_CLASSES = com/ceph/fs/CephAllTests\$$1.class @@ -68,5 +68,5 @@ libcephfs-test.jar: $(CEPH_TEST_PROXY) java_DATA += libcephfs-test.jar CLEANFILES += test/com/ceph/fs/*.class libcephfs-test.jar -endif # WITH_DEBUG +endif # HAVE_JUNIT4 (includes WITH_DEBUG) endif #ENABLE_CEPHFS_JAVA