src/contrib/wscript
author Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
Tue, 08 Sep 2009 13:57:17 +0100
changeset 5209 4f5eb479554c
parent 4531 14a102415139
child 4775 5b3efd4b3884
child 5568 6e159c6c34bb
permissions -rw-r--r--
merge with ns-3-dev
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1878
f947cd18f0bb Create a new contrib module; move event-garbage-collector.{h,cc} to the contrib module.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     1
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
f947cd18f0bb Create a new contrib module; move event-garbage-collector.{h,cc} to the contrib module.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     2
3063
a1c532e3bf18 a basic but useful Gtk+-based config-store
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2958
diff changeset
     3
def configure(conf):
4273
fb4423206618 xml support for ConfigStore
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4064
diff changeset
     4
    have_gtk = conf.pkg_check_modules('GTK_CONFIG_STORE', 'gtk+-2.0 >= 2.12', mandatory=False)
fb4423206618 xml support for ConfigStore
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4064
diff changeset
     5
    conf.env['ENABLE_GTK_CONFIG_STORE'] = have_gtk
3625
30afad8324d5 Add a summary of optional features at the end of the configuration stage.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3570
diff changeset
     6
    conf.report_optional_feature("GtkConfigStore", "GtkConfigStore",
30afad8324d5 Add a summary of optional features at the end of the configuration stage.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3570
diff changeset
     7
                                 conf.env['ENABLE_GTK_CONFIG_STORE'],
30afad8324d5 Add a summary of optional features at the end of the configuration stage.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3570
diff changeset
     8
                                 "library 'gtk+-2.0 >= 2.12' not found")
4275
bd3eab705407 decrease version requirements.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4273
diff changeset
     9
    have_libxml2 = conf.pkg_check_modules('LIBXML2', 'libxml-2.0 >= 2.6', mandatory=False)
4273
fb4423206618 xml support for ConfigStore
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4064
diff changeset
    10
    if have_libxml2:
fb4423206618 xml support for ConfigStore
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4064
diff changeset
    11
        conf.define('HAVE_LIBXML2', 1)
3625
30afad8324d5 Add a summary of optional features at the end of the configuration stage.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3570
diff changeset
    12
4273
fb4423206618 xml support for ConfigStore
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4064
diff changeset
    13
    conf.env['ENABLE_LIBXML2'] = have_libxml2
fb4423206618 xml support for ConfigStore
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4064
diff changeset
    14
    conf.report_optional_feature("XmlIo", "XmlIo",
fb4423206618 xml support for ConfigStore
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4064
diff changeset
    15
                                 conf.env['ENABLE_LIBXML2'],
fb4423206618 xml support for ConfigStore
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4064
diff changeset
    16
                                 "library 'libxml-2.0 >= 2.7' not found")
3570
44b0bc6817c6 Stats module and example merged in.
tjkopena@cs.drexel.edu
parents: 3085
diff changeset
    17
    conf.sub_config('stats')
3063
a1c532e3bf18 a basic but useful Gtk+-based config-store
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2958
diff changeset
    18
4531
14a102415139 Run unit tests as indenpendent WAF tasks
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4368
diff changeset
    19
    conf.write_config_header('ns3/contrib-config.h', top=True)
4273
fb4423206618 xml support for ConfigStore
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4064
diff changeset
    20
1878
f947cd18f0bb Create a new contrib module; move event-garbage-collector.{h,cc} to the contrib module.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    21
def build(bld):
3951
561a37800333 The 'contrib' module actually depends on 'common' too (affects waf --python-scan)
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3906
diff changeset
    22
    module = bld.create_ns3_module('contrib', ['simulator', 'common'])
