summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--waftools/checks/custom.py7
-rw-r--r--wscript14
2 files changed, 14 insertions, 7 deletions
diff --git a/waftools/checks/custom.py b/waftools/checks/custom.py
index 09a5c01018..1b698ec086 100644
--- a/waftools/checks/custom.py
+++ b/waftools/checks/custom.py
@@ -1,3 +1,4 @@
+from waftools.inflectors import DependencyInflector
from waftools.checks.generic import *
from waflib import Utils
import os
@@ -84,6 +85,12 @@ def __get_osslibdir():
def check_oss_4front(ctx, dependency_identifier):
oss_libdir = __get_osslibdir()
+ # avoid false positive from native sys/soundcard.h
+ if not oss_libdir:
+ defkey = DependencyInflector(dependency_identifier).define_key()
+ ctx.undefine(defkey)
+ return False
+
soundcard_h = os.path.join(oss_libdir, "include/sys/soundcard.h")
include_dir = os.path.join(oss_libdir, "include")
diff --git a/wscript b/wscript
index 290cbbe2fe..0da79b484c 100644
--- a/wscript
+++ b/wscript
@@ -383,12 +383,18 @@ audio_output_features = [
'deps_neg': [ 'sdl2' ],
'func': check_pkg_config('sdl')
}, {
+ 'name': 'oss-audio-4front',
+ 'desc': 'OSS (implementation from opensound.com)',
+ 'func': check_oss_4front,
+ 'groups' : [ 'oss-audio' ]
+ }, {
'name': 'oss-audio-native',
'desc': 'OSS (platform-specific OSS implementation)',
'func': check_cc(header_name='sys/soundcard.h',
defines=['PATH_DEV_DSP="/dev/dsp"',
'PATH_DEV_MIXER="/dev/mixer"'],
fragment=load_fragment('oss_audio.c')),
+ 'deps_neg': [ 'oss-audio-4front' ],
'groups' : [ 'oss-audio' ]
}, {
'name': 'oss-audio-sunaudio',
@@ -398,13 +404,7 @@ audio_output_features = [
defines=['PATH_DEV_DSP="/dev/sound"',
'PATH_DEV_MIXER="/dev/mixer"'],
fragment=load_fragment('oss_audio_sunaudio.c')),
- 'deps_neg': [ 'oss-audio-native' ],
- 'groups' : [ 'oss-audio' ]
- }, {
- 'name': 'oss-audio-4front',
- 'desc': 'OSS (implementation from opensound.com)',
- 'func': check_oss_4front,
- 'deps_neg': [ 'oss-audio-native', 'oss-audio-sunaudio' ],
+ 'deps_neg': [ 'oss-audio-4front', 'oss-audio-native' ],
'groups' : [ 'oss-audio' ]
}, {
'name': '--oss-audio',