summaryrefslogtreecommitdiffstats
path: root/waftools/checks/generic.py
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2014-10-25 22:51:41 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2014-10-25 23:05:50 +0200
commit90e3e990217081691aa0f89e712dd2ae771be876 (patch)
treed2b562806d6d493faa2bf0d3b14cb05b3f1e2890 /waftools/checks/generic.py
parent9b45b48c466765b6491778709a1c52e061480f76 (diff)
downloadmpv-90e3e990217081691aa0f89e712dd2ae771be876.tar.bz2
mpv-90e3e990217081691aa0f89e712dd2ae771be876.tar.xz
build: fix Lua detection
We need to manually define the flag since we are using a separate identifier for each of the Lua checks. This was done before 9b45b48 by the composed check with a define_key (see waftools/checks/generic.py). The pkg-config check was the only one to not redefine a define key because Waf already does that automatically when we call the generated function with the same identifier as the generator function. Now if they are called with two different arguments we will get two different definitions. Fixes #1218
Diffstat (limited to 'waftools/checks/generic.py')
-rw-r--r--waftools/checks/generic.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/waftools/checks/generic.py b/waftools/checks/generic.py
index e2ea78092f..10c52b4f54 100644
--- a/waftools/checks/generic.py
+++ b/waftools/checks/generic.py
@@ -99,8 +99,10 @@ def check_pkg_config(*args, **kw_ext):
result = bool(ctx.check_cfg(**opts))
ConfigSet.append_unique = original_append_unique
- if not result:
- defkey = DependencyInflector(dependency_identifier).define_key()
+ defkey = DependencyInflector(dependency_identifier).define_key()
+ if result:
+ ctx.define(defkey, 1)
+ else:
ctx.undefine(defkey)
return result
return fn