replace RefCountBase with SimpleRefCount<> to avoid duplicate refcounting implementations.
1 ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
6 if conf.check(header_name='stdlib.h'):
7 conf.define('HAVE_STDLIB_H', 1)
8 conf.define('HAVE_GETENV', 1)
10 conf.check(header_name='signal.h', define_name='HAVE_SIGNAL_H')
12 # Check for POSIX threads
13 test_env = conf.env.copy()
14 if Options.platform != 'darwin' and Options.platform != 'cygwin':
15 test_env.append_value('LINKFLAGS', '-pthread')
16 test_env.append_value('CXXFLAGS', '-pthread')
17 test_env.append_value('CCFLAGS', '-pthread')
23 pthread_mutex_init (&m, NULL);
27 have_pthread = conf.check(header_name='pthread.h', define_name='HAVE_PTHREAD_H',
28 env=test_env, fragment=fragment,
29 errmsg='Could not find pthread support (build/config.log for details)',
32 # darwin accepts -pthread but prints a warning saying it is ignored
33 if Options.platform != 'darwin' and Options.platform != 'cygwin':
34 conf.env['CXXFLAGS_PTHREAD'] = '-pthread'
35 conf.env['CCFLAGS_PTHREAD'] = '-pthread'
36 conf.env['LINKFLAGS_PTHREAD'] = '-pthread'
38 conf.env['ENABLE_THREADING'] = have_pthread
40 conf.report_optional_feature("Threading", "Threading Primitives",
41 conf.env['ENABLE_THREADING'],
42 "<pthread.h> include not detected")
44 conf.write_config_header('ns3/core-config.h', top=True)
47 core = bld.create_ns3_module('core')
72 'trace-source-accessor.cc',
77 'attribute-test-suite.cc',
78 'callback-test-suite.cc',
79 'names-test-suite.cc',
80 'type-traits-test-suite.cc',
81 'traced-callback-test-suite.cc',
85 headers = bld.new_task_gen('ns3header')
86 headers.module = 'core'
88 'system-wall-clock-ms.h',
110 'attribute-accessor-helper.h',
119 'attribute-helper.h',
123 'trace-source-accessor.h',
130 'object-ref-count.h',
133 if sys.platform == 'win32':
135 'win32-system-wall-clock-ms.cc',
139 'unix-system-wall-clock-ms.cc',
142 if bld.env['ENABLE_THREADING']:
144 'unix-system-thread.cc',
145 'unix-system-mutex.cc',
146 'unix-system-condition.cc',
148 core.uselib = 'PTHREAD'
149 headers.source.extend([
152 'system-condition.h',
155 if bld.env['ENABLE_GSL']:
156 core.uselib = 'GSL GSLCBLAS M'
157 core.source.extend(['rng-test-suite.cc'])