From 4c634762b43e8f40739ebd0605c05cb1ea424c81 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 26 Nov 2013 14:16:29 +0100 Subject: build: check for pthreads with and without additional cflags --- waftools/checks/custom.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'waftools') 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') -- cgit v1.2.3