summaryrefslogtreecommitdiffstats
path: root/waftools
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-06 11:01:53 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-03-11 12:32:51 +0900
commitcac071dc231891e520296a889655c4da4d241741 (patch)
tree0272ddc33d344f2c7d471594e9cf1fcf526c148b /waftools
parentc77f076ae4689b9740fe97870cffbdc4e1bd98ca (diff)
downloadmpv-cac071dc231891e520296a889655c4da4d241741.tar.bz2
mpv-cac071dc231891e520296a889655c4da4d241741.tar.xz
build: make vdpau and dxva2 checks nicer
Using check_statement() with an empty statement just to check for the header is quite a hack. Fix check_headers() (so it takes a "use" parameter), and use it for the checks instead. (cherry picked from commit dfa562b5db95735edca8f7730d887f420e1cd585)
Diffstat (limited to 'waftools')
-rw-r--r--waftools/checks/generic.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/waftools/checks/generic.py b/waftools/checks/generic.py
index 831f7e2711..4b3a64f23b 100644
--- a/waftools/checks/generic.py
+++ b/waftools/checks/generic.py
@@ -109,7 +109,7 @@ def check_pkg_config(*args, **kw_ext):
return result
return fn
-def check_headers(*headers):
+def check_headers(*headers, **kw_ext):
def undef_others(ctx, headers, found):
not_found_hs = set(headers) - set([found])
for not_found_h in not_found_hs:
@@ -119,7 +119,7 @@ def check_headers(*headers):
def fn(ctx, dependency_identifier):
for header in headers:
defaults = {'header_name': header, 'features': 'c cprogram'}
- options = __merge_options__(dependency_identifier, defaults)
+ options = __merge_options__(dependency_identifier, defaults, kw_ext)
if ctx.check(**options):
undef_others(ctx, headers, header)
defkey = DependencyInflector(dependency_identifier).define_key()