-echo -n "Locating GNU m4... "
-for prog in $M4 gm4 gnum4 m4 ; do
- case `$prog --version 2>&1` in
- *GNU*) ok=yes
- GNUM4=$prog
- echo "found: $GNUM4"
- break ;;
- *) ;;
- esac
-done
-if test x$ok = xno ; then
- echo "not found."
+if test "$automake_version" != ""; then
+ echo "Using $automake_version"
+else
+ echo "LyX requires automake >= 1.14"
+ exit 1
+fi
+
+# Discover what version of autoconf we are using.
+autoversion=$($AUTOCONF --version 2>/dev/null | head -n 1)
+
+if test "$autoversion" != ""; then
+ echo "Using $autoversion"
+else
+ echo "LyX requires autoconf >= 2.65"
+ exit 1