From 8f13d4d5bb46a748fb6aa76ce080d4d22ce45e21 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 20 Mar 2017 03:44:51 +0100 Subject: Fix build with clang on Linux --- wscript | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'wscript') 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) -- cgit v1.2.1