File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,10 @@ ifeq (0, $(call check-alsa))
5454$(warning No libasound installed. Check libasound in advance.)
5555 ENABLE_VIRTIOSND := 0
5656endif
57+ ifeq (0, $(call check-coreaudio) )
58+ $(warning No CoreAudio framework installed.)
59+ ENABLE_VIRTIOSND := 0
60+ endif
5761$(call set-feature, VIRTIOSND)
5862ifeq ($(call has, VIRTIOSND) , 1)
5963 OBJS_EXTRA += virtio-snd.o
Original file line number Diff line number Diff line change @@ -10,8 +10,26 @@ int main(){\n\
1010}\n'
1111endef
1212
13+ # Create a mininal Core Audio program
14+ define create-coreaudio-prog
15+ echo '\
16+ # include <CoreAudio/CoreAudio.h>\n\
17+ int main(){\n\
18+ AudioComponent comp;\n\
19+ comp = AudioComponentFindNext(NULL, &desc);\n\
20+ if (comp == NULL) exit (-1);\n\
21+ return 0;\n\
22+ }\n'
23+ endf
24+
1325# Check ALSA installation
1426define check-alsa
1527$(shell $(call create-alsa-prog) | $(CC ) -x c -lasound -o /dev/null > /dev/null 2> /dev/null -
1628 && echo $$? )
1729endef
30+
31+ # Check Core Audio installation
32+ define check-coreaudio
33+ $(shell $(call create-coreaudo-prog) | $(CC ) -x c -framework CoreAudio -o /dev/null > /dev/null 2> /dev/null -
34+ && echo $$? )
35+ endf
You can’t perform that action at this time.
0 commit comments