-test -x "$AUTOMAKE" || AUTOMAKE=`typep automake-1.12` ||
- AUTOMAKE=`typep automake-1.11` || AUTOMAKE=`typep automake-1.10` ||
- AUTOMAKE=`typep automake-1.9` || AUTOMAKE=`typep automake-1.8` ||
- AUTOMAKE=`typep automake-1.7` || AUTOMAKE=`typep automake17` ||
-{
-echo
-echo "You must have at least GNU Automake 1.7 (up to 1.11) installed"
-echo "in order to bootstrap smartmontools from SVN. Download the"
-echo "appropriate package for your distribution, or the source tarball"
-echo "from ftp://ftp.gnu.org/gnu/automake/ ."
-echo
-echo "Also note that support for new Automake series (anything newer"
-echo "than 1.11) is only added after extensive tests. If you live in"
-echo "the bleeding edge, you should know what you're doing, mainly how"
-echo "to test it before the developers. Be patient."
-exit 1;
-}
+ver=$(echo "$ver" | sed -n '1s,^.*[^.0-9]\([12]\.[0-9][-.0-9pl]*\).*$,\1,p')
+if [ -z "$ver" ]; then
+ echo "$AUTOMAKE: Unable to determine automake version."
+ exit 1
+fi