ncurses 6.0+
20170902-2 on Arch Linux doesn't provide setupterm(); it
did in earlier versions. This stops ./configure finding a suitable
library. Add tinfo to the search list, as that's the lower-level
library that contains setupterm() now, and place it before curses and
ncurses so the search stops if it's sufficient instead of the larger
libraries.
dnl Check for tputs() callback argument
NMH_TPUTS_PUTC_ARG
-termcap_curses_order="termcap curses ncurses"
+termcap_curses_order="termcap tinfo curses ncurses"
for lib in $termcap_curses_order; do
AC_CHECK_LIB([${lib}], [setupterm], [TERMLIB="-l$lib"; break])
done