summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-11-26 14:16:29 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-11-26 14:16:29 +0100
commit4c634762b43e8f40739ebd0605c05cb1ea424c81 (patch)
treeaf9773e6ab91869828997d2d2c328e6aee11e7ea
parentac245f96e497305e8cf6ea714d82575ae6e86a12 (diff)
downloadmpv-4c634762b43e8f40739ebd0605c05cb1ea424c81.tar.bz2
mpv-4c634762b43e8f40739ebd0605c05cb1ea424c81.tar.xz
build: check for pthreads with and without additional cflags
-rw-r--r--waftools/checks/custom.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/waftools/checks/custom.py b/waftools/checks/custom.py
index 9db0c1d45d..ecf0def6ed 100644
--- a/waftools/checks/custom.py
+++ b/waftools/checks/custom.py
@@ -14,7 +14,11 @@ def check_pthreads(ctx, dependency_identifier):
}.get(ctx.env.DEST_OS, '')
libs = ['pthreadGC2', 'pthread']
checkfn = check_cc(fragment=pthreads_program, cflags=platform_cflags)
- return check_libs(libs, checkfn)(ctx, dependency_identifier)
+ checkfn_nocflags = check_cc(fragment=pthreads_program)
+ for fn in [checkfn, checkfn_nocflags]:
+ if check_libs(libs, fn)(ctx, dependency_identifier):
+ return True
+ return False
def check_iconv(ctx, dependency_identifier):
iconv_program = load_fragment('iconv.c')