diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2015-12-11 19:58:09 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2015-12-11 19:58:41 +0000 |
commit | 38cc1a1843b370eaeff749802d1d8803b73c4b93 (patch) | |
tree | 70eeeefa0e6c697f64d5edc1fc816dc7a871aaa8 | |
parent | 2a3456cd3b234a2f5d0b6724fe41bb62b8deab4e (diff) | |
download | rtmux-38cc1a1843b370eaeff749802d1d8803b73c4b93.tar.gz rtmux-38cc1a1843b370eaeff749802d1d8803b73c4b93.tar.bz2 rtmux-38cc1a1843b370eaeff749802d1d8803b73c4b93.zip |
Look for ncurses with PKG_CONFIG, and remove libtinfo because it just causes
confusion.
-rw-r--r-- | configure.ac | 24 | ||||
-rw-r--r-- | tty-term.c | 4 |
2 files changed, 19 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 6cd859f0..824b4ab2 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,5 @@ # configure.ac -# Miscellaneous bits. AC_INIT(tmux, 2.2) AC_CONFIG_AUX_DIR(etc) @@ -143,12 +142,23 @@ if test "x$found_libevent" = xno; then AC_MSG_ERROR("libevent not found") fi -# Look for curses. -AC_SEARCH_LIBS( - setupterm, - [terminfo curses ncurses tinfo], - found_curses=yes, - found_curses=no +# Look for ncurses +PKG_CHECK_MODULES( + LIBNCURSES, + ncurses, + [ + CPPFLAGS="$LIBNCURSES_CFLAGS $CPPFLAGS" + LIBS="$LIBNCURSES_LIBS $LIBS" + found_curses=yes + ], + [ + AC_SEARCH_LIBS( + setupterm, + [ncurses curses terminfo], + found_curses=yes, + found_curses=no + ) + ] ) if test "x$found_curses" = xno; then AC_MSG_ERROR("curses not found") @@ -18,9 +18,9 @@ #include <sys/types.h> -#ifdef HAVE_CURSES_H +#if defined(HAVE_CURSES_H) #include <curses.h> -#else +#elif defined(HAVE_NCURSES_H) #include <ncurses.h> #endif #include <fnmatch.h> |