From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1BsG-00009a-Ot for qemu-devel@nongnu.org; Mon, 31 Oct 2016 08:39:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1BsC-000357-KT for qemu-devel@nongnu.org; Mon, 31 Oct 2016 08:39:36 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:47063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1BsC-00034V-EN for qemu-devel@nongnu.org; Mon, 31 Oct 2016 08:39:32 -0400 Date: Mon, 31 Oct 2016 13:39:30 +0100 From: Samuel Thibault Message-ID: <20161031123930.GM3671@var.home> References: <1477656698-13569-1-git-send-email-kraxel@redhat.com> <1477656698-13569-7-git-send-email-kraxel@redhat.com> <20161031124530.2aad6ed6.cornelia.huck@de.ibm.com> <20161031120159.GH3671@var.home> <20161031130806.272eef44.cornelia.huck@de.ibm.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="OgqxwSJOaUobr8KG" Content-Disposition: inline In-Reply-To: <20161031130806.272eef44.cornelia.huck@de.ibm.com> Subject: Re: [Qemu-devel] [PULL 6/6] curses: Use cursesw instead of curses List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: Gerd Hoffmann , qemu-devel@nongnu.org --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch 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 +#ifdef CONFIG_CURSESW_H +#include +#else #include +#endif #include 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 +#else #include +#endif #ifndef _WIN32 #include --OgqxwSJOaUobr8KG--