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/lib/Makefile.am b/lib/Makefile.am
index 45d741b..36191f6 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -6,11 +6,14 @@
 SUBDIRS += csharp
 endif
 
+if ENABLE_JAVA
+SUBDIRS += java
+endif
+
 EXTRA_DIST = \
   cocoa \
   erl   \
   hs    \
-  java  \
   ocaml \
   perl  \
   php   \
diff --git a/lib/java/Makefile.am b/lib/java/Makefile.am
new file mode 100644
index 0000000..ddbf2f0
--- /dev/null
+++ b/lib/java/Makefile.am
@@ -0,0 +1,9 @@
+all:
+	$(ANT)
+
+install-exec-hook:
+	$(ANT) install
+
+clean-generic:
+	$(ANT) clean
+