From 8fcbd37512533733fbb9ef1f3de37aacbbbe0383 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 28 Nov 2016 16:27:34 +0100 Subject: [PATCH] wscript: check for pthread.h libpthread --- src/wscript_build | 1 + wscript | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/wscript_build b/src/wscript_build index f159cf3b..aab54496 100644 --- a/src/wscript_build +++ b/src/wscript_build @@ -11,6 +11,7 @@ uselib += ['AVFORMAT'] uselib += ['AVRESAMPLE'] uselib += ['AVUTIL'] uselib += ['BLAS'] +uselib += ['PTHREAD'] source = ctx.path.ant_glob('*.c **/*.c') diff --git a/wscript b/wscript index 6b0e40a8..f10f09a0 100644 --- a/wscript +++ b/wscript @@ -123,6 +123,11 @@ def configure(ctx): ctx.check(header_name='getopt.h', mandatory = False) ctx.check(header_name='unistd.h', mandatory = False) + ctx.check(header_name='pthread.h', mandatory = False) + needs_pthread = ctx.get_define("HAVE_PTHREAD_H") is not None + if needs_pthread: + ctx.check_cc(lib="pthread", uselib_store="PTHREAD", mandatory=needs_pthread) + target_platform = sys.platform if ctx.options.target_platform: target_platform = ctx.options.target_platform -- 2.11.0