From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c44h8-0006Nh-Dy for qemu-devel@nongnu.org; Tue, 08 Nov 2016 06:36:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c44h3-0004rb-F4 for qemu-devel@nongnu.org; Tue, 08 Nov 2016 06:36:02 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:45127 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c44h3-0004ES-37 for qemu-devel@nongnu.org; Tue, 08 Nov 2016 06:35:57 -0500 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uA8BYKFn023887 for ; Tue, 8 Nov 2016 06:34:55 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 26ka1wyfx5-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 08 Nov 2016 06:34:55 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 8 Nov 2016 11:34:53 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 4E0761B0805F for ; Tue, 8 Nov 2016 11:37:04 +0000 (GMT) Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id uA8BYpBK41812160 for ; Tue, 8 Nov 2016 11:34:51 GMT Received: from d06av04.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id uA8BYpZ9008971 for ; Tue, 8 Nov 2016 04:34:51 -0700 Date: Tue, 8 Nov 2016 12:34:49 +0100 From: Cornelia Huck In-Reply-To: <20161107220741.GL2367@var.home> References: <20161107220741.GL2367@var.home> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20161108123449.0e031320.cornelia.huck@de.ibm.com> Subject: Re: [Qemu-devel] [PATCH] Fix legacy ncurses detection. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Samuel Thibault Cc: Peter Maydell , Michal Suchanek , QEMU Developers On Mon, 7 Nov 2016 23:07:41 +0100 Samuel Thibault wrote: > Hello, > > On 7 November 2016 at 13:38, Michal Suchanek wrote: > > - curses_inc_list="$($pkg_config --cflags ncursesw 2>/dev/null):" > > + curses_inc_list="$($pkg_config --cflags ncursesw 2>/dev/null)-I/usr/include/ncursesw:" > > Cornelia Huck, on Mon 07 Nov 2016 17:26:56 +0100, wrote: > > + if [ "$curses_inc_list" == ":" ]; then > > + # some systems don't provide a proper .pc file for ncursesw > > + curses_inc_list="-I/usr/include/ncursesw:" > > + fi > > Could you rather try the attached patch? > diff --git a/configure b/configure > index fd6f898..e200aa8 100755 > --- a/configure > +++ b/configure > @@ -2926,7 +2926,7 @@ 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):-I/usr/include/ncursesw:" This arrives at curses_inc_list=":-I/usr/include/ncursesw:" which causes the parser below to start with an empty curses_inc (with : as separator). configure fails as before (with -Werror; passes without). > curses_lib_list="$($pkg_config --libs ncursesw 2>/dev/null):-lncursesw:-lcursesw" > fi > curses_found=no > @@ -2955,6 +2955,9 @@ EOF > break > fi > done > + if test "$curses_found" = yes ; then > + break > + fi Breaking out as soon as we've found a working config seems like a good idea, but I don't think it's related to this issue. > done > unset IFS > if test "$curses_found" = "yes" ; then I still like my version best :/