Disable EmuNetDevice Python bindings if the netdevice is not compiled in (bug #413)
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Mon, 24 Nov 2008 12:09:47 +0000
changeset 3916a1e72a0595a6
parent 3915 c798f3d5cb2e
child 3917 fe95a4f9d423
Disable EmuNetDevice Python bindings if the netdevice is not compiled in (bug #413)
bindings/python/ns3modulegen.py
src/devices/emu/wscript
     1.1 --- a/bindings/python/ns3modulegen.py	Mon Nov 24 06:45:13 2008 +0100
     1.2 +++ b/bindings/python/ns3modulegen.py	Mon Nov 24 12:09:47 2008 +0000
     1.3 @@ -131,6 +131,11 @@
     1.4          for clsname in ['SystemThread', 'SystemMutex', 'SystemCondition', 'CriticalSection']:
     1.5              root_module.classes.remove(root_module['ns3::%s' % clsname])
     1.6  
     1.7 +
     1.8 +    if 'EmuNetDevice' not in enabled_features:
     1.9 +        for clsname in ['EmuNetDevice', 'EmuHelper']:
    1.10 +            root_module.classes.remove(root_module['ns3::%s' % clsname])
    1.11 +
    1.12      if 'RealTime' not in enabled_features:
    1.13          for clsname in ['WallClockSynchronizer', 'RealtimeSimulatorImpl', 'RealtimeEventLock']:
    1.14              root_module.classes.remove(root_module['ns3::%s' % clsname])
     2.1 --- a/src/devices/emu/wscript	Mon Nov 24 06:45:13 2008 +0100
     2.2 +++ b/src/devices/emu/wscript	Mon Nov 24 12:09:47 2008 +0000
     2.3 @@ -6,7 +6,7 @@
     2.4      e.name = 'linux/if_ether.h'
     2.5      e.define = 'HAVE_IF_ETHER_H'
     2.6      conf.env['ENABLE_EMU'] = e.run()
     2.7 -    conf.report_optional_feature("Low Level Ethernet Defintions", "Emulated Net Device",
     2.8 +    conf.report_optional_feature("EmuNetDevice", "Emulated Net Device",
     2.9                                   conf.env['ENABLE_EMU'],
    2.10                                   "<linux/if_ether.h> include not detected")
    2.11