dnl @synopsis AX_PROG_ANT([required-version]) dnl calls ant -version and parses the version string that is dnl printed. dnl MTH fixed sed command from: dnl sed -e "s/[[^0-9.]]*//g" dnl (which was returning version and compile date) to: dnl sed "s/^[[^0-9.]]*\([[0-9.]]*\)[[^0-9.]].*/\1/" dnl @category Java dnl @author Kevin Fowler kfowler@sdsc.edu dnl @author Mark Holder mholder@scs.fsu.edu dnl @version 2006-04-26 AC_DEFUN([AX_PROG_ANT],[ AC_CHECK_PROG([ANT], ant, ant, no) AC_SUBST([ANT]) if test "$ANT" = no; then AC_MSG_ERROR([ant is not found]) fi ant_version=`ant -version | sed "s/^[[^0-9.]]*\([[0-9.]]*\)[[^0-9.]].*/\1/"` AC_MSG_CHECKING(for ant ($ant_version) >= $1) VERSION_CHECK=`expr $ant_version \>\= $1` if test "$VERSION_CHECK" = "1" ; then AC_MSG_RESULT(yes) else AC_MSG_ERROR($ANT is too old) fi AC_PROVIDE([$0]) ])