* [PATCH] meson.build: Allow to disable OSS again
@ 2021-10-29 7:13 Thomas Huth
2021-10-29 9:32 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Huth @ 2021-10-29 7:13 UTC (permalink / raw)
To: qemu-devel, Paolo Bonzini
If sys/soundcard.h is available, it is currently not possible to
disable OSS with the --disable-oss or --without-default-features
configure switches. Improve the check in meson.build to fix this.
Fixes: 87430d5b13 ("configure, meson: move audio driver detection to Meson")
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index ed92454cab..0d7917db6a 100644
--- a/meson.build
+++ b/meson.build
@@ -915,7 +915,7 @@ if liblzfse.found() and not cc.links('''
endif
oss = not_found
-if not get_option('oss').auto() or have_system
+if get_option('oss').enabled() or (get_option('oss').auto() and have_system)
if not cc.has_header('sys/soundcard.h')
# not found
elif targetos == 'netbsd'
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] meson.build: Allow to disable OSS again
2021-10-29 7:13 [PATCH] meson.build: Allow to disable OSS again Thomas Huth
@ 2021-10-29 9:32 ` Philippe Mathieu-Daudé
2021-11-02 7:45 ` Thomas Huth
0 siblings, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-10-29 9:32 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini
On 10/29/21 09:13, Thomas Huth wrote:
> If sys/soundcard.h is available, it is currently not possible to
> disable OSS with the --disable-oss or --without-default-features
> configure switches. Improve the check in meson.build to fix this.
>
> Fixes: 87430d5b13 ("configure, meson: move audio driver detection to Meson")
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> oss = not_found
> -if not get_option('oss').auto() or have_system
> +if get_option('oss').enabled() or (get_option('oss').auto() and have_system)
Shouldn't this be 'if have_system and (enabled or auto)' ?
> if not cc.has_header('sys/soundcard.h')
> # not found
> elif targetos == 'netbsd'
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] meson.build: Allow to disable OSS again
2021-10-29 9:32 ` Philippe Mathieu-Daudé
@ 2021-11-02 7:45 ` Thomas Huth
2021-11-02 8:01 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Huth @ 2021-11-02 7:45 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel, Paolo Bonzini
On 29/10/2021 11.32, Philippe Mathieu-Daudé wrote:
> On 10/29/21 09:13, Thomas Huth wrote:
>> If sys/soundcard.h is available, it is currently not possible to
>> disable OSS with the --disable-oss or --without-default-features
>> configure switches. Improve the check in meson.build to fix this.
>>
>> Fixes: 87430d5b13 ("configure, meson: move audio driver detection to Meson")
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>> meson.build | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>> oss = not_found
>> -if not get_option('oss').auto() or have_system
>> +if get_option('oss').enabled() or (get_option('oss').auto() and have_system)
>
> Shouldn't this be 'if have_system and (enabled or auto)' ?
It depends whether we want to allow "--disable-system --enable-oss" or not,
I guess ;-)
Honestly, I don't have a preference. But maybe we could also simply use 'if
have_system and not disabled' instead, which would then be the shortest
solution?
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] meson.build: Allow to disable OSS again
2021-11-02 7:45 ` Thomas Huth
@ 2021-11-02 8:01 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-11-02 8:01 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini
On 11/2/21 08:45, Thomas Huth wrote:
> On 29/10/2021 11.32, Philippe Mathieu-Daudé wrote:
>> On 10/29/21 09:13, Thomas Huth wrote:
>>> If sys/soundcard.h is available, it is currently not possible to
>>> disable OSS with the --disable-oss or --without-default-features
>>> configure switches. Improve the check in meson.build to fix this.
>>>
>>> Fixes: 87430d5b13 ("configure, meson: move audio driver detection to
>>> Meson")
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>> ---
>>> meson.build | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>> oss = not_found
>>> -if not get_option('oss').auto() or have_system
>>> +if get_option('oss').enabled() or (get_option('oss').auto() and
>>> have_system)
>>
>> Shouldn't this be 'if have_system and (enabled or auto)' ?
>
> It depends whether we want to allow "--disable-system --enable-oss" or
> not, I guess ;-)
When is that useful?
> Honestly, I don't have a preference. But maybe we could also simply use
> 'if have_system and not disabled' instead, which would then be the
> shortest solution?
This is clearer indeed.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-02 8:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-29 7:13 [PATCH] meson.build: Allow to disable OSS again Thomas Huth
2021-10-29 9:32 ` Philippe Mathieu-Daudé
2021-11-02 7:45 ` Thomas Huth
2021-11-02 8:01 ` 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).