From patchwork Mon Oct 31 12:39:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 689286 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3t6v8n3C2Qz9ryQ for ; Mon, 31 Oct 2016 23:40:25 +1100 (AEDT) Received: from localhost ([::1]:35347 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1Bt0-0000f5-NW for incoming@patchwork.ozlabs.org; Mon, 31 Oct 2016 08:40:22 -0400 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 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 7266B6DC7; Mon, 31 Oct 2016 13:39:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fpHnfQ8RplaH; Mon, 31 Oct 2016 13:39:30 +0100 (CET) Received: from var.youpi.perso.aquilenet.fr (unknown [IPv6:2a01:cb19:181:c200:3602:86ff:fe2c:6a19]) by hera.aquilenet.fr (Postfix) with ESMTPSA id CFD0F1FA6; Mon, 31 Oct 2016 13:39:30 +0100 (CET) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.87) (envelope-from ) id 1c1BsA-00007W-Ao; Mon, 31 Oct 2016 13:39:30 +0100 Date: Mon, 31 Oct 2016 13:39:30 +0100 From: Samuel Thibault To: Cornelia Huck 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-Disposition: inline In-Reply-To: <20161031130806.272eef44.cornelia.huck@de.ibm.com> User-Agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 141.255.128.1 Subject: Re: [Qemu-devel] [PULL 6/6] curses: Use cursesw instead of curses X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 +#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