From e806d006c12928ef8fab903bacc818428520c6f2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 13 Jul 2014 21:35:11 +0000 Subject: Add configure options to disable all Gtk or Qt support (fix #952). git-svn-id: http://svn.drobilla.net/lad/trunk/suil@5411 a436a847-0d15-0410-975c-d299462d15a1 --- NEWS | 3 ++- wscript | 31 +++++++++++++++++++------------ 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index 571b075..bde62ed 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,9 @@ suil 0.8.1 unstable; * Fix embedding several Qt UIs in Gtk + * Add configure options to disable all Gtk or Qt support - -- David Robillard Sat, 08 Feb 2014 13:44:47 -0500 + -- David Robillard Sun, 13 Jul 2014 17:32:53 -0400 suil 0.8.0 stable; diff --git a/wscript b/wscript index c1772e1..dffc5a3 100644 --- a/wscript +++ b/wscript @@ -26,6 +26,10 @@ def options(opt): help="Build static library") opt.add_option('--no-shared', action='store_true', dest='no_shared', help='Do not build shared library') + opt.add_option('--no-gtk', action='store_true', dest='no_gtk', + help='Do not build support for Gtk') + opt.add_option('--no-qt', action='store_true', dest='no_qt', + help='Do not build support for Qt') opt.add_option('--gtk2-lib-name', type='string', dest='gtk2_lib_name', default="libgtk-x11-2.0.so.0", help="Gtk2 library name [Default: libgtk-x11-2.0.so.0]") @@ -55,19 +59,21 @@ def configure(conf): autowaf.check_pkg(conf, 'lv2', atleast_version='1.6.0', uselib_store='LV2_1_6_0', mandatory=False) - autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK2', - atleast_version='2.18.0', mandatory=False) - if not conf.is_defined('HAVE_GTK2'): + if not Options.options.no_gtk: autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK2', + atleast_version='2.18.0', mandatory=False) + if not conf.is_defined('HAVE_GTK2'): + autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK2', + atleast_version='2.0.0', mandatory=False) + if conf.is_defined('HAVE_GTK2'): + autowaf.define(conf, 'SUIL_OLD_GTK', 1) + + autowaf.check_pkg(conf, 'gtk+-x11-2.0', uselib_store='GTK2_X11', atleast_version='2.0.0', mandatory=False) - if conf.is_defined('HAVE_GTK2'): - autowaf.define(conf, '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) + if not Options.options.no_qt: + autowaf.check_pkg(conf, 'QtGui', uselib_store='QT4', + atleast_version='4.0.0', mandatory=False) conf.check_cc(define_name = 'HAVE_LIBDL', lib = 'dl', @@ -97,8 +103,9 @@ def configure(conf): autowaf.display_msg(conf, "Gtk2 Support", conf.is_defined('HAVE_GTK2')) - autowaf.display_msg(conf, "Gtk2 Library Name", - conf.env.SUIL_GTK2_LIB_NAME) + if conf.is_defined('HAVE_GTK2'): + autowaf.display_msg(conf, "Gtk2 Library Name", + conf.env.SUIL_GTK2_LIB_NAME) autowaf.display_msg(conf, "Qt4 Support", conf.is_defined('HAVE_QT4')) print('') -- cgit v1.2.1