[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/46] darwin: detect CoreAudio for build
From: |
Peter Maydell |
Subject: |
[PULL 15/46] darwin: detect CoreAudio for build |
Date: |
Fri, 29 Jan 2021 10:59:41 +0000 |
From: Joelle van Dyne <j@getutm.app>
On iOS there is no CoreAudio, so we should not assume Darwin always
has it.
Signed-off-by: Joelle van Dyne <j@getutm.app>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20210126012457.39046-11-j@getutm.app
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
configure | 35 +++++++++++++++++++++++++++++++++--
1 file changed, 33 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 5cf075ac60e..99bf6275087 100755
--- a/configure
+++ b/configure
@@ -319,6 +319,7 @@ fdt="auto"
netmap="no"
sdl="auto"
sdl_image="auto"
+coreaudio="auto"
virtiofsd="auto"
virtfs="auto"
libudev="auto"
@@ -778,7 +779,7 @@ Darwin)
QEMU_CFLAGS="-arch x86_64 $QEMU_CFLAGS"
QEMU_LDFLAGS="-arch x86_64 $QEMU_LDFLAGS"
fi
- audio_drv_list="coreaudio try-sdl"
+ audio_drv_list="try-coreaudio try-sdl"
audio_possible_drivers="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.
@@ -3146,6 +3147,24 @@ EOF
fi
fi
+##########################################
+# detect CoreAudio
+if test "$coreaudio" != "no" ; then
+ coreaudio_libs="-framework CoreAudio"
+ cat > $TMPC << EOF
+#include <CoreAudio/CoreAudio.h>
+int main(void)
+{
+ return (int)AudioGetCurrentHostTime();
+}
+EOF
+ if compile_prog "" "$coreaudio_libs" ; then
+ coreaudio=yes
+ else
+ coreaudio=no
+ fi
+fi
+
##########################################
# Sound support libraries probe
@@ -3202,8 +3221,20 @@ for drv in $audio_drv_list; do
fi
;;
- coreaudio)
+ coreaudio | try-coreaudio)
+ if test "$coreaudio" = "no"; then
+ if test "$drv" = "try-coreaudio"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-coreaudio//')
+ else
+ error_exit "$drv check failed" \
+ "Make sure to have the $drv is available."
+ fi
+ else
coreaudio_libs="-framework CoreAudio"
+ if test "$drv" = "try-coreaudio"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e
's/try-coreaudio/coreaudio/')
+ fi
+ fi
;;
dsound)
--
2.20.1
- [PULL 07/46] hw/misc: Fix arith overflow in NPCM7XX PWM module, (continued)
- [PULL 07/46] hw/misc: Fix arith overflow in NPCM7XX PWM module, Peter Maydell, 2021/01/29
- [PULL 08/46] target/arm: Replace magic value by MMU_DATA_LOAD definition, Peter Maydell, 2021/01/29
- [PULL 04/46] hw: gpio: implement gpio-pwr driver for qemu reset/poweroff, Peter Maydell, 2021/01/29
- [PULL 13/46] darwin: fix cross-compiling for Darwin, Peter Maydell, 2021/01/29
- [PULL 10/46] configure: cross-compiling with empty cross_prefix, Peter Maydell, 2021/01/29
- [PULL 12/46] darwin: remove redundant dependency declaration, Peter Maydell, 2021/01/29
- [PULL 14/46] configure: cross compile should use x86_64 cpu_family, Peter Maydell, 2021/01/29
- [PULL 16/46] darwin: remove 64-bit build detection on 32-bit OS, Peter Maydell, 2021/01/29
- [PULL 19/46] hw/misc/pvpanic: add PCI interface support, Peter Maydell, 2021/01/29
- [PULL 18/46] hw/misc/pvpanic: split-out generic and bus dependent code, Peter Maydell, 2021/01/29
- [PULL 15/46] darwin: detect CoreAudio for build,
Peter Maydell <=
- [PULL 17/46] hvf: Add hypervisor entitlement to output binaries, Peter Maydell, 2021/01/29
- [PULL 21/46] tests/qtest: add a test case for pvpanic-pci, Peter Maydell, 2021/01/29
- [PULL 22/46] ptimer: Add new ptimer_set_period_from_clock() function, Peter Maydell, 2021/01/29
- [PULL 27/46] hw/timer/cmsdk-apb-timer: Rename CMSDKAPBTIMER struct to CMSDKAPBTimer, Peter Maydell, 2021/01/29
- [PULL 29/46] hw/timer/cmsdk-apb-dualtimer: Add Clock input, Peter Maydell, 2021/01/29
- [PULL 20/46] pvpanic : update pvpanic spec document, Peter Maydell, 2021/01/29
- [PULL 24/46] tests: Add a simple test of the CMSDK APB timer, Peter Maydell, 2021/01/29
- [PULL 23/46] clock: Add new clock_has_source() function, Peter Maydell, 2021/01/29