aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-10-07 15:06:09 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-10-14 09:50:56 +0200
commit87430d5b13fdef0768cdb55352652ff78095e761 (patch)
treecc14fe4e6a2f7bc1d922d032fc4789145e84a48c /audio
parent7e1fbe7963f2b9bb44d6aa5c1ef793894212190a (diff)
configure, meson: move audio driver detection to Meson
This brings a change that makes audio drivers more similar to all other modules. All drivers are built by default, while --audio-drv-list only governs the default choice of the audio driver. Meson options are added to disable the drivers, and the next patches will fix the help messages and command line options, and especially make the non-default drivers available via -audiodev. Cc: Gerd Hoffman <kraxel@redhat.com> Cc: Volker RĂ¼melin <vr_qemu@t-online.de> Reviewed-by: Marc-AndrĂ© Lureau <marcandre.lureau@redhat.com> Message-Id: <20211007130630.632028-4-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'audio')
-rw-r--r--audio/meson.build23
1 files changed, 11 insertions, 12 deletions
diff --git a/audio/meson.build b/audio/meson.build
index 9a95c58f18..462533bb8c 100644
--- a/audio/meson.build
+++ b/audio/meson.build
@@ -7,23 +7,22 @@ softmmu_ss.add(files(
'wavcapture.c',
))
-softmmu_ss.add(when: [coreaudio, 'CONFIG_AUDIO_COREAUDIO'], if_true: files('coreaudio.c'))
-softmmu_ss.add(when: [dsound, 'CONFIG_AUDIO_DSOUND'],
- if_true: files('dsoundaudio.c', 'audio_win_int.c'))
+softmmu_ss.add(when: coreaudio, if_true: files('coreaudio.c'))
+softmmu_ss.add(when: dsound, if_true: files('dsoundaudio.c', 'audio_win_int.c'))
audio_modules = {}
foreach m : [
- ['CONFIG_AUDIO_ALSA', 'alsa', alsa, 'alsaaudio.c'],
- ['CONFIG_AUDIO_OSS', 'oss', oss, 'ossaudio.c'],
- ['CONFIG_AUDIO_PA', 'pa', pulse, 'paaudio.c'],
- ['CONFIG_AUDIO_SDL', 'sdl', sdl, 'sdlaudio.c'],
- ['CONFIG_AUDIO_JACK', 'jack', jack, 'jackaudio.c'],
- ['CONFIG_SPICE', 'spice', spice, 'spiceaudio.c']
+ ['alsa', alsa, files('alsaaudio.c')],
+ ['oss', oss, files('ossaudio.c')],
+ ['pa', pulse, files('paaudio.c')],
+ ['sdl', sdl, files('sdlaudio.c')],
+ ['jack', jack, files('jackaudio.c')],
+ ['spice', spice, files('spiceaudio.c')]
]
- if config_host.has_key(m[0])
+ if m[1].found()
module_ss = ss.source_set()
- module_ss.add(when: m[2], if_true: files(m[3]))
- audio_modules += {m[1] : module_ss}
+ module_ss.add(m[1], m[2])
+ audio_modules += {m[0] : module_ss}
endif
endforeach