summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2018-04-02 11:30:31 -0700
committerKevin McCarthy <kevin@8t8.us>2018-04-02 11:30:31 -0700
commit4fe6cfeba5db168b06a4ba00feda92416cf2cec9 (patch)
tree708e77ff123c88fc566f0c71c6f8888afc3152fb /configure.ac
parenteeba9a9ba9262d820b448ce680b1e7c9c5c13ff4 (diff)
configure: check for tinfo matching ncurses
When we selected ncursesw, look for tinfow as well. Since ncurses-6.1 the binary compatibility between tinfo and tinfow disappeared, resulting in crashes and other odd behaviour. This change checks for tinfo or tinfow based on which ncurses we found to continue with. https://bugs.gentoo.org/651552 [Thanks to Fabian Groffen for the patch. I made a minor modification to fall back to tinfo because pre-6.1 systems may not have a tinfow but still need tinfo to compile.]
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 5 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 4e228edc..616177f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -299,12 +299,15 @@ main ()
AC_CHECK_LIB($cf_ncurses, initscr,
[MUTTLIBS="$MUTTLIBS -l$cf_ncurses"
- AC_CHECK_LIB(tinfo, tgetent, [MUTTLIBS="$MUTTLIBS -ltinfo"])
-
if test "$cf_ncurses" = ncursesw; then
+ AC_CHECK_LIB(tinfow, tgetent, [MUTTLIBS="$MUTTLIBS -ltinfow"],
+ AC_CHECK_LIB(tinfo, tgetent, [MUTTLIBS="$MUTTLIBS -ltinfo"]))
+
AC_CHECK_HEADERS(ncursesw/ncurses.h,[cf_cv_ncurses_header="ncursesw/ncurses.h"],
[AC_CHECK_HEADERS(ncurses.h,[cf_cv_ncurses_header="ncurses.h"])])
else
+ AC_CHECK_LIB(tinfo, tgetent, [MUTTLIBS="$MUTTLIBS -ltinfo"])
+
AC_CHECK_HEADERS(ncurses/ncurses.h,[cf_cv_ncurses_header="ncurses/ncurses.h"],
[AC_CHECK_HEADERS(ncurses.h,[cf_cv_ncurses_header="ncurses.h"])])
fi],