From patchwork Mon Nov 7 16:26:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 9415465 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 96E3060585 for ; Mon, 7 Nov 2016 16:27:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88CAD28B7B for ; Mon, 7 Nov 2016 16:27:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BF7728BED; Mon, 7 Nov 2016 16:27:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 086B928B7B for ; Mon, 7 Nov 2016 16:27:32 +0000 (UTC) Received: from localhost ([::1]:55076 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3mlf-0000uN-Bu for patchwork-qemu-devel@patchwork.kernel.org; Mon, 07 Nov 2016 11:27:31 -0500 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 d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 7 Nov 2016 16:26:58 -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 Received: from gondolin (dyn-9-152-224-150.boeblingen.de.ibm.com [9.152.224.150]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id uA7GQvoR025002; Mon, 7 Nov 2016 11:26:57 -0500 Date: Mon, 7 Nov 2016 17:26:56 +0100 From: Cornelia Huck To: Peter Maydell In-Reply-To: References: <20161107133833.3681-1-msuchanek@suse.de> Organization: IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Martina Koederitz =?UTF-8?B?R2VzY2jDpGZ0c2bDvGhydW5nOg==?= Dirk Wittkopp Sitz der Gesellschaft: =?UTF-8?B?QsO2Ymxpbmdlbg==?= Registergericht: Amtsgericht Stuttgart, HRB 243294 X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16110716-0040-0000-0000-000002FCFE93 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16110716-0041-0000-0000-00001DC1FC77 Message-Id: <20161107172656.1b2c59bb.cornelia.huck@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-11-07_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611070302 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.158.5 Subject: Re: [Qemu-devel] [PATCH] Fix legacy ncurses detection. 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: Michal Suchanek , QEMU Developers Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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