From nobody Fri Nov 7 15:31:46 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.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 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548292999906381.75368156119384; Wed, 23 Jan 2019 17:23:19 -0800 (PST) Received: from localhost ([127.0.0.1]:44578 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmTjd-0000rY-P8 for importer@patchew.org; Wed, 23 Jan 2019 20:23:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmTcr-00049Y-FO for qemu-devel@nongnu.org; Wed, 23 Jan 2019 20:16:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmTcq-0000ac-NY for qemu-devel@nongnu.org; Wed, 23 Jan 2019 20:16:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50806) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gmTcq-0000YF-I6 for qemu-devel@nongnu.org; Wed, 23 Jan 2019 20:16:12 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BB5CD2CD811; Thu, 24 Jan 2019 01:16:11 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-27.brq.redhat.com [10.40.204.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 83C5065947; Thu, 24 Jan 2019 01:16:09 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Thu, 24 Jan 2019 02:15:53 +0100 Message-Id: <20190124011554.25418-4-philmd@redhat.com> In-Reply-To: <20190124011554.25418-1-philmd@redhat.com> References: <20190124011554.25418-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 24 Jan 2019 01:16:11 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 3/4] configure: Let SDL support be optional on OpenBSD 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: Fam Zheng , Peter Maydell , Michael Walle , Gerd Hoffmann , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Brad Smith Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Currently if we try to build QEMU on OpenBSD with SDL disabled, we get: $ ./configure --cc=3Dx86_64-unknown-openbsd6.1-gcc-4.9.4 --python=3Dpytho= n2.7 --disable-sdl ERROR: sdl not found or disabled, can not use sdl audio driver Since SDL is not a requirement for OpenBSD, let it be optional. If it is not found, or the user explicitly disable it, remove it from the audio_drv_list. If no audio backends are available, QEMU will fall back to the null driver. Instead of displaying nothing when audio_drv_list ends up empty, display "none". This does not change the default behavior: $ ./configure --cc=3Dx86_64-unknown-openbsd6.1-gcc-4.9.4 --python=3Dpytho= n2.7 SDL support yes (1.2.15) Audio drivers sdl WARNING: Use of SDL 1.2 is deprecated and will be removed in WARNING: future releases. Please switch to using SDL 2.0 GEN config-host.h ... but allows to build without SDL: $ ./configure --cc=3Dx86_64-unknown-openbsd6.1-gcc-4.9.4 --python=3Dpytho= n2.7 --disable-sdl WARN: sdl not found or disabled, can not use sdl audio driver SDL support no Audio drivers none GEN config-host.h ... Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure b/configure index d50defceb7..fa444e9921 100755 --- a/configure +++ b/configure @@ -3379,7 +3379,8 @@ for drv in $audio_drv_list; do =20 sdl) if test "$sdl" =3D "no"; then - error_exit "sdl not found or disabled, can not use sdl audio drive= r" + echo "WARN: sdl not found or disabled, can not use sdl audio drive= r" + audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/sdl *//g') fi ;; =20 @@ -3408,6 +3409,9 @@ for drv in $audio_drv_list; do ;; esac done +if test -z "$audio_drv_list"; then + audio_drv_list=3D"none" +fi =20 ########################################## # BrlAPI probe --=20 2.20.1