diff options
author | sb <sb@openoffice.org> | 2010-02-16 11:13:43 +0100 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-02-16 11:13:43 +0100 |
commit | b82f76df1be13aa9d04c2845ff23bcdea9e76b60 (patch) | |
tree | 2bf5c2ccdf4885397bdf143b92a878b04d782b82 /configure.in | |
parent | 584c265e3e46793b02b7329d173c71503138fd50 (diff) |
sb118: improved OOO_JUNIT_JAR configure check
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 15 |
1 files changed, 12 insertions, 3 deletions
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) |