From: Miroslav Lichvar Date: Fri, 15 Nov 2013 12:21:40 +0000 (+0100) Subject: Link with -lrt for clock_gettime() if needed X-Git-Tag: 1.30-pre1~180 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c38dbcc6b558d9c01e6316b1b3cbbf4836626607;p=thirdparty%2Fchrony.git Link with -lrt for clock_gettime() if needed --- diff --git a/configure b/configure index e508f597..98541f79 100755 --- a/configure +++ b/configure @@ -454,7 +454,16 @@ if [ $feat_phc = "1" ] && [ $try_phc = "1" ] && \ test_code '' 'sys/ioctl.h linux/ptp_clock.h' '' '' \ 'ioctl(1, PTP_CLOCK_GETCAPS, 0);' then + if test_code 'clock_gettime()' 'time.h' '' '' 'clock_gettime(0, NULL);'; then add_def FEAT_PHC + else + if test_code 'clock_gettime() in -lrt' 'time.h' '' '-lrt' \ + 'clock_gettime(0, NULL);' + then + EXTRA_LIBS="$EXTRA_LIBS -lrt" + add_def FEAT_PHC + fi + fi fi if [ $try_setsched = "1" ] && \