From nobody Mon Feb 9 16:19:00 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1611624791; cv=none; d=zohomail.com; s=zohoarc; b=HQH4JZrhMy3GE0gPHDqcCLAODEafwhjQ47V7egAXkwopF5u8lH+8wD/SUV6HZRfdIiMB0lpWgq4FJfC+dcYgKVptFOzPQsPCp+qAPRKCKKQZjjDFDBcO3U7pitcYBSycXqc9UaSBbv9AsA6yr0KveypGN6d28RT7nsO3CiMmKvE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611624791; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=QgHwr+XWD/Cd3L80cQ4A0uAggOcUqWGoJtisPtR4O0c=; b=RmdibQwDghJwVAxFI6eIlJnRJuEFu+sNgkVfz6+chd1Y8Uw+ZzUTtZ3qkZDGxruTjt6V1nhOt8PAURGS+KujZSCNSNA0c9CCDr8BvO9lTRdVsdsvVy5dMnTv5XrsT7yV3iAQO+hBctSqtObxWI+Cw9TqwnFU/nRaiymW6Fd55QY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161162479139994.17552657117778; Mon, 25 Jan 2021 17:33:11 -0800 (PST) Received: from localhost ([::1]:50274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4DEE-0002ks-8a for importer@patchew.org; Mon, 25 Jan 2021 20:33:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4D6X-0005f5-7h for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:22 -0500 Received: from mail-pg1-f171.google.com ([209.85.215.171]:36157) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4D6V-0006B1-2Z for qemu-devel@nongnu.org; Mon, 25 Jan 2021 20:25:12 -0500 Received: by mail-pg1-f171.google.com with SMTP id c132so10189459pga.3 for ; Mon, 25 Jan 2021 17:25:10 -0800 (PST) Received: from Yifans-Mac-Mini.hsd1.ca.comcast.net. ([98.35.5.7]) by smtp.gmail.com with ESMTPSA id o14sm536921pjf.12.2021.01.25.17.25.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jan 2021 17:25:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QgHwr+XWD/Cd3L80cQ4A0uAggOcUqWGoJtisPtR4O0c=; b=rfGnKTOqMXxQQWc/9Tte6vLT1D9n9/BsGEV32vaO+qbuzarqjVbaJnNVXO1kQfPUoX QebKY9HuTq2XV02Al6obDMCCLWPDGabSkn6M6Tem7yBjN6KkfYsjN1S5N7fsr1gDvn6C sa0faL4ilek/zNspqOdwxXCsoGUxFNiednJfA//vVwsOZp0HbJ6KeFj8md9QAwGjtx9i Wr5hmSJCQ3B/gyqU4dEqGD1x66PfuhqTHYBvGAwJY5Max8MtNrZJzijMdg2muhz3kKye EUJfi2ZszTWGVx0FFWgiZ/mkSsGBO5DIWeMXDX7fObDw7P8R+GNrUo6bu3oRoQ7GbFLq dzGg== X-Gm-Message-State: AOAM533bwIU6K+zf6I3CqMqnafRCN/N4vSzII4t56hBAHQcF680Slkr7 S+hOOGDf9DVdwIdWIcCh05zVbRVyxeE= X-Google-Smtp-Source: ABdhPJzCeBDu8AeicKtmEGN5VZygwjeATZZQ3fCFvDG9uSi6LeI+DN6cB84q+/ZdkNRxoUIhFfMJpw== X-Received: by 2002:aa7:9d84:0:b029:1bc:cebe:a15b with SMTP id f4-20020aa79d840000b02901bccebea15bmr2960367pfq.57.1611624309593; Mon, 25 Jan 2021 17:25:09 -0800 (PST) From: Joelle van Dyne To: qemu-devel@nongnu.org Subject: [PATCH v9 10/11] darwin: detect CoreAudio for build Date: Mon, 25 Jan 2021 17:24:56 -0800 Message-Id: <20210126012457.39046-11-j@getutm.app> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210126012457.39046-1-j@getutm.app> References: <20210126012457.39046-1-j@getutm.app> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=209.85.215.171; envelope-from=osy86github@gmail.com; helo=mail-pg1-f171.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joelle van Dyne Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" On iOS there is no CoreAudio, so we should not assume Darwin always has it. Signed-off-by: Joelle van Dyne Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- configure | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/configure b/configure index fddd11fed9..89836f8692 100755 --- a/configure +++ b/configure @@ -319,6 +319,7 @@ fdt=3D"auto" netmap=3D"no" sdl=3D"auto" sdl_image=3D"auto" +coreaudio=3D"auto" virtiofsd=3D"auto" virtfs=3D"auto" libudev=3D"auto" @@ -779,7 +780,7 @@ Darwin) QEMU_CFLAGS=3D"-arch x86_64 $QEMU_CFLAGS" QEMU_LDFLAGS=3D"-arch x86_64 $QEMU_LDFLAGS" fi - audio_drv_list=3D"coreaudio try-sdl" + audio_drv_list=3D"try-coreaudio try-sdl" audio_possible_drivers=3D"coreaudio sdl" # Disable attempts to use ObjectiveC features in os/object.h since they # won't work when we're compiling with gcc as a C compiler. @@ -3162,6 +3163,24 @@ EOF fi fi =20 +########################################## +# detect CoreAudio +if test "$coreaudio" !=3D "no" ; then + coreaudio_libs=3D"-framework CoreAudio" + cat > $TMPC << EOF +#include +int main(void) +{ + return (int)AudioGetCurrentHostTime(); +} +EOF + if compile_prog "" "$coreaudio_libs" ; then + coreaudio=3Dyes + else + coreaudio=3Dno + fi +fi + ########################################## # Sound support libraries probe =20 @@ -3218,8 +3237,20 @@ for drv in $audio_drv_list; do fi ;; =20 - coreaudio) + coreaudio | try-coreaudio) + if test "$coreaudio" =3D "no"; then + if test "$drv" =3D "try-coreaudio"; then + audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-coreaudi= o//') + else + error_exit "$drv check failed" \ + "Make sure to have the $drv is available." + fi + else coreaudio_libs=3D"-framework CoreAudio" + if test "$drv" =3D "try-coreaudio"; then + audio_drv_list=3D$(echo "$audio_drv_list" | sed -e 's/try-coreaudi= o/coreaudio/') + fi + fi ;; =20 dsound) --=20 2.28.0