If we are using libncurses, also try to link with libtinfo.
[tinc] / m4 / curses.m4
index 2e8d151..031e1ee 100644 (file)
@@ -32,7 +32,7 @@ AC_DEFUN([tinc_CURSES],
     )
 
     AC_CHECK_LIB(ncurses, initscr,
-      [CURSES_LIBS="-lncurses"],
+      [CURSES_LIBS="-lncurses"; AC_CHECK_LIB(tinfo, wtimeout, [CURSES_LIBS+=" -ltinfo"], [])],
       [AC_CHECK_LIB(curses, initscr,
         [CURSES_LIBS="-lcurses"],
         [AC_MSG_ERROR("curses libraries not found.")]