- check for libtinfo as a termcap library
diff --git a/configure b/configure
index afbc986..72ad97a 100755
--- a/configure
+++ b/configure
@@ -13557,7 +13557,7 @@
 py_cv_lib_readline=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
 $as_echo_n "checking how to link readline libs... " >&6; }
-for py_libtermcap in "" ncursesw ncurses curses termcap; do
+for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
   if test -z "$py_libtermcap"; then
     READLINE_LIBS="-lreadline"
   else
diff --git a/configure.ac b/configure.ac
index 3ad7f49..eb0763a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3904,7 +3904,7 @@
 # with setup.py.
 py_cv_lib_readline=no
 AC_MSG_CHECKING([how to link readline libs])
-for py_libtermcap in "" ncursesw ncurses curses termcap; do
+for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
   if test -z "$py_libtermcap"; then
     READLINE_LIBS="-lreadline"
   else