tdf#124456: Make Ant configure.ac check more robust

Change-Id: Iee16dd23c7881756663e8b6a67e4391186a6e430
See-Also: https://bugs.gentoo.org/682156
Reviewed-on: https://gerrit.libreoffice.org/80233
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
diff --git a/configure.ac b/configure.ac
index 364efe3..ecb4c87 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11902,7 +11902,7 @@ EOF
    ant_minminor1=`echo $ant_minver | cut -d"." -f2`

    AC_MSG_CHECKING([whether Ant is >= $ant_minver])
    ant_version=`"$ANT" -version | $AWK '{ print $4; }'`
    ant_version=`"$ANT" -version | $AWK '$3 == "version" { print $4; }'`
    ant_version_major=`echo $ant_version | cut -d. -f1`
    ant_version_minor=`echo $ant_version | cut -d. -f2`
    echo "configure: ant_version $ant_version " >&5