summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2011-01-21 17:51:22 -0800
committerGabe Black <gblack@eecs.umich.edu>2011-01-21 17:51:22 -0800
commit0e64e1be0fc1ec7586dfb2171585608f713bfc4e (patch)
treeb147cef161e6306a25c7f2fa658612ccdf8b9386
parent5c99ae60b80bec0edfef0e773bae4824423d5fae (diff)
downloadgem5-0e64e1be0fc1ec7586dfb2171585608f713bfc4e.tar.xz
SConstruct: Fix the librt check in SConstruct.
-rwxr-xr-xSConstruct7
1 files changed, 5 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index 6127113b6..9bfd1d1c8 100755
--- a/SConstruct
+++ b/SConstruct
@@ -704,8 +704,11 @@ if not conf.CheckLibWithHeader('z', 'zlib.h', 'C++','zlibVersion();'):
Exit(1)
# Check for librt.
-have_posix_clock = conf.CheckLib(None, 'clock_nanosleep', 'time.h') or \
- conf.CheckLib('rt', 'clock_nanosleep', 'time.h')
+have_posix_clock = \
+ conf.CheckLibWithHeader(None, 'time.h', 'C',
+ 'clock_nanosleep(0,0,NULL,NULL);') or \
+ conf.CheckLibWithHeader('rt', 'time.h', 'C',
+ 'clock_nanosleep(0,0,NULL,NULL);')
if not have_posix_clock:
print "Can't find library for POSIX clocks."