If we are using libncurses, also try to link with libtinfo.
authorGuus Sliepen <guus@tinc-vpn.org>
Thu, 26 Oct 2017 19:33:46 +0000 (21:33 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Thu, 26 Oct 2017 19:33:46 +0000 (21:33 +0200)
On some distributions, tinc might not be linked correctly if -ltinfo is
not explicitly specified.

m4/curses.m4

index 2e8d151041c9fce008c75a117374421bc2ebebe3..031e1eeab9fa71054753cb5e296e545102977716 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.")]