librt is need not for threading primitives but for the real time scheduler

This commit is contained in:
Gustavo J. A. M. Carneiro
2009-01-24 18:47:47 +00:00
parent ca8a6c03df
commit a88ba4fd5b
2 changed files with 11 additions and 7 deletions

View File

@@ -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'

View File

@@ -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'