From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5pWD-0004jX-Tw for qemu-devel@nongnu.org; Tue, 10 Apr 2018 05:24:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5pWC-0006VS-UT for qemu-devel@nongnu.org; Tue, 10 Apr 2018 05:24:49 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:32778 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 1f5pWC-0006U5-QL for qemu-devel@nongnu.org; Tue, 10 Apr 2018 05:24:48 -0400 From: Gerd Hoffmann Date: Tue, 10 Apr 2018 11:24:45 +0200 Message-Id: <20180410092446.26903-4-kraxel@redhat.com> In-Reply-To: <20180410092446.26903-1-kraxel@redhat.com> References: <20180410092446.26903-1-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 3/4] configure: don't warn GTK if disabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Peter Xu , Paolo Bonzini , Peter Maydell , Fam Zheng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= From: Peter Xu 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 Message-id: 20180409082323.29575-1-peterx@redhat.com Signed-off-by: Gerd Hoffmann --- configure | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/configure b/configure index 752dd9ef32..931d2a07cc 100755 --- a/configure +++ b/configure @@ -2540,19 +2540,18 @@ fi ########################################## # GTK probe =20 -if test "$gtkabi" =3D ""; then - # The GTK ABI was not specified explicitly, so try whether 3.0 is av= ailable. - # 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 i= s 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.9.3