Look for ncursesw as well as ncurses, based on a change from Bert van Hall.

This commit is contained in:
Nicholas Marriott 2017-01-19 15:31:22 +00:00
parent b98b4e23a3
commit 61af9d7cc2

View File

@ -164,15 +164,21 @@ fi
PKG_CHECK_MODULES( PKG_CHECK_MODULES(
LIBNCURSES, LIBNCURSES,
ncurses, ncurses,
[ found_ncurses=yes,
AM_CFLAGS="$LIBNCURSES_CFLAGS $AM_CFLAGS"
CFLAGS="$AM_CFLAGS $SAVED_CFLAGS"
LIBS="$LIBNCURSES_LIBS $LIBS"
found_ncurses=yes
],
found_ncurses=no found_ncurses=no
) )
if test "x$found_ncurses" = xno; then if test "x$found_ncurses" = xno; then
PKG_CHECK_MODULES(
LIBNCURSES,
ncursesw,
found_ncurses=yes,
found_ncurses=no
)
fi
if test "x$found_ncurses" = xyes; then
CPPFLAGS="$LIBNCURSES_CFLAGS $CPPFLAGS"
LIBS="$LIBNCURSES_LIBS $LIBS"
else
# pkg-config didn't work, try ncurses. # pkg-config didn't work, try ncurses.
AC_CHECK_LIB( AC_CHECK_LIB(
ncurses, ncurses,
@ -180,13 +186,14 @@ if test "x$found_ncurses" = xno; then
found_ncurses=yes, found_ncurses=yes,
found_ncurses=no found_ncurses=no
) )
AC_CHECK_HEADER( if test "x$found_ncurses" = xyes; then
ncurses.h, AC_CHECK_HEADER(
, ncurses.h,
found_ncurses=no) LIBS="$LIBS -lncurses",
found_ncurses=no)
fi
fi fi
if test "x$found_ncurses" = xyes; then if test "x$found_ncurses" = xyes; then
LIBS="$LIBS -lncurses"
AC_DEFINE(HAVE_NCURSES_H) AC_DEFINE(HAVE_NCURSES_H)
else else
# No ncurses, try curses. # No ncurses, try curses.