---- wine-0.9.13/configure.ac.old 2006-05-19 12:01:20.424979808 +0200
-+++ wine-0.9.13/configure.ac 2006-05-19 12:01:49.894499760 +0200
-@@ -201,6 +201,7 @@
- machine/soundcard.h \
+diff -dur wine-1.8.orig/configure.ac wine-1.8/configure.ac
+--- wine-1.8.orig/configure.ac 2015-12-19 16:57:44.000000000 +0100
++++ wine-1.8/configure.ac 2016-01-09 18:16:41.889401226 +0100
+@@ -450,6 +450,7 @@
+ machine/sysarch.h \
mntent.h \
ncurses.h \
+ ncurses/ncurses.h \
netdb.h \
netinet/in.h \
netinet/in_systm.h \
-@@ -528,7 +529,7 @@
- CURSESLIBS=""
- if test "x$with_curses" != "xno"
+@@ -1274,9 +1275,12 @@
+
+ dnl **** Check which curses lib to use ***
+ CURSES_LIBS=""
+-if test "$ac_cv_header_ncurses_h" = "yes"
++if test "$ac_cv_header_ncurses_h" = "yes" || test "$ac_cv_header_ncurses_ncurses_h" = "yes"
+ then
+ WINE_CHECK_SONAME(ncurses,waddch,[CURSES_LIBS="-lncurses"],,,[[libncursesw\\{0,1\\}]])
++ if test "x$ac_cv_lib_soname_ncurses" = "x"; then
++ WINE_CHECK_SONAME(ncursesw,waddch,[CURSESLIBS="-lncursesw"])
++ fi
+ elif test "$ac_cv_header_curses_h" = "yes"
then
-- if test "$ac_cv_header_ncurses_h" = "yes"
-+ if test "$ac_cv_header_ncurses_h" = "yes" || test "$ac_cv_header_ncurses_ncurses_h" = "yes"
- then
- AC_CHECK_LIB(ncurses,waddch,
- [AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have the ncurses library (-lncurses)])
---- wine-0.9.13/programs/wineconsole/curses.c.old 2006-05-19 12:01:34.492841168 +0200
-+++ wine-0.9.13/programs/wineconsole/curses.c 2006-05-19 12:04:32.524776200 +0200
-@@ -37,6 +37,8 @@
- #include <stdlib.h>
- #ifdef HAVE_NCURSES_H
+ WINE_CHECK_SONAME(curses,waddch,[CURSES_LIBS="-lcurses"])
+@@ -1285,8 +1289,8 @@
+ LIBS="$LIBS $CURSES_LIBS"
+ AC_CHECK_FUNCS(mousemask)
+ LIBS="$ac_save_LIBS"
+-WINE_NOTICE_WITH(curses,[test "x$ac_cv_lib_soname_curses$ac_cv_lib_soname_ncurses" = "x"],
+- [lib(n)curses ${notice_platform}development files not found, curses won't be supported.])
++WINE_NOTICE_WITH(curses,[test "x$ac_cv_lib_soname_curses$ac_cv_lib_soname_ncurses$ac_cv_lib_soname_ncursesw" = "x"],
++ [lib(n)curses(w) ${notice_platform}development files not found, curses won't be supported.])
+
+ dnl **** Check for SANE ****
+ if test "x$with_sane" != "xno"
+diff -dur wine-1.8.orig/dlls/kernel32/term.c wine-1.8/dlls/kernel32/term.c
+--- wine-1.8.orig/dlls/kernel32/term.c 2015-12-19 16:57:44.000000000 +0100
++++ wine-1.8/dlls/kernel32/term.c 2016-01-09 18:15:39.868921555 +0100
+@@ -27,6 +27,8 @@
# include <ncurses.h>
-+#elif defined(HAVE_NCURSES_NCURSES_H)
-+# include <ncurses/ncurses.h>
#elif defined(HAVE_CURSES_H)
# include <curses.h>
++#elif defined(HAVE_NCURSES_NCURSES_H)
++# include <ncurses/ncurses.h>
+ #endif
+ /* avoid redefinition warnings */
+ #undef KEY_EVENT
+@@ -34,6 +36,8 @@
+
+ #if defined(HAVE_CURSES_H) || defined(HAVE_NCURSES_H)
+ #include <term.h>
++#elif defined(HAVE_NCURSES_NCURSES_H)
++#include <ncurses/term.h>
#endif
-@@ -57,9 +59,9 @@
- #define PRIVATE(data) ((struct inner_data_curse*)((data)->private))
+ #include <windef.h>
+@@ -148,7 +152,7 @@
--#if defined(HAVE_CURSES_H) || defined(HAVE_NCURSES_H)
-+#if defined(HAVE_CURSES_H) || defined(HAVE_NCURSES_H) || defined(HAVE_NCURSES_NCURSES_H)
+ #if defined(SONAME_LIBCURSES) || defined(SONAME_LIBNCURSES)
-#ifdef HAVE_NCURSES_H
-+#if defined(HAVE_NCURSES_H) || defined(HAVE_NCURSES_NCURSES_H)
++#ifdef HAVE_NCURSES_H || defined(HAVE_NCURSES_NCURSES_H)
# define CURSES_NAME "ncurses"
#else
# define CURSES_NAME "curses"
-@@ -115,7 +117,7 @@
+diff -dur wine-1.8.orig/programs/wineconsole/curses.c wine-1.8/programs/wineconsole/curses.c
+--- wine-1.8.orig/programs/wineconsole/curses.c 2015-12-19 16:57:44.000000000 +0100
++++ wine-1.8/programs/wineconsole/curses.c 2016-01-09 18:15:39.872254915 +0100
+@@ -40,6 +40,8 @@
+ # include <ncurses.h>
+ #elif defined(HAVE_CURSES_H)
+ # include <curses.h>
++#elif defined(HAVE_NCURSES_NCURSES_H)
++# include <ncurses/ncurses.h>
+ #endif
+ /* avoid redefinition warnings */
+ #undef KEY_EVENT
+@@ -64,7 +66,7 @@
+
+ #if defined(SONAME_LIBCURSES) || defined(SONAME_LIBNCURSES)
- static BOOL WCCURSES_bind_libcurses(void)
- {
-#ifdef HAVE_NCURSES_H
+#if defined(HAVE_NCURSES_H) || defined(HAVE_NCURSES_NCURSES_H)
- static const char *ncname = SONAME_LIBNCURSES;
+ # define CURSES_NAME "ncurses"
#else
- static const char *ncname = SONAME_LIBCURSES;
+ # define CURSES_NAME "curses"