-if [ "x$lt" = "x./libtool" ] ; then
- echo "The found libtool is the one in the current directory."
- echo "Either your path is broken ('.' is before '/usr/bin') or the libtool package is not installed."
- echo "Please fix the situation to proceed with a CVS checkout"
+check_version()
+{
+ eval $2 --version 2>/dev/null | grep -i "$1.*$3" >/dev/null
+}
+
+find_version()
+{
+ tool=$1
+ found="NOT_FOUND"
+ shift
+ versions="$*"
+
+ for version in $versions ; do
+ if check_version $tool ${tool}${variant} $version; then
+ found="${version}"
+ echo ${version} >&2
+ break
+ fi
+ done
+ if [ "x$found" = "xNOT_FOUND" ]; then
+ found="-"
+ fi
+ echo $found
+}
+
+amver=`find_version automake ${amversions}`
+
+lt=`which libtoolize`
+if [ "x$lt" = "x" ] ; then
+ echo "Libtool not found. Please install the libtool package to proceed with a SVN checkout"