From ef00197fe822ee30c685798f0302f50fd1b6ae3f Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Mon, 24 Nov 2008 12:09:47 +0000 Subject: [PATCH] Disable EmuNetDevice Python bindings if the netdevice is not compiled in (bug #413) --- bindings/python/ns3modulegen.py | 5 +++++ src/devices/emu/wscript | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bindings/python/ns3modulegen.py b/bindings/python/ns3modulegen.py index 7cd34e182..c38185f95 100755 --- a/bindings/python/ns3modulegen.py +++ b/bindings/python/ns3modulegen.py @@ -131,6 +131,11 @@ def main(): for clsname in ['SystemThread', 'SystemMutex', 'SystemCondition', 'CriticalSection']: root_module.classes.remove(root_module['ns3::%s' % clsname]) + + if 'EmuNetDevice' not in enabled_features: + for clsname in ['EmuNetDevice', 'EmuHelper']: + root_module.classes.remove(root_module['ns3::%s' % clsname]) + if 'RealTime' not in enabled_features: for clsname in ['WallClockSynchronizer', 'RealtimeSimulatorImpl', 'RealtimeEventLock']: root_module.classes.remove(root_module['ns3::%s' % clsname]) diff --git a/src/devices/emu/wscript b/src/devices/emu/wscript index c3d14b3a2..ff5a4fa75 100644 --- a/src/devices/emu/wscript +++ b/src/devices/emu/wscript @@ -6,7 +6,7 @@ def configure(conf): e.name = 'linux/if_ether.h' e.define = 'HAVE_IF_ETHER_H' conf.env['ENABLE_EMU'] = e.run() - conf.report_optional_feature("Low Level Ethernet Defintions", "Emulated Net Device", + conf.report_optional_feature("EmuNetDevice", "Emulated Net Device", conf.env['ENABLE_EMU'], " include not detected")