+# Discover what version of automake we are using.
+automake_version=`$AUTOMAKE --version 2>/dev/null | head -n 1`
+
+test "$automake_version" != "" && {
+ echo "Using $automake_version"
+} || {
+ echo "LyX requires automake >= 1.5"
+ exit 1
+}
+
+case $automake_version in
+ *' '1.[5-9]*|*' '1.10*)
+ ;;
+ *)
+
+ echo "This automake version is not supported by LyX."
+ echo "LyX only supports automake 1.5 to 1.10."
+ exit 1
+ ;;
+esac
+