Link with the tinfo library
authorMikael Berthe <mikael@lilotux.net>
Mon, 12 Sep 2016 22:39:04 +0200
changeset 2269 766666eb6928
parent 2268 f5402d705f67
child 2270 5d05e8128ef4
Link with the tinfo library On some systems we have to explicitly link with libtinfo. pkg-config cannot be used on every system with ncurses, see discussion in https://bugs.gentoo.org/show_bug.cgi?id=457530#c18 For now we'll use the same fix as Mutt: https://dev.mutt.org/hg/mutt/rev/c84aa0d62ce3 Thanks to Wolfram Schlich for the report and troubleshooting!
mcabber/configure.ac
--- a/mcabber/configure.ac	Sun Jun 05 20:06:46 2016 +0200
+++ b/mcabber/configure.ac	Mon Sep 12 22:39:04 2016 +0200
@@ -99,6 +99,9 @@
     done
     AC_CHECK_LIB($cf_ncurses, initscr,
         [LIBS="$LIBS -l$cf_ncurses"
+
+         AC_CHECK_LIB(tinfo, tgetent, [LIBS="$LIBS -ltinfo"])
+
          if test "$cf_ncurses" = ncursesw; then
             AC_CHECK_HEADERS([ncursesw/ncurses.h ncursesw/panel.h],,
                  [AC_CHECK_HEADERS([ncurses.h panel.h],,
@@ -161,7 +164,7 @@
                            [loudmouth is now using a new digest]
                            ),
                   []
-                 ) 
+                 )
 
 # Check for lm_ssl_set_cipher_list in loudmouth
 AC_CHECK_LIB(loudmouth-1, lm_ssl_set_cipher_list,