[PULL 22/27] meson.build: Allow to disable OSS again

Paolo Bonzini posted 27 patches 4 years, 3 months ago
Maintainers: Jean-Christophe Dubois <jcd@tribudubois.net>, Thomas Huth <thuth@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Andrew Jeffery <andrew@aj.id.au>, Laurent Vivier <lvivier@redhat.com>, Markus Armbruster <armbru@redhat.com>, "Cédric Le Goater" <clg@kaod.org>, "Michael S. Tsirkin" <mst@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Christian Borntraeger <borntraeger@de.ibm.com>, Cornelia Huck <cohuck@redhat.com>, Jason Wang <jasowang@redhat.com>, Joel Stanley <joel@jms.id.au>, Marcelo Tosatti <mtosatti@redhat.com>, Sergio Lopez <slp@redhat.com>, Halil Pasic <pasic@linux.ibm.com>, Cleber Rosa <crosa@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Fam Zheng <fam@euphon.net>, Eduardo Habkost <ehabkost@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>
[PULL 22/27] meson.build: Allow to disable OSS again
Posted by Paolo Bonzini 4 years, 3 months ago
From: Thomas Huth <thuth@redhat.com>

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>
Message-Id: <20211102105822.773131-1-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 85f1e43dfe..0ab9c43bf2 100644
--- a/meson.build
+++ b/meson.build
@@ -911,7 +911,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.31.1