Thrift-731: configure doesn't check for ant >= 1.7
Client: java, build process
Patch: Harlan Lieberman-Berg, Jake Farrell
Adds a configure check to verify that the current version of ant is >= 1.7 otherwise sets WITH_JAVA to no.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1127686 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/aclocal/ax_javac_and_java.m4 b/aclocal/ax_javac_and_java.m4
index 03ab08e..fdb4bf0 100644
--- a/aclocal/ax_javac_and_java.m4
+++ b/aclocal/ax_javac_and_java.m4
@@ -105,3 +105,17 @@
rm -f configtest_ax_javac_and_java.java configtest_ax_javac_and_java.class
])
+
+
+AC_DEFUN([AX_CHECK_ANT_VERSION],
+ [
+ AC_MSG_CHECKING(for ant version > $2)
+ ANT_VALID=`expr $($1 -version 2>/dev/null | sed -n 's/.*version \(@<:@0-9\.@:>@*\).*/\1/p') \>= $2`
+ if test "x$ANT_VALID" = "x1" ; then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ ANT=""
+ fi
+ ])
+