[PATCH v2] meson.build: Allow to disable OSS again

Thomas Huth posted 1 patch 2 years, 6 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211102105822.773131-1-thuth@redhat.com
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v2] meson.build: Allow to disable OSS again
Posted by Thomas Huth 2 years, 6 months ago
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>
---
 v2: Only ever look for OSS if we also have system emulation enabled

 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 6dec5dd5cc..2848917602 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 have_system and not get_option('oss').disabled()
   if not cc.has_header('sys/soundcard.h')
     # not found
   elif targetos == 'netbsd'
-- 
2.27.0


Re: [PATCH v2] meson.build: Allow to disable OSS again
Posted by Paolo Bonzini 2 years, 6 months ago
On 02/11/21 11:58, 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>
> ---
>   v2: Only ever look for OSS if we also have system emulation enabled
> 
>   meson.build | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index 6dec5dd5cc..2848917602 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 have_system and not get_option('oss').disabled()
>     if not cc.has_header('sys/soundcard.h')
>       # not found
>     elif targetos == 'netbsd'
> 

Queued, thanks.

Paolo


Re: [PATCH v2] meson.build: Allow to disable OSS again
Posted by Philippe Mathieu-Daudé 2 years, 6 months ago
On 11/2/21 11:58, 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>
> ---
>  v2: Only ever look for OSS if we also have system emulation enabled
> 
>  meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>