librt is need not for threading primitives but for the real time scheduler
This commit is contained in:
@@ -9,8 +9,6 @@ def configure(conf):
|
||||
|
||||
conf.check(header_name='signal.h', define_name='HAVE_SIGNAL_H')
|
||||
|
||||
conf.check(lib='rt', uselib='RT', define_name='HAVE_RT')
|
||||
|
||||
conf.env['ENABLE_THREADING'] = conf.check(header_name='pthread.h', define_name='HAVE_PTHREAD_H')
|
||||
|
||||
conf.report_optional_feature("Threading", "Threading Primitives",
|
||||
@@ -54,7 +52,6 @@ def build(bld):
|
||||
'config.cc',
|
||||
'callback.cc',
|
||||
]
|
||||
core.uselib = 'RT'
|
||||
|
||||
headers = bld.new_task_gen('ns3header')
|
||||
headers.module = 'core'
|
||||
|
||||
@@ -33,9 +33,14 @@ def configure(conf):
|
||||
|
||||
conf.write_config_header('ns3/simulator-config.h')
|
||||
|
||||
conf.report_optional_feature("RealTime", "Real Time Simulator",
|
||||
conf.env['ENABLE_THREADING'],
|
||||
"threading not enabled")
|
||||
if not conf.check(lib='rt', uselib='RT', define_name='HAVE_RT'):
|
||||
conf.report_optional_feature("RealTime", "Real Time Simulator",
|
||||
False, "librt is not available")
|
||||
else:
|
||||
conf.report_optional_feature("RealTime", "Real Time Simulator",
|
||||
conf.env['ENABLE_THREADING'],
|
||||
"threading not enabled")
|
||||
conf.env["ENABLE_REAL_TIME"] = conf.env['ENABLE_THREADING']
|
||||
|
||||
|
||||
def build(bld):
|
||||
@@ -101,7 +106,7 @@ def build(bld):
|
||||
'cairo-wideint-private.h',
|
||||
])
|
||||
|
||||
if env['ENABLE_THREADING']:
|
||||
if env['ENABLE_REAL_TIME']:
|
||||
headers.source.extend([
|
||||
'realtime-simulator-impl.h',
|
||||
'wall-clock-synchronizer.h',
|
||||
@@ -110,4 +115,6 @@ def build(bld):
|
||||
'realtime-simulator-impl.cc',
|
||||
'wall-clock-synchronizer.cc',
|
||||
])
|
||||
sim.uselib = 'RT'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user