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
This commit is contained in:
David Reiss 2009-05-12 23:16:55 +00:00
parent eaa8d7e565
commit 4ca0c8eaee
2 changed files with 10 additions and 4 deletions

View File

@ -70,6 +70,12 @@ AX_THRIFT_LIB(java, [Java], yes)
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"])

View File

@ -20,17 +20,17 @@
EXTRA_DIST = build.xml src test
all-local:
$(ANT)
$(ANT) $(ANT_FLAGS)
install-exec-hook:
$(ANT) install -Dinstall.path=$(DESTDIR)$(JAVA_PREFIX) \
$(ANT) $(ANT_FLAGS) install -Dinstall.path=$(DESTDIR)$(JAVA_PREFIX) \
-Dinstall.javadoc.path=$(DESTDIR)$(docdir)/java
# Make sure this doesn't fail if ant is not configured.
clean-local:
ANT=$(ANT) ; if test -z "$$ANT" ; then ANT=: ; fi ; \
$$ANT clean
$$ANT $(ANT_FLAGS) clean
check-local: all
$(ANT) test
$(ANT) $(ANT_FLAGS) test