Add automake support for building the Java library.

If java, javac, and ant are all available, the Java library will be built as part of the standard make target.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665494 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/configure.ac b/configure.ac
index a1b059f..d8a7b00 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,11 @@
 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
+AM_CONDITIONAL([ENABLE_JAVA],
+               [test -n "$ANT" -a -n "$JAVA" -a -n "$JAVAC"])
 
 AC_C_CONST
 AC_C_INLINE
@@ -119,6 +124,7 @@
   lib/cpp/thrift-nb.pc
   lib/cpp/thrift-z.pc
   lib/csharp/Makefile
+  lib/java/Makefile
   lib/py/Makefile
   if/Makefile
   test/Makefile