Skip to contentSkip to conversation

meson.build: Allow to disable OSS again

PATCH Superseded Thomas Huth 2 participants 4 messages Oct 29, 2021 – Nov 2, 2021 Arm/Amlogic Meson SoC support

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson.build: Allow to disable OSS again

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")
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +1 -1
index ed92454cab..0d7917db6a 100644
@@ -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'
Signature · 1 line
2.27.0
#1 lore raw

meson.build if liblzfse.found() and not cc.links(''' · line 918

Quoted 13 lines · Thomas Huth

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")
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

oss = not_found

meson.build +1 -1
-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)' ?

Quoted 4 lines

if not cc.has_header('sys/soundcard.h')

     # not found
   elif targetos == 'netbsd'
#2 lore raw
Quoted 11 lines · Philippe Mathieu-Daudé
Quoted 9 lines · Thomas Huth

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")
---
  meson.build | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 5 lines

meson.build if liblzfse.found() and not cc.links(''' · line 918

Quoted 3 lines

oss = not_found

meson.build +1 -1
-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

#3 lore raw
Quoted 20 lines · Thomas Huth
Quoted 12 lines · Philippe Mathieu-Daudé
Quoted 10 lines · Thomas Huth

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")

---
  meson.build | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 6 lines
Quoted 4 lines

  oss = not_found

(quoted diff) +1 -1
-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)' ?

Quoted 2 lines

It depends whether we want to allow "--disable-system --enable-oss" or not, I guess ;-)

When is that useful?

Quoted 3 lines

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.