From 776c8622814ee3749909af5c47c75f5d26c03931 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 27 Jul 2019 22:35:50 +0200 Subject: Properly check for libm --- wscript | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'wscript') diff --git a/wscript b/wscript index 55a4c0e..400d5c4 100644 --- a/wscript +++ b/wscript @@ -59,6 +59,8 @@ def configure(conf): conf.define('HAVE_GL', 1) conf.define('PUGL_HAVE_GL', 1) + conf.check(features='c cshlib', lib='m', uselib_store='M', mandatory=False) + if not Options.options.no_cairo: autowaf.check_pkg(conf, 'cairo', uselib_store = 'CAIRO', @@ -97,7 +99,7 @@ def build(bld): autowaf.build_pc(bld, 'PUGL', PUGL_VERSION, PUGL_MAJOR_VERSION, [], {'PUGL_MAJOR_VERSION': PUGL_MAJOR_VERSION}) - libflags = ['-fvisibility=hidden'] + libflags = ['-fvisibility=hidden'] if not bld.env.MSVC_COMPILER else [] framework = [] libs = [] lib_source = ['pugl/detail/implementation.c'] @@ -121,15 +123,10 @@ def build(bld): libs += ['GL'] if bld.is_defined('HAVE_CAIRO'): lib_source += ['pugl/detail/x11_cairo.c'] - if bld.env.MSVC_COMPILER: - libflags = [] - else: - libs += ['m'] common = { 'framework': framework, 'includes': ['.'], - 'uselib': ['CAIRO'], } lib_common = common.copy() @@ -137,6 +134,7 @@ def build(bld): 'export_includes': ['.'], 'install_path': '${LIBDIR}', 'lib': libs, + 'uselib': ['CAIRO'], 'source': lib_source, 'target': 'pugl-%s' % PUGL_MAJOR_VERSION, 'vnum': PUGL_VERSION, @@ -183,6 +181,7 @@ def build(bld): source = 'test/%s.c' % prog, use = 'libpugl_static', lib = test_libs, + uselib = ['CAIRO', 'M'], target = target, install_path = '', cflags = test_cflags, -- cgit v1.2.1