]> spindle.queued.net Git - midori/commitdiff
Add switches to 'wscript' to disable Unique and GIO
authorChristian Dywan <christian@twotoasts.de>
Tue, 26 Aug 2008 22:44:21 +0000 (00:44 +0200)
committerChristian Dywan <christian@twotoasts.de>
Tue, 26 Aug 2008 22:44:21 +0000 (00:44 +0200)
wscript

diff --git a/wscript b/wscript
index 1ad146d8889377cc109ff4758e09319472539bfd..8d246fc8e0bab2e1c92b857842bb1dd5b684a5e1 100644 (file)
--- a/wscript
+++ b/wscript
@@ -35,11 +35,20 @@ def configure (conf):
         nls = 'no'
     conf.check_message_custom ('localization', 'support', nls)
 
-    conf.check_pkg ('unique-1.0', destvar='UNIQUE', vnum='0.9', mandatory=False)
-    single_instance = ['no','yes'][conf.env['HAVE_UNIQUE'] == 1]
+    if not Params.g_options.disable_unique:
+        conf.check_pkg ('unique-1.0', destvar='UNIQUE', vnum='0.9', mandatory=False)
+        single_instance = ['not available','yes'][conf.env['HAVE_UNIQUE'] == 1]
+    else:
+        single_instance = 'no'
     conf.check_message_custom ('single instance', 'support', single_instance)
 
-    conf.check_pkg ('gio-2.0', destvar='GIO', vnum='2.16.0', mandatory=False)
+    if not Params.g_options.disable_gio:
+        conf.check_pkg ('gio-2.0', destvar='GIO', vnum='2.16.0', mandatory=False)
+        gio = ['not available','yes'][conf.env['HAVE_GIO'] == 1]
+    else:
+        gio = 'no'
+    conf.check_message_custom ('GIO', 'support', gio)
+
     conf.check_pkg ('gtk+-2.0', destvar='GTK', vnum='2.6.0', mandatory=True)
     conf.check_pkg ('gtksourceview-2.0', destvar='GTKSOURCEVIEW', vnum='2.0', mandatory=False)
     conf.check_pkg ('webkit-1.0', destvar='WEBKIT', vnum='0.1', mandatory=True)
@@ -68,6 +77,11 @@ def set_options (opt):
     opt.add_option ('--disable-nls', action='store_true', default=False,
         help='Disables native language support', dest='disable_nls')
 
+    opt.add_option ('--disable-unique', action='store_true', default=False,
+        help='Disables Unique support', dest='disable_unique')
+    opt.add_option ('--disable-gio', action='store_true', default=False,
+        help='Disables GIO support', dest='disable_gio')
+
 def build (bld):
     bld.add_subdirs ('katze midori icons')