Allow the Java library to be excluded from the build.
authorDavid Reiss <dreiss@apache.org>
Sun, 2 Mar 2008 07:00:22 +0000 (07:00 +0000)
committerDavid Reiss <dreiss@apache.org>
Sun, 2 Mar 2008 07:00:22 +0000 (07:00 +0000)
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

configure.ac

index 113ae9f..5c4859c 100644 (file)
@@ -39,9 +39,12 @@ AM_CONDITIONAL([AMX_HAVE_ZLIB], [test "$success" = "yes"])
 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"])