From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Brad Smith" <brad@comstyle.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 2/4] audio: allow optional audio drivers.
Date: Wed, 23 Jan 2019 09:00:03 +0100 [thread overview]
Message-ID: <20190123080005.31078-3-kraxel@redhat.com> (raw)
In-Reply-To: <20190123080005.31078-1-kraxel@redhat.com>
For those audio drivers which can be probed (sdl, alsa, pulse) add a
try-$name variants. Unlike the variants without try- prefix they will
not error out on probe failure, the driver will be dropped from the list
instead. Mainly useful for the audio_drv_list default values.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
configure | 34 ++++++++++++++++++++++++++++------
1 file changed, 28 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index bdb80f8cb1..6fef094f39 100755
--- a/configure
+++ b/configure
@@ -3300,22 +3300,36 @@ fi
audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/,/ /g')
for drv in $audio_drv_list; do
case $drv in
- alsa)
+ alsa | try-alsa)
if $pkg_config alsa --exists; then
alsa_libs=$($pkg_config alsa --libs)
+ if test "$drv" = "try-alsa"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-alsa/alsa/')
+ fi
else
- error_exit "$drv check failed" \
- "Make sure to have the $drv libs and headers installed."
+ if test "$drv" = "try-alsa"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-alsa//')
+ else
+ error_exit "$drv check failed" \
+ "Make sure to have the $drv libs and headers installed."
+ fi
fi
;;
- pa)
+ pa | try-pa)
if $pkg_config libpulse --exists; then
pulse_libs=$($pkg_config libpulse --libs)
audio_pt_int="yes"
+ if test "$drv" = "try-pa"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa/pa/')
+ fi
else
- error_exit "$drv check failed" \
- "Make sure to have the $drv libs and headers installed."
+ if test "$drv" = "try-pa"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa//')
+ else
+ error_exit "$drv check failed" \
+ "Make sure to have the $drv libs and headers installed."
+ fi
fi
;;
@@ -3325,6 +3339,14 @@ for drv in $audio_drv_list; do
fi
;;
+ try-sdl)
+ if test "$sdl" = "no"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-sdl//')
+ else
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-sdl/sdl/')
+ fi
+ ;;
+
coreaudio)
coreaudio_libs="-framework CoreAudio"
;;
--
2.9.3
next prev parent reply other threads:[~2019-01-23 8:00 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 8:00 [Qemu-devel] [PATCH 0/4] audio: rework driver probing Gerd Hoffmann
2019-01-23 8:00 ` [Qemu-devel] [PATCH 1/4] audio: use pkg-config Gerd Hoffmann
2019-01-23 8:30 ` Thomas Huth
2019-01-23 8:00 ` Gerd Hoffmann [this message]
2019-01-23 8:00 ` [Qemu-devel] [PATCH 3/4] audio: use try-sdl and try-pa for openbsd Gerd Hoffmann
2019-01-23 8:00 ` [Qemu-devel] [PATCH 4/4] [RfC] audio: probe audio drivers by default Gerd Hoffmann
2019-01-23 8:27 ` Thomas Huth
2019-01-23 9:36 ` Daniel P. Berrangé
2019-01-23 9:50 ` Thomas Huth
2019-01-23 10:12 ` Daniel P. Berrangé
2019-01-23 10:36 ` Kamil Rytarowski
2019-01-23 10:59 ` Peter Maydell
2019-01-23 11:10 ` Kamil Rytarowski
2019-01-23 11:16 ` Peter Maydell
2019-01-23 11:30 ` Kamil Rytarowski
2019-01-23 12:20 ` Gerd Hoffmann
2019-01-23 12:45 ` Kamil Rytarowski
2019-01-23 13:59 ` Gerd Hoffmann
2019-01-23 14:45 ` Kamil Rytarowski
2019-01-23 14:54 ` Brad Smith
2019-01-23 15:12 ` Gerd Hoffmann
2019-01-23 15:20 ` Kamil Rytarowski
2019-01-24 6:38 ` Gerd Hoffmann
2019-01-24 6:51 ` Thomas Huth
2019-01-24 10:06 ` Kamil Rytarowski
2019-01-23 10:16 ` Kamil Rytarowski
2019-01-23 10:24 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190123080005.31078-3-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=brad@comstyle.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).