--- a/configure.ac 2017-08-01 06:05:40.000000000 -0500 +++ b/configure.ac 2018-06-18 15:57:12.547987194 -0500 @@ -79,10 +79,17 @@ AC_SUBST(NET_LIBS, "${SOCKET_LIBS} ${NSL_LIBS}") -AX_WITH_CURSES -if test "x$ax_cv_curses" != xyes; then - AC_MSG_ERROR([requires an X/Open-compatible Curses library]) -fi +PKG_CHECK_MODULES([CURSES],[ncursesw],[ + AC_DEFINE(HAVE_NCURSESW_CURSES_H, 1) + ], + [PKG_CHECK_MODULES([CURSES],[ncurses],[ + AC_DEFINE(HAVE_NCURSES_H, 1) + ], + [AX_WITH_CURSES() + if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then + AC_MSG_ERROR([requires either NcursesW or Ncurses library]) + fi]) + ]) # XXX: This _may_ be for OS/X AC_CHECK_LIBM @@ -307,7 +314,7 @@ LIBS="${LIBS} ${RT_LIBS}" AC_CHECK_FUNCS([clock_gettime]) AC_CHECK_FUNCS([gethrtime]) -LIBS="${save_LIBS}" +LIBS="${save_LIBS} $CURSES_LIB $CURSES_LIBS" # --enable-kqueue AC_ARG_ENABLE(kqueue,