If GtkConfigStore support is disabled, disable the python bindings for it, or else compilation fails.
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Sat, 12 Jul 2008 22:06:15 +0100
changeset 3420 390db659644b
parent 3419 8d3f5c0f55fa
child 3421 b9424c43753d
If GtkConfigStore support is disabled, disable the python bindings for it, or else compilation fails.
bindings/python/ns3modulegen.py
bindings/python/wscript
--- a/bindings/python/ns3modulegen.py	Sat Jul 12 19:33:29 2008 +0100
+++ b/bindings/python/ns3modulegen.py	Sat Jul 12 22:06:15 2008 +0100
@@ -107,6 +107,11 @@
         mod = __import__(local_module)
         mod.register_functions(root_module)
 
+
+    # if GtkConfigStore support is disabled, disable the class wrapper
+    if 'DISABLE_GTK_CONFIG_STORE' in os.environ:
+        root_module.classes.remove(root_module['ns3::GtkConfigStore'])
+
     root_module.generate(out, '_ns3')
 
     out.close()
--- a/bindings/python/wscript	Sat Jul 12 19:33:29 2008 +0100
+++ b/bindings/python/wscript	Sat Jul 12 22:06:15 2008 +0100
@@ -334,6 +334,10 @@
             bindgen.hidden_outputs.append("ns3_module_%s.cc" % module.replace('-', '_'))
         bindgen.prio = 50
 
+        bindgen.os_env = dict(os.environ)
+        if not env['ENABLE_GTK_CONFIG_STORE']:
+            bindgen.os_env['DISABLE_GTK_CONFIG_STORE'] = "1"
+
 
     ## we build python bindings if either we have the tools to
     ## generate them or if the pregenerated source file is already