From: Paul Brossier Date: Mon, 28 Nov 2016 15:27:34 +0000 (+0100) Subject: wscript: check for pthread.h libpthread X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=8fcbd37512533733fbb9ef1f3de37aacbbbe0383;p=aubio.git wscript: check for pthread.h libpthread --- 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