Skip to content

Commit 210d766

Browse files
committed
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
1 parent 9a42239 commit 210d766

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

aclocal/ax_javac_and_java.m4

+14
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,17 @@ AC_DEFUN([AX_CHECK_JAVA_CLASS],
105105
106106
rm -f configtest_ax_javac_and_java.java configtest_ax_javac_and_java.class
107107
])
108+
109+
110+
AC_DEFUN([AX_CHECK_ANT_VERSION],
111+
[
112+
AC_MSG_CHECKING(for ant version > $2)
113+
ANT_VALID=`expr $($1 -version 2>/dev/null | sed -n 's/.*version \(@<:@0-9\.@:>@*\).*/\1/p') \>= $2`
114+
if test "x$ANT_VALID" = "x1" ; then
115+
AC_MSG_RESULT(yes)
116+
else
117+
AC_MSG_RESULT(no)
118+
ANT=""
119+
fi
120+
])
121+

configure.ac

+1-9
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,7 @@ AX_THRIFT_LIB(java, [Java], yes)
148148
if test "$with_java" = "yes"; then
149149
AX_JAVAC_AND_JAVA
150150
AC_PATH_PROG([ANT], [ant])
151-
AX_CHECK_JAVA_CLASS(org.slf4j.Logger)
152-
have_slf4j="$success"
153-
AX_CHECK_JAVA_CLASS(org.slf4j.impl.SimpleLogger)
154-
have_slf4j_simple="$success"
155-
AX_CHECK_JAVA_CLASS(org.apache.commons.lang.builder.HashCodeBuilder)
156-
have_hashcode="$success"
157-
if test "x$have_slf4j_simple" = "xyes" && test "x$have_slf4j" = "xyes" && test "x$have_hashcode" = "xyes" ; then
158-
ANT_FLAGS="$ANT_FLAGS -Dnoivy="
159-
fi
151+
AX_CHECK_ANT_VERSION($ANT, 1.7)
160152
AC_SUBST(CLASSPATH)
161153
AC_SUBST(ANT_FLAGS)
162154
if test "x$JAVAC" != "x" && test "x$JAVAC" != "x" && test "x$ANT" != "x" ; then

0 commit comments

Comments
 (0)