summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-10 21:27:44 +0000
committerDavid Robillard <d@drobilla.net>2012-05-10 21:27:44 +0000
commit5ca0af64c398072ed9b595e63dc9a54e26da764c (patch)
tree647ea11166e48a497f33b6660fb64b275c8f14e9 /wscript
parent6851673774f69d1389ed67c9a159499857d24d01 (diff)
downloadsuil-5ca0af64c398072ed9b595e63dc9a54e26da764c.tar.gz
suil-5ca0af64c398072ed9b595e63dc9a54e26da764c.tar.bz2
suil-5ca0af64c398072ed9b595e63dc9a54e26da764c.zip
Fix compilation on platforms that don't support -Wl,-z,-nodelete
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@4341 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'wscript')
-rw-r--r--wscript15
1 files changed, 10 insertions, 5 deletions
diff --git a/wscript b/wscript
index f5616b2..f27fa40 100644
--- a/wscript
+++ b/wscript
@@ -55,6 +55,12 @@ def configure(conf):
autowaf.check_pkg(conf, 'QtGui', uselib_store='QT4',
atleast_version='4.0.0', mandatory=False)
+ conf.env['NODELETE_FLAGS'] = []
+ if conf.check(linkflags = ['-Wl,-z,nodelete'],
+ msg = 'Checking for link flags -Wl,-z,-nodelete',
+ mandatory = False):
+ conf.env['NODELETE_FLAGS'] = ['-Wl,-z,nodelete']
+
autowaf.define(conf, 'SUIL_VERSION', SUIL_VERSION)
autowaf.define(conf, 'SUIL_MODULE_DIR',
conf.env['LIBDIR'] + '/suil-' + SUIL_MAJOR_VERSION)
@@ -83,9 +89,8 @@ def build(bld):
autowaf.build_pc(bld, 'SUIL', SUIL_VERSION, SUIL_MAJOR_VERSION, [],
{'SUIL_MAJOR_VERSION' : SUIL_MAJOR_VERSION})
- cflags = [ '-DSUIL_SHARED',
- '-DSUIL_INTERNAL' ]
- lib = []
+ cflags = [ '-DSUIL_SHARED', '-DSUIL_INTERNAL' ]
+ lib = []
if sys.platform != 'win32':
cflags += [ '-fvisibility=hidden' ]
lib += [ 'dl' ]
@@ -120,7 +125,7 @@ def build(bld):
includes = ['.'],
install_path = module_dir,
cflags = cflags,
- linkflags = ['-Wl,-z,nodelete'])
+ linkflags = bld.env['NODELETE_FLAGS'])
autowaf.use_lib(bld, obj, 'GTK2 QT4 LV2')
if bld.is_defined('HAVE_GTK2'):
@@ -130,7 +135,7 @@ def build(bld):
includes = ['.'],
install_path = module_dir,
cflags = cflags,
- linkflags = ['-Wl,-z,nodelete'])
+ linkflags = bld.env['NODELETE_FLAGS'])
autowaf.use_lib(bld, obj, 'GTK2 LV2')
if bld.is_defined('HAVE_QT4'):