From: Noah Watkins Date: Fri, 2 Nov 2012 19:52:38 +0000 (-0700) Subject: configure: fail when missing junit dependency X-Git-Tag: v0.55~152^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1581db9bcb467828a22f9705b6205e7c43aa10a5;p=ceph.git configure: fail when missing junit dependency Signed-off-by: Noah Watkins --- diff --git a/configure.ac b/configure.ac index 0d5eb9a38d9d..4fa0c0d463ae 100644 --- a/configure.ac +++ b/configure.ac @@ -285,12 +285,19 @@ AS_IF([test "x$enable_cephfs_java" = "xyes"], [ # cephfs_java_test only makes sense if java is already turned on # setup CLASSPATH for Debian default junit4.jar package + # + # Configuring --with-debug and --enable-cephfs-java will throw an error if + # JUnit4 cannot be found. While currently this works for users who have + # installed via the package manager on Ubuntu, we need to expand this + # check to 1) support other distrubtions and 2) allow users to influence + # the search path. AS_IF([test "x$with_debug" = "xyes"], [ dir='/usr/share/java' 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_SUBST(EXTRA_CLASSPATH_JAR)], [ + AC_MSG_ERROR([Cannot find junit4.jar (apt-get install junit4)])])]) # Check for Java programs: javac, javah, jar PATH_save=$PATH