summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-03 03:26:10 +0000
committerDavid Robillard <d@drobilla.net>2012-08-03 03:26:10 +0000
commitf1375a3836e545d65a0a77c0d8ce50017a8ac165 (patch)
treeb32f25f411180546e48328cf6f25748ed6157f80
parent93336e9373bfec10f6f28f2930cb33f076e7af65 (diff)
downloadsuil-f1375a3836e545d65a0a77c0d8ce50017a8ac165.tar.gz
suil-f1375a3836e545d65a0a77c0d8ce50017a8ac165.tar.bz2
suil-f1375a3836e545d65a0a77c0d8ce50017a8ac165.zip
Don't build x11_in_gtk2 unless gtk+-x11-2.0 is available.
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@4607 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/instance.c1
-rw-r--r--wscript25
2 files changed, 14 insertions, 12 deletions
diff --git a/src/instance.c b/src/instance.c
index e4c521f..0f9434a 100644
--- a/src/instance.c
+++ b/src/instance.c
@@ -15,7 +15,6 @@
*/
#include <assert.h>
-#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/wscript b/wscript
index 78b98af..2e2c498 100644
--- a/wscript
+++ b/wscript
@@ -52,6 +52,9 @@ def configure(conf):
if conf.env['HAVE_GTK']:
autowaf.define('SUIL_OLD_GTK', 1)
+ autowaf.check_pkg(conf, 'gtk+-x11-2.0', uselib_store='GTK2_X11',
+ atleast_version='2.0.0', mandatory=False)
+
autowaf.check_pkg(conf, 'QtGui', uselib_store='QT4',
atleast_version='4.0.0', mandatory=False)
@@ -133,7 +136,7 @@ def build(bld):
linkflags = bld.env['NODELETE_FLAGS'])
autowaf.use_lib(bld, obj, 'GTK2 QT4 LV2')
- if bld.is_defined('HAVE_GTK2'):
+ if bld.is_defined('HAVE_GTK2') and bld.is_defined('HAVE_GTK2_X11'):
obj = bld(features = 'c cshlib',
source = 'src/x11_in_gtk2.c',
target = 'suil_x11_in_gtk2',
@@ -141,17 +144,17 @@ def build(bld):
install_path = module_dir,
cflags = cflags,
linkflags = bld.env['NODELETE_FLAGS'])
- autowaf.use_lib(bld, obj, 'GTK2 LV2')
+ autowaf.use_lib(bld, obj, 'GTK2 GTK2_X11 LV2')
- if sys.platform == 'win32':
- obj = bld(features = 'cxx cxxshlib',
- source = 'src/win_in_gtk2.c',
- target = 'suil_win_in_gtk2',
- includes = ['.'],
- install_path = module_dir,
- cflags = cflags,
- linkflags = bld.env['NODELETE_FLAGS'])
- autowaf.use_lib(bld, obj, 'GTK2 LV2')
+ if bld.is_defined('HAVE_GTK2') and sys.platform == 'win32':
+ obj = bld(features = 'cxx cxxshlib',
+ source = 'src/win_in_gtk2.c',
+ target = 'suil_win_in_gtk2',
+ includes = ['.'],
+ install_path = module_dir,
+ cflags = cflags,
+ linkflags = bld.env['NODELETE_FLAGS'])
+ autowaf.use_lib(bld, obj, 'GTK2 LV2')
if bld.is_defined('HAVE_QT4'):
obj = bld(features = 'cxx cxxshlib',