From 2b13de80bf01013b290ffc942841d436861da20c Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 16 Oct 2019 01:38:21 +0300 Subject: [PATCH] wscript: check if tgmath actually compiles, should fix building under freebsd --- wscript | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wscript b/wscript index c9a2b495..17acda78 100644 --- a/wscript +++ b/wscript @@ -233,7 +233,10 @@ def configure(conf): # check if we can use C99 tgmath if conf.check_cc(header_name='tgmath.h', mandatory=False): - conf.define('HAVE_TGMATH_H', 1) + if conf.check_cc(fragment='''#include + int main(void){ return (int)sin(2.0f); }''', + msg='Checking if tgmath.h is usable', mandatory=False): + conf.define('HAVE_TGMATH_H', 1) conf.env.DEDICATED = conf.options.DEDICATED # we don't need game launcher on dedicated