From b82f76df1be13aa9d04c2845ff23bcdea9e76b60 Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 16 Feb 2010 11:13:43 +0100 Subject: sb118: improved OOO_JUNIT_JAR configure check --- configure.in | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 716b0beeb688..9525bf13b86c 100644 --- a/configure.in +++ b/configure.in @@ -6465,14 +6465,23 @@ OOO_JUNIT_JAR= if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then AC_MSG_CHECKING([for JUnit 4]) if test "$with_junit" == "yes"; then - OOO_JUNIT_JAR=/usr/share/java/junit4.jar + if test -e /usr/share/java/junit4.jar; then + OOO_JUNIT_JAR=/usr/share/java/junit4.jar + else + OOO_JUNIT_JAR=/usr/share/java/junit.jar + fi else OOO_JUNIT_JAR=$with_junit fi - if test -e "$OOO_JUNIT_JAR"; then + "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2> /dev/null | \ + grep -F org/junit/Before.class 2>&1 > /dev/null + if test $? -eq 0; then AC_MSG_RESULT([$OOO_JUNIT_JAR]) else - AC_MSG_ERROR([cannot find JUnit 4 jar at $OOO_JUNIT_JAR; please install one and/or specify its pathname as --with-junit=...]) + AC_MSG_RESULT([no]) + AC_MSG_ERROR([cannot find JUnit 4 jar at $OOO_JUNIT_JAR; +please install one and/or specify its pathname via --with-junit=..., +or disable it via --without-junit]) fi fi AC_SUBST(OOO_JUNIT_JAR) -- cgit