Message ID | 20190129150029.29829-5-philmd@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | sdl: Let it be optional (in particular, on OpenBSD) | expand |
Hi, > sdl) > if test "$sdl" = "no"; then > - error_exit "sdl not found or disabled, can not use sdl audio driver" > + echo "WARNING: SDL not found or disabled, can not use sdl audio driver" > + audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/sdl *//g') Not needed any more. > +if test -z "$audio_drv_list"; then > + audio_drv_list="none" > +fi That puts "none" into the list of audio drivers. I don't think we should do that. If you want prettify the output in case audio_drv_list is empty, then just fix the output code. cheers, Gerd
diff --git a/configure b/configure index c7024d6662..df10601fee 100755 --- a/configure +++ b/configure @@ -3380,7 +3380,8 @@ for drv in $audio_drv_list; do sdl) if test "$sdl" = "no"; then - error_exit "sdl not found or disabled, can not use sdl audio driver" + echo "WARNING: SDL not found or disabled, can not use sdl audio driver" + audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/sdl *//g') fi ;; @@ -3417,6 +3418,9 @@ for drv in $audio_drv_list; do ;; esac done +if test -z "$audio_drv_list"; then + audio_drv_list="none" +fi ########################################## # BrlAPI probe
Currently if we try to build QEMU on OpenBSD with SDL disabled, we get: $ ./configure --cc=x86_64-unknown-openbsd6.1-gcc-4.9.4 --python=python2.7 --disable-sdl ERROR: sdl not found or disabled, can not use sdl audio driver Since SDL is not a requirement for OpenBSD, let it be optional. If it is not found, or the user explicitly disable it, remove it from the audio_drv_list. If no audio backends are available, QEMU will fall back to the null driver. Instead of displaying nothing when audio_drv_list ends up empty, display an informative "none". This does not change the default behavior: $ ./configure --cc=x86_64-unknown-openbsd6.1-gcc-4.9.4 --python=python2.7 SDL support yes (1.2.15) Audio drivers sdl WARNING: Use of SDL 1.2 is deprecated and will be removed in WARNING: future releases. Please switch to using SDL 2.0 GEN config-host.h ... but allows to build without SDL: $ ./configure --cc=x86_64-unknown-openbsd6.1-gcc-4.9.4 --python=python2.7 --disable-sdl WARN: sdl not found or disabled, can not use sdl audio driver SDL support no Audio drivers none GEN config-host.h ... Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)