From: Gabe Black Date: Sat, 22 Jan 2011 01:51:22 +0000 (-0800) Subject: SConstruct: Fix the librt check in SConstruct. X-Git-Tag: stable_2012_02_02~631 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0e64e1be0fc1ec7586dfb2171585608f713bfc4e;p=gem5.git SConstruct: Fix the librt check in SConstruct. --- 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."