wscript: check for pthread.h
authorPaul Brossier <piem@piem.org>
Sun, 12 Mar 2017 14:39:17 +0000 (15:39 +0100)
committerPaul Brossier <piem@piem.org>
Sun, 12 Mar 2017 14:39:17 +0000 (15:39 +0100)
wscript

diff --git a/wscript b/wscript
index e1afe5f..eaed00d 100644 (file)
--- a/wscript
+++ b/wscript
@@ -45,6 +45,11 @@ def configure(ctx):
     # check for puredata header
     ctx.check(header_name='m_pd.h')
 
+    ctx.check(header_name='pthread.h', mandatory = False)
+    needs_pthread = ctx.get_define("HAVE_PTHREAD") is not None
+    if needs_pthread:
+        ctx.check_cc(lib="pthread", uselib_store="PTHREAD", mandatory=needs_pthread)
+
     # required dependencies
     ctx.check_cfg(package = 'aubio', atleast_version = '0.4.0',
             args = '--cflags --libs')