Use AX_THRIFT_LIB to make configure support --without-java.
Don't bother testing for the Java requirements if this is set.
This is necessary because the autoconf macros we are using for Java
cause configure to quit with an error if Java is not found.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665545
13f79535-47bb-0310-9956-
ffa450edef68
PKG_CHECK_MODULES(MONO, mono >= 1.2.6, have_mono=yes, have_mono=no)
AM_CONDITIONAL(ENABLE_MONO, [test "$have_mono" = "yes"])
-AC_PATH_PROG([ANT], [ant])
-AX_PROG_JAVAC
-AX_PROG_JAVA
+AX_THRIFT_LIB(java, [Java], yes)
+if test "$with_java" = "yes"; then
+ AC_PATH_PROG([ANT], [ant])
+ AX_PROG_JAVAC
+ AX_PROG_JAVA
+fi
AM_CONDITIONAL([ENABLE_JAVA],
[test -n "$ANT" -a -n "$JAVA" -a -n "$JAVAC"])