1878
f947cd18f0bb Create a new contrib module; move event-garbage-collector.{h,cc} to the contrib module.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    23
    module.source = [
f947cd18f0bb Create a new contrib module; move event-garbage-collector.{h,cc} to the contrib module.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    24
        'event-garbage-collector.cc',
1879
876026968947 Gnuplot output class for contrib module
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1878
diff changeset
    25
        'gnuplot.cc',
2266
d0e656113f71 updated doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1879
diff changeset
    26
        'delay-jitter-estimation.cc',
3063
a1c532e3bf18 a basic but useful Gtk+-based config-store
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2958
diff changeset
    27
        'attribute-iterator.cc',
2958
f6ec069d17da ConfigStore allows you to dump and read from a file a simulation configuration
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2609
diff changeset
    28
        'config-store.cc',
3885
006d3dd58939 test PHY collisions
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3085
diff changeset
    29
        'flow-id-tag.cc',
4273
fb4423206618 xml support for ConfigStore
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4064
diff changeset
    30
        'attribute-default-iterator.cc',
fb4423206618 xml support for ConfigStore
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4064
diff changeset
    31
        'file-config.cc',
fb4423206618 xml support for ConfigStore
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4064
diff changeset
    32
        'raw-text-config.cc',
1878
f947cd18f0bb Create a new contrib module; move event-garbage-collector.{h,cc} to the contrib module.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    33
        ]
f947cd18f0bb Create a new contrib module; move event-garbage-collector.{h,cc} to the contrib module.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    34
4064
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3951
diff changeset
    35
    headers = bld.new_task_gen('ns3header')
2609
931d59bb1303 Add a 'module' attribute to the ns3header object specifying which module each set of headers belongs to.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 2266
diff changeset
    36
    headers.module = 'contrib'
1878
f947cd18f0bb Create a new contrib module; move event-garbage-collector.{h,cc} to the contrib module.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    37
    headers.source = [
f947cd18f0bb Create a new contrib module; move event-garbage-collector.{h,cc} to the contrib module.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    38
        'event-garbage-collector.h',
1879
876026968947 Gnuplot output class for contrib module
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1878
diff changeset
    39
        'gnuplot.h',
2266
d0e656113f71 updated doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1879
diff changeset
    40
        'delay-jitter-estimation.h',
4273
fb4423206618 xml support for ConfigStore
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4064
diff changeset
    41
        'file-config.h',
2958
f6ec069d17da ConfigStore allows you to dump and read from a file a simulation configuration
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2609
diff changeset
    42
        'config-store.h',
3885
006d3dd58939 test PHY collisions
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3085
diff changeset
    43
        'flow-id-tag.h',
1878
f947cd18f0bb Create a new contrib module; move event-garbage-collector.{h,cc} to the contrib module.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    44
        ]
3063
a1c532e3bf18 a basic but useful Gtk+-based config-store
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2958
diff changeset
    45
4064
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3951
diff changeset
    46
    if bld.env['ENABLE_GTK_CONFIG_STORE']:
3063
a1c532e3bf18 a basic but useful Gtk+-based config-store
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2958
diff changeset
    47
        headers.source.append ('gtk-config-store.h')
a1c532e3bf18 a basic but useful Gtk+-based config-store
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2958
diff changeset
    48
        module.source.append ('gtk-config-store.cc')
a1c532e3bf18 a basic but useful Gtk+-based config-store
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2958
diff changeset
    49
        module.uselib = 'GTK_CONFIG_STORE'
4273
fb4423206618 xml support for ConfigStore
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4064
diff changeset
    50
fb4423206618 xml support for ConfigStore
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4064
diff changeset
    51
    if bld.env['ENABLE_LIBXML2']:
fb4423206618 xml support for ConfigStore
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4064
diff changeset
    52
        module.source.append ('xml-config.cc')
4280
88efddb08ce6 Fix src/contrib/wscript
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 4275
diff changeset
    53
        if bld.env['ENABLE_GTK_CONFIG_STORE']:
88efddb08ce6 Fix src/contrib/wscript
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 4275
diff changeset
    54
            module.uselib = module.uselib + ' LIBXML2'
88efddb08ce6 Fix src/contrib/wscript
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 4275
diff changeset
    55
        else:
88efddb08ce6 Fix src/contrib/wscript
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 4275
diff changeset
    56
            module.uselib = 'LIBXML2'