diff --git a/src/core/test.h b/src/core/test.h index f10c6ccec..72a52150f 100644 --- a/src/core/test.h +++ b/src/core/test.h @@ -25,6 +25,7 @@ #include #include #include +#include #include // // Note on below macros: @@ -746,7 +747,7 @@ private: class TestSuite { public: - typedef enum TestType { + enum TestType { BVT = 1, /**< This test suite implements a Build Verification Test */ UNIT, /**< This test suite implements a Unit Test */ SYSTEM, /**< This test suite implements a System Test */ diff --git a/src/core/wscript b/src/core/wscript index 341d2311f..566e8b4f6 100644 --- a/src/core/wscript +++ b/src/core/wscript @@ -58,7 +58,6 @@ def build(bld): 'test.cc', 'random-variable.cc', 'rng-stream.cc', - 'rng-test-suite.cc', 'command-line.cc', 'type-name.cc', 'type-traits-test.cc', @@ -151,3 +150,5 @@ def build(bld): 'system-condition.h', ]) + if bld.env['ENABLE_GSL']: + core.source.extend(['rng-test-suite.cc']) diff --git a/src/devices/wifi/wscript b/src/devices/wifi/wscript index 7df865e15..afdcb7776 100644 --- a/src/devices/wifi/wscript +++ b/src/devices/wifi/wscript @@ -1,12 +1,5 @@ ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- -def configure(conf): - have_gsl = conf.pkg_check_modules('GSL', 'gsl', mandatory=False) - conf.env['ENABLE_GSL'] = have_gsl - conf.report_optional_feature("GSL", "GNU Scientific Library (GSL)", - conf.env['ENABLE_GSL'], - "GSL not found") - def build(bld): obj = bld.create_ns3_module('wifi', ['node']) obj.source = [ @@ -120,7 +113,6 @@ def build(bld): if bld.env['ENABLE_GSL']: obj.uselib = 'GSL GSLCBLAS M' - obj.env.append_value('CXXDEFINES', "ENABLE_GSL") obj = bld.create_ns3_program('wifi-phy-test', ['core', 'simulator', 'mobility', 'node', 'wifi']) diff --git a/src/wscript b/src/wscript index 9d74eba3a..7bd2f23f4 100644 --- a/src/wscript +++ b/src/wscript @@ -60,7 +60,6 @@ def configure(conf): conf.sub_config('core') conf.sub_config('simulator') conf.sub_config('devices/emu') - conf.sub_config('devices/wifi') conf.sub_config('devices/tap-bridge') conf.sub_config('contrib') conf.sub_config('internet-stack') diff --git a/wscript b/wscript index 4f26c9f67..80603820b 100644 --- a/wscript +++ b/wscript @@ -358,8 +358,15 @@ def configure(conf): else: conf.report_optional_feature("static", "Static build", False, "option --enable-static not selected") + have_gsl = conf.pkg_check_modules('GSL', 'gsl', mandatory=False) + conf.env['ENABLE_GSL'] = have_gsl - + conf.report_optional_feature("GSL", "GNU Scientific Library (GSL)", + conf.env['ENABLE_GSL'], + "GSL not found") + if have_gsl: + conf.env.append_value('CXXDEFINES', "ENABLE_GSL") + conf.env.append_value('CCDEFINES', "ENABLE_GSL") # Write a summary of optional features status print "---- Summary of optional NS-3 features:"