Cornelia Huck, on Mon 31 Oct 2016 13:08:06 +0100, wrote:
> You mean in configure, right? Including cursesw.h in the test program
> gets configure going again.

Could you try the attached patch which fixes both configure and
ui/curses.c?

Thanks,
Samuel
diff --git a/configure b/configure
index f83cdf8..bae01f0 100755
--- a/configure
+++ b/configure
@@ -2920,13 +2920,17 @@ if test "$curses" != "no" ; then
     curses_inc_list="$($pkg_config --cflags ncurses 2>/dev/null):"
     curses_lib_list="$($pkg_config --libs ncurses 2>/dev/null):-lpdcurses"
   else
-    curses_inc_list="$($pkg_config --cflags ncursesw 2>/dev/null):"
+    curses_inc_list="$($pkg_config --cflags ncursesw 
2>/dev/null):-DCONFIG_CURSESW_H:"
     curses_lib_list="$($pkg_config --libs ncursesw 
2>/dev/null):-lncursesw:-lcursesw"
   fi
   curses_found=no
   cat > $TMPC << EOF
 #include <locale.h>
+#ifdef CONFIG_CURSESW_H
+#include <cursesw.h>
+#else
 #include <curses.h>
+#endif
 #include <wchar.h>
 int main(void) {
   const char *s = curses_version();
@@ -2949,6 +2953,9 @@ EOF
         break
       fi
     done
+    if test "$curses_found" = yes ; then
+      break
+    fi
   done
   unset IFS
   if test "$curses_found" = "yes" ; then
diff --git a/ui/curses.c b/ui/curses.c
index 2e132a7..cb61073 100644
--- a/ui/curses.c
+++ b/ui/curses.c
@@ -22,7 +22,11 @@
  * THE SOFTWARE.
  */
 #include "qemu/osdep.h"
+#ifdef CONFIG_CURSESW_H
+#include <cursesw.h>
+#else
 #include <curses.h>
+#endif
 
 #ifndef _WIN32
 #include <sys/ioctl.h>

Reply via email to