From patchwork Tue Jan 29 15:00:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 10786555 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 17F3E17E9 for ; Tue, 29 Jan 2019 16:09:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 026D02D10C for ; Tue, 29 Jan 2019 16:09:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E49BF2D113; Tue, 29 Jan 2019 16:09:23 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8A64B2D10C for ; Tue, 29 Jan 2019 16:09:23 +0000 (UTC) Received: from localhost ([127.0.0.1]:50818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goV3f-0006D4-8B for patchwork-qemu-devel@patchwork.kernel.org; Tue, 29 Jan 2019 10:12:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goUw9-0001W5-Vf for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:04:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goUuR-0003zg-8C for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:02:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59530) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1goUuQ-0003q2-Cj for qemu-devel@nongnu.org; Tue, 29 Jan 2019 10:02:43 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 72058C07C583; Tue, 29 Jan 2019 15:02:10 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A4AA160462; Tue, 29 Jan 2019 15:01:41 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Tue, 29 Jan 2019 16:00:28 +0100 Message-Id: <20190129150029.29829-5-philmd@redhat.com> In-Reply-To: <20190129150029.29829-1-philmd@redhat.com> References: <20190129150029.29829-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 29 Jan 2019 15:02:10 +0000 (UTC) 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 v3 4/5] 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?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Brad Smith Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Currently if we try to build QEMU on OpenBSD with SDL disabled, we get: $ ./configure --cc=x86_64-unknown-openbsd6.1-gcc-4.9.4 --python=python2.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 an informative "none". This does not change the default behavior: $ ./configure --cc=x86_64-unknown-openbsd6.1-gcc-4.9.4 --python=python2.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=x86_64-unknown-openbsd6.1-gcc-4.9.4 --python=python2.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é --- configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure b/configure index c7024d6662..df10601fee 100755 --- a/configure +++ b/configure @@ -3380,7 +3380,8 @@ for drv in $audio_drv_list; do sdl) if test "$sdl" = "no"; then - error_exit "sdl not found or disabled, can not use sdl audio driver" + echo "WARNING: SDL not found or disabled, can not use sdl audio driver" + audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/sdl *//g') fi ;; @@ -3417,6 +3418,9 @@ for drv in $audio_drv_list; do ;; esac done +if test -z "$audio_drv_list"; then + audio_drv_list="none" +fi ########################################## # BrlAPI probe