summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-03-20 03:44:51 +0100
committerDavid Robillard <d@drobilla.net>2017-03-20 03:44:51 +0100
commit8f13d4d5bb46a748fb6aa76ce080d4d22ce45e21 (patch)
treed4fdcfe09d06c78f2bfa93f704b58bd90b7bbde4
parent9f1f6485c99e90831bbcebaa35831ff76b2204ed (diff)
downloadingen-8f13d4d5bb46a748fb6aa76ce080d4d22ce45e21.tar.gz
ingen-8f13d4d5bb46a748fb6aa76ce080d4d22ce45e21.tar.bz2
ingen-8f13d4d5bb46a748fb6aa76ce080d4d22ce45e21.zip
Fix build with clang on Linux
-rw-r--r--wscript16
1 files changed, 7 insertions, 9 deletions
diff --git a/wscript b/wscript
index 97331425..56263baa 100644
--- a/wscript
+++ b/wscript
@@ -154,16 +154,14 @@ def configure(conf):
conf.env.INGEN_TEST_CXXFLAGS += ['--coverage']
conf.env.INGEN_TEST_LINKFLAGS += ['--coverage']
+ conf.env.PTHREAD_CFLAGS = []
+ conf.env.PTHREAD_LINKFLAGS = []
if conf.check(cflags=['-pthread'], mandatory=False):
- conf.env.PTHREAD_CFLAGS = ['-pthread']
- if conf.env.CXX_NAME != 'clang':
- 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 = []
+ conf.env.PTHREAD_CFLAGS = ['-pthread']
+ if conf.check(linkflags=['-pthread'], mandatory=False):
+ conf.env.PTHREAD_LINKFLAGS += ['-pthread']
+ if conf.check(linkflags=['-lpthread'], mandatory=False):
+ conf.env.PTHREAD_LINKFLAGS += ['-lpthread']
autowaf.define(conf, 'INGEN_SHARED', 1);
autowaf.define(conf, 'INGEN_VERSION', INGEN_VERSION)