From nobody Tue Feb 10 17:08:21 2026 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 1523352414748191.77218607898635; Tue, 10 Apr 2018 02:26:54 -0700 (PDT) Received: from localhost ([::1]:56925 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5pYD-0006dt-PI for importer@patchew.org; Tue, 10 Apr 2018 05:26:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5pWE-0004jo-6R for qemu-devel@nongnu.org; Tue, 10 Apr 2018 05:24:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5pWD-0006Vm-4f for qemu-devel@nongnu.org; Tue, 10 Apr 2018 05:24:50 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57994 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-0006UT-VM for qemu-devel@nongnu.org; Tue, 10 Apr 2018 05:24:49 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 37652818AAEE; Tue, 10 Apr 2018 09:24:48 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-121.ams2.redhat.com [10.36.116.121]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9D9612026E03; Tue, 10 Apr 2018 09:24:47 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id CF4EC9C400; Tue, 10 Apr 2018 11:24:46 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 10 Apr 2018 11:24:46 +0200 Message-Id: <20180410092446.26903-5-kraxel@redhat.com> In-Reply-To: <20180410092446.26903-1-kraxel@redhat.com> References: <20180410092446.26903-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 10 Apr 2018 09:24:48 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 10 Apr 2018 09:24:48 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@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] [PULL 4/4] configure: don't warn SDL abi 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 , Peter Xu , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , 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" From: Peter Xu SDL has the same problem as GTK that we might get warnings on SDL ABI version even if SDL is disabled. Fix that by only probing SDL if SDL is enabled. Also this should let configure be a little bit faster since we don't really need to probe SDL stuff when it's off. CC: Paolo Bonzini CC: Gerd Hoffmann CC: Peter Maydell CC: Daniel P. Berrange CC: Fam Zheng CC: "Philippe Mathieu-Daud=C3=A9" Signed-off-by: Peter Xu Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Fam Zheng Message-id: 20180410054034.20479-1-peterx@redhat.com Signed-off-by: Gerd Hoffmann --- configure | 87 ++++++++++++++++++++++++++++++++++-------------------------= ---- 1 file changed, 47 insertions(+), 40 deletions(-) diff --git a/configure b/configure index 931d2a07cc..0a19b033bc 100755 --- a/configure +++ b/configure @@ -2835,49 +2835,52 @@ fi # Look for sdl configuration program (pkg-config or sdl-config). Try # sdl-config even without cross prefix, and favour pkg-config over sdl-con= fig. =20 -if test "$sdlabi" =3D ""; then - if $pkg_config --exists "sdl2"; then - sdlabi=3D2.0 - elif $pkg_config --exists "sdl"; then - sdlabi=3D1.2 - else - sdlabi=3D2.0 +sdl_probe () +{ + sdl_too_old=3Dno + if test "$sdlabi" =3D ""; then + if $pkg_config --exists "sdl2"; then + sdlabi=3D2.0 + elif $pkg_config --exists "sdl"; then + sdlabi=3D1.2 + else + sdlabi=3D2.0 + fi + fi + + if test $sdlabi =3D "2.0"; then + sdl_config=3D$sdl2_config + sdlname=3Dsdl2 + sdlconfigname=3Dsdl2_config + elif test $sdlabi =3D "1.2"; then + sdlname=3Dsdl + sdlconfigname=3Dsdl_config + else + error_exit "Unknown sdlabi $sdlabi, must be 1.2 or 2.0" + fi + + if test "$(basename $sdl_config)" !=3D $sdlconfigname && ! has ${sdl_con= fig}; then + sdl_config=3D$sdlconfigname + fi + + if $pkg_config $sdlname --exists; then + sdlconfig=3D"$pkg_config $sdlname" + sdlversion=3D$($sdlconfig --modversion 2>/dev/null) + elif has ${sdl_config}; then + sdlconfig=3D"$sdl_config" + sdlversion=3D$($sdlconfig --version) + else + if test "$sdl" =3D "yes" ; then + feature_not_found "sdl" "Install SDL2-devel" fi -fi - -if test $sdlabi =3D "2.0"; then - sdl_config=3D$sdl2_config - sdlname=3Dsdl2 - sdlconfigname=3Dsdl2_config -elif test $sdlabi =3D "1.2"; then - sdlname=3Dsdl - sdlconfigname=3Dsdl_config -else - error_exit "Unknown sdlabi $sdlabi, must be 1.2 or 2.0" -fi - -if test "$(basename $sdl_config)" !=3D $sdlconfigname && ! has ${sdl_confi= g}; then - sdl_config=3D$sdlconfigname -fi - -if $pkg_config $sdlname --exists; then - sdlconfig=3D"$pkg_config $sdlname" - sdlversion=3D$($sdlconfig --modversion 2>/dev/null) -elif has ${sdl_config}; then - sdlconfig=3D"$sdl_config" - sdlversion=3D$($sdlconfig --version) -else - if test "$sdl" =3D "yes" ; then - feature_not_found "sdl" "Install SDL2-devel" + sdl=3Dno + # no need to do the rest + return + fi + if test -n "$cross_prefix" && test "$(basename "$sdlconfig")" =3D sdl-co= nfig; then + echo warning: using "\"$sdlconfig\"" to detect cross-compiled sdl >&2 fi - sdl=3Dno -fi -if test -n "$cross_prefix" && test "$(basename "$sdlconfig")" =3D sdl-conf= ig; then - echo warning: using "\"$sdlconfig\"" to detect cross-compiled sdl >&2 -fi =20 -sdl_too_old=3Dno -if test "$sdl" !=3D "no" ; then cat > $TMPC << EOF #include #undef main /* We don't want SDL to override our main() */ @@ -2919,6 +2922,10 @@ EOF fi sdl=3Dno fi # sdl compile test +} + +if test "$sdl" !=3D "no" ; then + sdl_probe fi =20 if test "$sdl" =3D "yes" ; then --=20 2.9.3