build: check for pthreads with and without additional cflags

This commit is contained in:
Stefano Pigozzi 2013-11-26 14:16:29 +01:00
parent ac245f96e4
commit 4c634762b4
1 changed files with 5 additions and 1 deletions

View File

@ -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')