Skip to content

Commit

Permalink
Look for ncursesw as well as ncurses, based on a change from Bert van…
Browse files Browse the repository at this point in the history
… Hall.
  • Loading branch information
nicm committed Jan 19, 2017
1 parent b98b4e2 commit 61af9d7
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions configure.ac
Expand Up @@ -164,29 +164,36 @@ fi
PKG_CHECK_MODULES(
LIBNCURSES,
ncurses,
[
AM_CFLAGS="$LIBNCURSES_CFLAGS $AM_CFLAGS"
CFLAGS="$AM_CFLAGS $SAVED_CFLAGS"
LIBS="$LIBNCURSES_LIBS $LIBS"
found_ncurses=yes
],
found_ncurses=yes,
found_ncurses=no
)
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.
AC_CHECK_LIB(
ncurses,
setupterm,
found_ncurses=yes,
found_ncurses=no
)
AC_CHECK_HEADER(
ncurses.h,
,
found_ncurses=no)
if test "x$found_ncurses" = xyes; then
AC_CHECK_HEADER(
ncurses.h,
LIBS="$LIBS -lncurses",
found_ncurses=no)
fi
fi
if test "x$found_ncurses" = xyes; then
LIBS="$LIBS -lncurses"
AC_DEFINE(HAVE_NCURSES_H)
else
# No ncurses, try curses.
Expand Down

0 comments on commit 61af9d7

Please sign in to comment.