summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-11-25 22:18:45 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-11-25 22:18:45 +0100
commitccb50bfdae7b6b6eb71be34aeec8c1001e5bb499 (patch)
treec918eeb3d61408a1defc1617181cf95c6f2382d9
parentdefbe48deeb5611667f41a4d78ee17b53dea71cd (diff)
downloadmpv-ccb50bfdae7b6b6eb71be34aeec8c1001e5bb499.tar.bz2
mpv-ccb50bfdae7b6b6eb71be34aeec8c1001e5bb499.tar.xz
build: run oss_audio.c check with oss cflags as well
-rw-r--r--waftools/checks/custom.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/waftools/checks/custom.py b/waftools/checks/custom.py
index f070141a23..6323fcc5e3 100644
--- a/waftools/checks/custom.py
+++ b/waftools/checks/custom.py
@@ -87,9 +87,8 @@ def __get_osslibdir__():
except Exception:
return ""
-def __check_oss_headers__(ctx, dependency_identifier):
+def __get_osscflags__():
import os
-
osscflags = ''
osslibdir = __get_osslibdir__()
if osslibdir:
@@ -97,9 +96,11 @@ def __check_oss_headers__(ctx, dependency_identifier):
soundcard_h = os.path.join(ossincdir, 'sys', 'soundcard.h')
if os.path.exists(soundcard_h):
osscflags = '-I{0}'.format(ossincdir)
+ return osscflags
+def __check_oss_headers__(ctx, dependency_identifier):
ctx.check_cc(fragment=load_fragment('oss_audio_header.c'), use='soundcard',
- cflags=osscflags)
+ cflags=__get_osscflags__())
return True
@@ -112,7 +113,8 @@ def __check_oss_bsd__(ctxdependency_identifier):
return __fail_oss_check__(ctx)
def check_oss(ctx, dependency_identifier):
- func = check_cc(fragment=load_fragment('oss_audio.c'), use='soundcard')
+ func = check_cc(fragment=load_fragment('oss_audio.c'), use='soundcard',
+ cflags=__get_osscflags__())
if func(ctx, dependency_identifier):
ctx.define('PATH_DEV_DSP', '/dev/dsp')
ctx.define('PATH_DEV_MIXER', '/dev/mixer')