summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-02-06 23:45:58 +0000
committerDavid Robillard <d@drobilla.net>2015-02-06 23:45:58 +0000
commit8dad2d6e0805d0db2cca66f5901235884aad92da (patch)
tree850f121d32e0cb51ecd4d7127b56942bbc7b136e /wscript
parent10669b73136183f70057917af311dadad46588b7 (diff)
downloadingen-8dad2d6e0805d0db2cca66f5901235884aad92da.tar.gz
ingen-8dad2d6e0805d0db2cca66f5901235884aad92da.tar.bz2
ingen-8dad2d6e0805d0db2cca66f5901235884aad92da.zip
Portable pthread flags checks.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5534 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'wscript')
-rw-r--r--wscript10
1 files changed, 10 insertions, 0 deletions
diff --git a/wscript b/wscript
index af739522..3011b021 100644
--- a/wscript
+++ b/wscript
@@ -123,6 +123,16 @@ def configure(conf):
define_name = 'HAVE_POSIX_MEMALIGN',
mandatory = False)
+ if conf.check(cflags=['-pthread'], mandatory=False):
+ conf.env.PTHREAD_CFLAGS = ['-pthread']
+ conf.env.PTHREAD_LINKFLAGS = ['-pthread']
+ elif conf.check(linkflags=['-lpthread'], mandatory=False):
+ conf.env.PTHREAD_CFLAGS = []
+ conf.env.PTHREAD_LINKFLAGS = ['-lpthread']
+ else:
+ conf.env.PTHREAD_CFLAGS = []
+ conf.env.PTHREAD_LINKFLAGS = []
+
autowaf.define(conf, 'INGEN_VERSION', INGEN_VERSION)
if not Options.options.no_gui and conf.env.HAVE_GANV: