--- e-uae-0.8.29-WIP4/configure.in
+++ e-uae-0.8.29-WIP4/configure.in
@@ -624,6 +624,7 @@
 AC_PATH_XTRA
 
 dnl Check for ncurses
+AC_CHECK_LIB(tinfo, main, HAVE_TINFO_LIB=yes,  HAVE_TINFO_LIB=no)
 AC_CHECK_LIB(ncurses, waddch, HAVE_NCURSES_LIB=yes, HAVE_NCURSES_LIB=no)
 
 dnl Check for SDL
@@ -793,7 +794,10 @@
 
 if [[ "x$WANT_NCURSES" = "xyes" ]]; then
  if [[ "x$HAVE_NCURSES_LIB" = "xyes" ]]; then
-  GFX_LIBS="-lncurses"
+  if [[ "x$HAVE_TINFO_LIB" = "xyes" ]]; then
+   GFX_LIBS="-ltinfo"
+  fi
+  GFX_LIBS="$GFX_LIBS -lncurses"
   GFX_CFLAGS=
   GFX_CPPFLAGS=
   GFX_DEP=gfx-curses
