From 8dad2d6e0805d0db2cca66f5901235884aad92da Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 6 Feb 2015 23:45:58 +0000 Subject: Portable pthread flags checks. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5534 a436a847-0d15-0410-975c-d299462d15a1 --- wscript | 10 ++++++++++ 1 file changed, 10 insertions(+) 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: -- cgit v1.2.1