Commit 4fe6cfeb authored by Kevin J. McCarthy's avatar Kevin J. McCarthy

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.

[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.]
parent eeba9a9b
......@@ -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_LIB(tinfo, tgetent, [MUTTLIBS="$MUTTLIBS -ltinfo"])
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment