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 | |
parent | 584c265e3e46793b02b7329d173c71503138fd50 (diff) |
sb118: improved OOO_JUNIT_JAR configure check
-rwxr-xr-x | configure | 20 | ||||
-rw-r--r-- | configure.in | 15 |
2 files changed, 28 insertions, 7 deletions
diff --git a/configure b/configure index 0e214e8be5ab..800c5d76b997 100755 --- a/configure +++ b/configure @@ -29309,16 +29309,28 @@ if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then { $as_echo "$as_me:$LINENO: checking for JUnit 4" >&5 $as_echo_n "checking for JUnit 4... " >&6; } 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 { $as_echo "$as_me:$LINENO: result: $OOO_JUNIT_JAR" >&5 $as_echo "$OOO_JUNIT_JAR" >&6; } else - { { $as_echo "$as_me:$LINENO: error: cannot find JUnit 4 jar at $OOO_JUNIT_JAR; please install one and/or specify its pathname as --with-junit=..." >&5 -$as_echo "$as_me: error: cannot find JUnit 4 jar at $OOO_JUNIT_JAR; please install one and/or specify its pathname as --with-junit=..." >&2;} + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: 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" >&5 +$as_echo "$as_me: 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" >&2;} { (exit 1); exit 1; }; } fi fi 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) |