* [Qemu-devel] [PATCH] configure: Let SDL support be optional on OpenBSD
@ 2019-01-22 19:05 Philippe Mathieu-Daudé
2019-01-22 19:20 ` Peter Maydell
0 siblings, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-22 19:05 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P . Berrange, Brad Smith, Peter Maydell, Gerd Hoffmann,
Fam Zheng, Philippe Mathieu-Daudé
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 (we remove
it from $audio_drv_list but it stays available in $audio_possible_drivers).
If no audio backends are available, QEMU falls back to the null driver.
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)
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
SDL support no
GEN config-host.h
...
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
See https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg02732.html
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index de768e2343..98fc4fa84a 100755
--- a/configure
+++ b/configure
@@ -828,7 +828,7 @@ NetBSD)
OpenBSD)
bsd="yes"
make="${MAKE-gmake}"
- audio_drv_list="sdl"
+ audio_drv_list=""
audio_possible_drivers="sdl"
HOST_VARIANT_DIR="openbsd"
supported_os="yes"
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: Let SDL support be optional on OpenBSD
2019-01-22 19:05 [Qemu-devel] [PATCH] configure: Let SDL support be optional on OpenBSD Philippe Mathieu-Daudé
@ 2019-01-22 19:20 ` Peter Maydell
2019-01-23 9:33 ` Daniel P. Berrangé
0 siblings, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2019-01-22 19:20 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: QEMU Developers, Daniel P . Berrange, Brad Smith, Gerd Hoffmann,
Fam Zheng
On Tue, 22 Jan 2019 at 19:05, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> 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 (we remove
> it from $audio_drv_list but it stays available in $audio_possible_drivers).
> If no audio backends are available, QEMU falls back to the null driver.
> --- a/configure
> +++ b/configure
> @@ -828,7 +828,7 @@ NetBSD)
> OpenBSD)
> bsd="yes"
> make="${MAKE-gmake}"
> - audio_drv_list="sdl"
> + audio_drv_list=""
> audio_possible_drivers="sdl"
> HOST_VARIANT_DIR="openbsd"
> supported_os="yes"
This will mean that configure will by default not enable
a real audio backend, even if we do have sdl.
Looking at the logic, "audio_possible_drivers" is only
used for printing the help message. The thing that drives
which audio drivers to test with is "audio_drv_list",
and the expectation is that you put things on that only
if it's possible to build with them. (For instance
we only add 'dsound' for mingw if the dsound.h header is
present, and so on.)
So we need to do one of:
(1) only put "sdl" into audio_drv_list if SDL is
available (this probably doesn't work as we haven't
probed for SDL at the point where we initialize it)
(2) have the sdl probe delete "sdl" from audio_drv_list
if the probe fails
(3) some more complicated restructuring :-)
(eg rather than having audio_drv_list be set to an
initial list based on the host OS, just have a full
list of drivers, insist that each has a proper probe
routine, and use whichever ones we can successfully
probe)
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: Let SDL support be optional on OpenBSD
2019-01-22 19:20 ` Peter Maydell
@ 2019-01-23 9:33 ` Daniel P. Berrangé
2019-01-24 1:41 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 4+ messages in thread
From: Daniel P. Berrangé @ 2019-01-23 9:33 UTC (permalink / raw)
To: Peter Maydell
Cc: Philippe Mathieu-Daudé, QEMU Developers, Brad Smith,
Gerd Hoffmann, Fam Zheng
On Tue, Jan 22, 2019 at 07:20:35PM +0000, Peter Maydell wrote:
> On Tue, 22 Jan 2019 at 19:05, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> >
> > 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 (we remove
> > it from $audio_drv_list but it stays available in $audio_possible_drivers).
> > If no audio backends are available, QEMU falls back to the null driver.
>
> > --- a/configure
> > +++ b/configure
> > @@ -828,7 +828,7 @@ NetBSD)
> > OpenBSD)
> > bsd="yes"
> > make="${MAKE-gmake}"
> > - audio_drv_list="sdl"
> > + audio_drv_list=""
> > audio_possible_drivers="sdl"
> > HOST_VARIANT_DIR="openbsd"
> > supported_os="yes"
>
> This will mean that configure will by default not enable
> a real audio backend, even if we do have sdl.
>
> Looking at the logic, "audio_possible_drivers" is only
> used for printing the help message. The thing that drives
> which audio drivers to test with is "audio_drv_list",
> and the expectation is that you put things on that only
> if it's possible to build with them. (For instance
> we only add 'dsound' for mingw if the dsound.h header is
> present, and so on.)
>
> So we need to do one of:
> (1) only put "sdl" into audio_drv_list if SDL is
> available (this probably doesn't work as we haven't
> probed for SDL at the point where we initialize it)
> (2) have the sdl probe delete "sdl" from audio_drv_list
> if the probe fails
This one sounds reasonable to me.
> (3) some more complicated restructuring :-)
> (eg rather than having audio_drv_list be set to an
> initial list based on the host OS, just have a full
> list of drivers, insist that each has a proper probe
> routine, and use whichever ones we can successfully
> probe)
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: Let SDL support be optional on OpenBSD
2019-01-23 9:33 ` Daniel P. Berrangé
@ 2019-01-24 1:41 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-24 1:41 UTC (permalink / raw)
To: Daniel P. Berrangé, Peter Maydell
Cc: QEMU Developers, Brad Smith, Gerd Hoffmann, Fam Zheng
On 1/23/19 10:33 AM, Daniel P. Berrangé wrote:
> On Tue, Jan 22, 2019 at 07:20:35PM +0000, Peter Maydell wrote:
>> On Tue, 22 Jan 2019 at 19:05, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>>>
>>> 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 (we remove
>>> it from $audio_drv_list but it stays available in $audio_possible_drivers).
>>> If no audio backends are available, QEMU falls back to the null driver.
>>
>>> --- a/configure
>>> +++ b/configure
>>> @@ -828,7 +828,7 @@ NetBSD)
>>> OpenBSD)
>>> bsd="yes"
>>> make="${MAKE-gmake}"
>>> - audio_drv_list="sdl"
>>> + audio_drv_list=""
>>> audio_possible_drivers="sdl"
>>> HOST_VARIANT_DIR="openbsd"
>>> supported_os="yes"
>>
>> This will mean that configure will by default not enable
>> a real audio backend, even if we do have sdl.
>>
>> Looking at the logic, "audio_possible_drivers" is only
>> used for printing the help message. The thing that drives
>> which audio drivers to test with is "audio_drv_list",
>> and the expectation is that you put things on that only
>> if it's possible to build with them. (For instance
>> we only add 'dsound' for mingw if the dsound.h header is
>> present, and so on.)
Yes sorry I missed that Peter :S
>> So we need to do one of:
>> (1) only put "sdl" into audio_drv_list if SDL is
>> available (this probably doesn't work as we haven't
>> probed for SDL at the point where we initialize it)
>> (2) have the sdl probe delete "sdl" from audio_drv_list
>> if the probe fails
>
> This one sounds reasonable to me.
I went this way, but encountered unexpected problems, which makes me
wonder who really use OpenBSD... Anyway the discussion deserves another
thread.
>> (3) some more complicated restructuring :-)
>> (eg rather than having audio_drv_list be set to an
>> initial list based on the host OS, just have a full
>> list of drivers, insist that each has a proper probe
>> routine, and use whichever ones we can successfully
>> probe)
>
>
> Regards,
> Daniel
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-01-24 1:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-22 19:05 [Qemu-devel] [PATCH] configure: Let SDL support be optional on OpenBSD Philippe Mathieu-Daudé
2019-01-22 19:20 ` Peter Maydell
2019-01-23 9:33 ` Daniel P. Berrangé
2019-01-24 1:41 ` Philippe Mathieu-Daudé
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).