--- a/configure.ac +++ b/configure.ac @@ -138,14 +138,24 @@ if test "${enable_ui}" = "yes"; then AC_DEFINE([ENABLE_UI], [1], [Enable ui]) - AC_CHECK_LIB([ncursesw], [tputs],, [ - AC_CHECK_LIB([ncurses], [tputs],, [ + AC_CHECK_LIB([ncursesw], [touchwin],, [ + AC_CHECK_LIB([ncurses], [touchwin],, [ AC_MSG_ERROR([ The ncurses library was not found, which is needed for ui support. Either install the ncurses development libraries, or compile without ui support (--disable-ui) ]) ]) ]) + + if test "x${ac_cv_lib_ncursesw_touchwin}" = "xyes"; then + AC_SEARCH_LIBS([tputs], [tinfow],, [ + AC_MSG_ERROR([No library was found providing tputs]) + ]) + else + AC_SEARCH_LIBS([tputs], [tinfo],, [ + AC_MSG_ERROR([No library was found providing tputs]) + ]) + fi fi