1 ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
|
2 |
|
3 def configure(conf): |
|
4 have_gtk = conf.pkg_check_modules('GTK_CONFIG_STORE', 'gtk+-2.0 >= 2.12', mandatory=False) |
|
5 conf.env['ENABLE_GTK_CONFIG_STORE'] = have_gtk |
|
6 conf.report_optional_feature("GtkConfigStore", "GtkConfigStore", |
|
7 conf.env['ENABLE_GTK_CONFIG_STORE'], |
|
8 "library 'gtk+-2.0 >= 2.12' not found") |
|
9 have_libxml2 = conf.pkg_check_modules('LIBXML2', 'libxml-2.0 >= 2.6', mandatory=False) |
|
10 if have_libxml2: |
|
11 conf.define('HAVE_LIBXML2', 1) |
|
12 |
|
13 conf.env['ENABLE_LIBXML2'] = have_libxml2 |
|
14 conf.report_optional_feature("XmlIo", "XmlIo", |
|
15 conf.env['ENABLE_LIBXML2'], |
|
16 "library 'libxml-2.0 >= 2.7' not found") |
|
17 conf.write_config_header('ns3/contrib-config.h', top=True) |
|
18 |
|
19 |
|
20 def build(bld): |
|
21 module = bld.create_ns3_module('contrib', ['core', 'network']) |
|
22 module.source = [ |
|
23 'event-garbage-collector.cc', |
|
24 'gnuplot.cc', |
|
25 'delay-jitter-estimation.cc', |
|
26 'attribute-iterator.cc', |
|
27 'config-store.cc', |
|
28 'flow-id-tag.cc', |
|
29 'attribute-default-iterator.cc', |
|
30 'file-config.cc', |
|
31 'raw-text-config.cc', |
|
32 ] |
|
33 |
|
34 headers = bld.new_task_gen('ns3header') |
|
35 headers.module = 'contrib' |
|
36 headers.source = [ |
|
37 'event-garbage-collector.h', |
|
38 'gnuplot.h', |
|
39 'delay-jitter-estimation.h', |
|
40 'file-config.h', |
|
41 'config-store.h', |
|
42 'flow-id-tag.h', |
|
43 'average.h', |
|
44 ] |
|
45 |
|
46 if bld.env['ENABLE_GTK_CONFIG_STORE']: |
|
47 headers.source.append ('gtk-config-store.h') |
|
48 module.source.extend (['gtk-config-store.cc', |
|
49 'model-node-creator.cc', |
|
50 'model-typeid-creator.cc', |
|
51 'display-functions.cc', |
|
52 ]) |
|
53 module.uselib = 'GTK_CONFIG_STORE' |
|
54 |
|
55 if bld.env['ENABLE_LIBXML2']: |
|
56 module.source.append ('xml-config.cc') |
|
57 if bld.env['ENABLE_GTK_CONFIG_STORE']: |
|
58 module.uselib = module.uselib + ' LIBXML2' |
|
59 else: |
|
60 module.uselib = 'LIBXML2' |
|
61 |
|
62 bld.ns3_python_bindings() |
|