From 1ace78069a737076ccaeeef3846b2597c8c1ec2d Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Tue, 2 Sep 2008 17:32:19 +0100 Subject: [PATCH] Fix compilation of Python bindings when libsqlite3 is not available (and so the class SqliteDataOutput is omitted). --- bindings/python/ns3modulegen.py | 4 ++++ bindings/python/wscript | 2 ++ 2 files changed, 6 insertions(+) diff --git a/bindings/python/ns3modulegen.py b/bindings/python/ns3modulegen.py index 1798fc03a..3ec52493f 100644 --- a/bindings/python/ns3modulegen.py +++ b/bindings/python/ns3modulegen.py @@ -115,6 +115,10 @@ def main(): if 'DISABLE_GTK_CONFIG_STORE' in os.environ: root_module.classes.remove(root_module['ns3::GtkConfigStore']) + # if no sqlite, the class SqliteDataOutput is disabled + if 'SQLITE_STATS' in os.environ: + root_module.classes.remove(root_module['ns3::SqliteDataOutput']) + root_module.generate(out, '_ns3') out.close() diff --git a/bindings/python/wscript b/bindings/python/wscript index 562983309..d077b6bed 100644 --- a/bindings/python/wscript +++ b/bindings/python/wscript @@ -374,6 +374,8 @@ def build(bld): bindgen.os_env = dict(os.environ) if not env['ENABLE_GTK_CONFIG_STORE']: bindgen.os_env['DISABLE_GTK_CONFIG_STORE'] = "1" + if not env['SQLITE_STATS']: + bindgen.os_env['SQLITE_STATS'] = "1" ## we build python bindings if either we have the tools to