From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3mlH-0000sv-OW for qemu-devel@nongnu.org; Mon, 07 Nov 2016 11:27:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3mlC-0006Mo-Oh for qemu-devel@nongnu.org; Mon, 07 Nov 2016 11:27:07 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:50495 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 1c3mlC-0006Mf-JM for qemu-devel@nongnu.org; Mon, 07 Nov 2016 11:27:02 -0500 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uA7GNWmV063937 for ; Mon, 7 Nov 2016 11:27:01 -0500 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0b-001b2d01.pphosted.com with ESMTP id 26juyexewd-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 07 Nov 2016 11:27:01 -0500 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 7 Nov 2016 16:27:00 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id C93121B0807A for ; Mon, 7 Nov 2016 16:29:09 +0000 (GMT) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id uA7GQvuU38928608 for ; Mon, 7 Nov 2016 16:26:57 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id uA7GQvej025007 for ; Mon, 7 Nov 2016 11:26:57 -0500 Date: Mon, 7 Nov 2016 17:26:56 +0100 From: Cornelia Huck In-Reply-To: References: <20161107133833.3681-1-msuchanek@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20161107172656.1b2c59bb.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: Peter Maydell Cc: Michal Suchanek , QEMU Developers On Mon, 7 Nov 2016 13:55:29 +0000 Peter Maydell wrote: > On 7 November 2016 at 13:38, Michal Suchanek wrote: > > ncurses version in SUSE does not have .pc files so this is still needed to > > build from git. > > > > Signed-off-by: Michal Suchanek > > --- > > configure | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/configure b/configure > > index fd6f898..aab70ef 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:" > > curses_lib_list="$($pkg_config --libs ncursesw 2>/dev/null):-lncursesw:-lcursesw" > > I think this will produce malformed output on platforms where > pkg-config does output something useful: > -D_GNU_SOURCE -I/usr/include/ncursesw-I/usr/include/ncursesw: > > because there's no colon after the ')'. > > In fact this code looks kind of dubious in general, because > it seems to assume that the output of pkg_config never has > a ':' in it... Didn't see the original patch (mailing list slow?), but I have the same problem on a SLES12SP1 system (reported some days ago). The following seems to fix it for me (I can send it with a proper s-o-b if this looks good). Systems that don't have any cursesw hopefully still fail properly (I don't have one around to test, though.) diff --git a/configure b/configure index fd6f898..825f2b3 100755 --- a/configure +++ b/configure @@ -2927,6 +2927,10 @@ if test "$curses" != "no" ; then curses_lib_list="$($pkg_config --libs ncurses 2>/dev/null):-lpdcurses" else curses_inc_list="$($pkg_config --cflags ncursesw 2>/dev/null):" + if [ "$curses_inc_list" == ":" ]; then + # some systems don't provide a proper .pc file for ncursesw + curses_inc_list="-I/usr/include/ncursesw:" + fi curses_lib_list="$($pkg_config --libs ncursesw 2>/dev/null):-lncursesw:-lcursesw" fi curses_found=no