AM_PROG_CC_STDC
AM_PROG_LIBTOOL
-dnl Should we check for curses, terminfo, and termlib, too?
-for termlib in ncurses termcap ; do
+for termlib in ncurses curses termcap terminfo termlib ; do
AC_CHECK_LIB(${termlib}, tgoto,
[LIBS="-l${termlib} $LIBS"; break])
done
-AC_CHECK_LIB(readline, main)
-if test $ac_cv_lib_readline_main = no; then
+AC_CHECK_LIB(readline, readline)
+if test $ac_cv_lib_readline_readline = no; then
AC_MSG_WARN([libreadline was not found on your system.])
fi