--- configure.ac	2006-05-03 16:10:36.000000000 +0200
+++ configure.ac	2011-09-27 08:23:55.000000000 +0200
@@ -527,7 +527,7 @@
     LIBS="-l$LibTermcap $LIBS"
 fi
 
-AC_CHECK_LIB(readline, readline, HaveLibReadline=YES; LibReadline=readline,
+AC_CHECK_LIB(edit, readline, HaveLibReadline=YES; LibReadline=edit,
   AC_CHECK_LIB(editline, readline, HaveLibReadline=YES; LibReadline=editline,
     HaveLibReadline=NO))
 if test $HaveLibTermcap = YES && test $HaveLibReadline = YES &&
