THRIFT-450. Don't use Ivy if log4j is already available
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@774132 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/configure.ac b/configure.ac
index b4c50b4..07fa2e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,6 +70,12 @@
if test "$with_java" = "yes"; then
AX_JAVAC_AND_JAVA
AC_PATH_PROG([ANT], [ant])
+ AX_CHECK_JAVA_CLASS(org.apache.log4j.Logger)
+ have_log4j="$success"
+ if test "x$have_log4j" = "xyes" ; then
+ ANT_FLAGS="$ANT_FLAGS -Dnoivy="
+ fi
+ AC_SUBST(ANT_FLAGS)
fi
AM_CONDITIONAL([WITH_JAVA],
[test -n "$ANT" -a -n "$JAVA" -a -n "$JAVAC"])