Ticket #1682: acinclude.m4.diff2

File acinclude.m4.diff2, 788 bytes (added by nicm, 7 years ago)
Line 
1diff --git a/acinclude.m4 b/acinclude.m4
2index b623a82..5e9d0d4 100644
3--- a/acinclude.m4
4+++ b/acinclude.m4
5@@ -350,11 +350,16 @@ AC_ARG_ENABLE(ncursestest, [  --disable-ncursestest       Do not try to compile
6   AC_MSG_CHECKING(for ncurses - wide char support)
7   no_ncurses=""
8   if test "$NCURSES_CONFIG" = "no" ; then
9-    no_ncurses=yes
10-  else
11+    AC_MSG_RESULT(no)
12+    AC_SEARCH_LIBS(setupterm, ncursesw, [NCURSES_LIBS="-lncursesw"], no_ncurses=no)
13+  else
14+    AC_MSG_RESULT(yes)
15     NCURSES_CFLAGS=`$NCURSES_CONFIG $ncurses_args --cflags`
16     NCURSES_LIBS=`$NCURSES_CONFIG $ncurses_args --libs`
17+  fi
18 
19+  if test "x$no_ncurses" = x ; then
20+    AC_MSG_CHECKING(if ncurses works)
21     ac_save_CFLAGS="$CFLAGS"
22     ac_save_LIBS="$LIBS"
23     CFLAGS="$CFLAGS $NCURSES_CFLAGS"