-ACINCLUDE_FILES="lyxinclude.m4 libtool.m4 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 progtest.m4 xforms.m4 qt2.m4 gtk--.m4 gnome--.m4 gnome.m4 pspell.m4 pkg.m4"
-SIGCPP_ACINCLUDE_FILES="libtool.m4"
+ echo "This automake version is not supported by LyX."
+ echo "LyX only supports automake 1.5 to 1.10."
+ exit 1
+ ;;
+esac
+
+# Discover what version of autoconf we are using.
+autoversion=`$AUTOCONF --version 2>/dev/null | head -n 1`
+
+test "$autoversion" != "" && {
+ echo "Using $autoversion"
+} || {
+ echo "LyX requires autoconf >= 2.52"
+ exit 1
+}
+
+case $autoversion in
+ *' '2.5[2-9]|*' '2.60[ab]|*' '2.6[0-1])
+ ;;
+ *)
+ echo "This autoconf version is not supported by LyX."
+ echo "LyX only supports autoconf 2.52-2.61."
+ exit 1
+ ;;
+esac