]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
configure.ac: Fix junit4.jar detection
authorBoris Ranto <branto@redhat.com>
Thu, 18 Jun 2015 18:01:01 +0000 (20:01 +0200)
committerBoris Ranto <branto@redhat.com>
Thu, 18 Jun 2015 18:01:47 +0000 (20:01 +0200)
If a system contains older (3) or later (5) release of junit.jar that is
default in the system, the auto-detection might find it before it finds
junit4.jar. This commit fixes that issue by always preferring the
junit4.jar library.

Signed-off-by: Boris Ranto <branto@redhat.com>
configure.ac

index f912aa430929a6a406771f24fb84b0933476136f..95a85880b25fe0267d290682bafa5713993b995e 100644 (file)
@@ -629,9 +629,9 @@ if test "x$enable_cephfs_java" = "xyes"; then
         # the search path.
         AS_IF([test "x$with_debug" = "xyes"], [
                dir='/usr/share/java'
-               junit4_jar=`find $dir -name junit4.jar -o -name junit.jar | head -n 1`
+               junit4_jar=`( find $dir -name junit4.jar;find $dir -name junit.jar ) | head -n 1`
                AS_IF([test -r "$junit4_jar"], [
-                     EXTRA_CLASSPATH_JAR=$junit4_jar
+                     EXTRA_CLASSPATH_JAR="$junit4_jar"
                      AC_SUBST(EXTRA_CLASSPATH_JAR)
                      [have_junit4=1]], [
                      AC_MSG_NOTICE([Cannot find junit4.jar (apt-get install junit4)])