Github user magiccrafter commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1354#discussion_r138824699
--- Diff: aclocal/ax_javac_and_java.m4 ---
@@ -118,7 +118,7 @@ AC_DEFUN([AX_CHECK_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`
+ ANT_VALID=`expr "x$(printf "$2\n$($1 -version 2>/dev/null | sed
-n 's/.*version \(@<:@0-9\.@:>@*\).*/\1/p')" | sort -t '.' -k 1,1 -k 2,2 -k 3,3
-g | sed -n 1p)" = "x$2"`
--- End diff --
The issue that the pull request is fixing is the version comparison part.
The ant version extraction is working like charm and doesn't need to be changed.
@jeking3, you are not testing accurately. Thats not a bash script file,
this is a Autoconf/m4 macro and the following:
`ant -version | sed -n 's/.*version \(@<:@0-9\.@:>@*\).*/\1/p'`
at the time of running the bash command will have the 'Quadrigraphs'(@<:@)
escaped:
`ant -version | sed -n 's/.*version \([0-9\.]*\).*/\1/p'`
For further details check the docs:
https://www.gnu.org/software/autoconf/manual/autoconf.html#Quadrigraphs
I hope this clears the things a bit.
Thanks
---