From nobody Sun Apr 28 20:00:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523262286991377.8882624045815; Mon, 9 Apr 2018 01:24:46 -0700 (PDT) Received: from localhost ([::1]:46951 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5S6Y-0003uT-85 for importer@patchew.org; Mon, 09 Apr 2018 04:24:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5S5T-0003CU-Nj for qemu-devel@nongnu.org; Mon, 09 Apr 2018 04:23:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5S5Q-0003mY-Ga for qemu-devel@nongnu.org; Mon, 09 Apr 2018 04:23:39 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:37074 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f5S5Q-0003kG-Ao for qemu-devel@nongnu.org; Mon, 09 Apr 2018 04:23:36 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5D43381A88A5; Mon, 9 Apr 2018 08:23:35 +0000 (UTC) Received: from xz-mi.redhat.com (ovpn-12-125.pek2.redhat.com [10.72.12.125]) by smtp.corp.redhat.com (Postfix) with ESMTP id AAB3A10F1C12; Mon, 9 Apr 2018 08:23:25 +0000 (UTC) From: Peter Xu To: qemu-devel@nongnu.org Date: Mon, 9 Apr 2018 16:23:23 +0800 Message-Id: <20180409082323.29575-1-peterx@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 09 Apr 2018 08:23:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 09 Apr 2018 08:23:35 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'peterx@redhat.com' RCPT:'' Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH] configure: don't warn GTK if disabled 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: Peter Maydell , Fam Zheng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , peterx@redhat.com, Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" We don't need to detect GTK ABI if GTK is disabled in general. Otherwise we could get this warning (when host is installed with GTK ABI version 2) even when configure with "--disable-gtk": WARNING: Use of GTK 2.0 is deprecated and will be removed in WARNING: future releases. Please switch to using GTK 3.0 CC: Paolo Bonzini CC: Gerd Hoffmann CC: Peter Maydell CC: Fam Zheng CC: "Philippe Mathieu-Daud=C3=A9" Signed-off-by: Peter Xu Reviewed-by: Daniel P. Berrang=C3=A9 --- configure | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/configure b/configure index 4d0e92c96c..ce67ad050e 100755 --- a/configure +++ b/configure @@ -2537,19 +2537,18 @@ fi ########################################## # GTK probe =20 -if test "$gtkabi" =3D ""; then - # The GTK ABI was not specified explicitly, so try whether 3.0 is avai= lable. - # Use 2.0 as a fallback if that is available. - if $pkg_config --exists "gtk+-3.0 >=3D 3.0.0"; then - gtkabi=3D3.0 - elif $pkg_config --exists "gtk+-2.0 >=3D 2.18.0"; then - gtkabi=3D2.0 - else - gtkabi=3D3.0 - fi -fi - if test "$gtk" !=3D "no"; then + if test "$gtkabi" =3D ""; then + # The GTK ABI was not specified explicitly, so try whether 3.0 is = available. + # Use 2.0 as a fallback if that is available. + if $pkg_config --exists "gtk+-3.0 >=3D 3.0.0"; then + gtkabi=3D3.0 + elif $pkg_config --exists "gtk+-2.0 >=3D 2.18.0"; then + gtkabi=3D2.0 + else + gtkabi=3D3.0 + fi + fi gtkpackage=3D"gtk+-$gtkabi" gtkx11package=3D"gtk+-x11-$gtkabi" if test "$gtkabi" =3D "3.0" ; then --=20 2.14.3