diff -r f9f9f1f41517 bindings/python/ns3modulegen.py --- a/bindings/python/ns3modulegen.py Sat Oct 03 16:21:58 2009 -0700 +++ b/bindings/python/ns3modulegen.py Mon Oct 05 15:15:46 2009 +0100 @@ -149,6 +149,12 @@ root_module.classes.remove(root_module['ns3::%s' % clsname]) root_module.enums.remove(root_module['ns3::TapBridge::Mode']) + if 'NetAnim' not in enabled_features: + for clsname in ['PointToPointDumbbellHelper', 'PointToPointGridHelper', + 'AnimationInterface', 'NodeLocation']: + root_module.classes.remove(root_module['ns3::%s' % clsname]) + + root_module.generate(out, '_ns3') out.close() diff -r f9f9f1f41517 src/contrib/net-anim/wscript --- a/src/contrib/net-anim/wscript Sat Oct 03 16:21:58 2009 -0700 +++ b/src/contrib/net-anim/wscript Mon Oct 05 15:15:46 2009 +0100 @@ -1,7 +1,20 @@ ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- +def configure(conf): + conf.env['ENABLE_NET_ANIM'] = (conf.check(header_name='sys/socket.h') + and conf.check(header_name='netinet/in.h')) + conf.report_optional_feature("NetAnim", "NetAnim", + conf.env['ENABLE_NET_ANIM'], + "sys/socket.h or netinet/in.h not found") + def build(bld): obj = bld.create_ns3_module('net-anim') + headers = bld.new_task_gen('ns3header') + headers.module = 'net-anim' + + if not bld.env['ENABLE_NET_ANIM']: + return + obj.source = [ 'point-to-point-dumbbell-helper.cc', 'point-to-point-grid-helper.cc', @@ -9,8 +22,6 @@ 'node-location.cc' ] - headers = bld.new_task_gen('ns3header') - headers.module = 'net-anim' headers.source = [ 'point-to-point-dumbbell-helper.h', 'point-to-point-grid-helper.h', diff -r f9f9f1f41517 src/contrib/wscript --- a/src/contrib/wscript Sat Oct 03 16:21:58 2009 -0700 +++ b/src/contrib/wscript Mon Oct 05 15:15:46 2009 +0100 @@ -15,6 +15,7 @@ conf.env['ENABLE_LIBXML2'], "library 'libxml-2.0 >= 2.7' not found") conf.sub_config('stats') + conf.sub_config('net-anim') conf.write_config_header('ns3/contrib-config.h', top=True)