+ACINCLUDE_FILES="lyxinclude.m4 libtool.m4 pkg.m4 qt.m4 qt4.m4 spell.m4"
+
+# 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.9"
+ exit 1
+}
+
+case $automake_version in
+ *' '1.9*|*' '1.10*)
+ ;;
+ *)
+
+ echo "This automake version is not supported by LyX."
+ echo "LyX only supports automake 1.9 and 1.10."
+ exit 1
+ ;;
+esac