configure: add option --without-clock-gettime

clock_gettime() will be ignored even if it is present
This commit is contained in:
Bryan Christianson 2016-08-23 01:03:24 +12:00 committed by Miroslav Lichvar
parent a8886603c2
commit f63e414024

10
configure vendored
View file

@ -100,6 +100,7 @@ For better control, use the options below.
--without-seccomp Don't use seccomp even if it is available
--disable-asyncdns Disable asynchronous name resolving
--disable-forcednsretry Don't retry on permanent DNS error
--without-clock-gettime Don't use clock_gettime() even if it is available
--enable-ntp-signd Enable support for MS-SNTP authentication in Samba
--with-ntp-era=SECONDS Specify earliest assumed NTP time in seconds
since 1970-01-01 [50*365 days ago]
@ -215,6 +216,7 @@ try_setsched=0
try_lockmem=0
feat_asyncdns=1
feat_forcednsretry=1
try_clock_gettime=1
feat_ntp_signd=0
ntp_era_split=""
default_user="root"
@ -320,6 +322,9 @@ do
--disable-forcednsretry)
feat_forcednsretry=0
;;
--without-clock-gettime)
try_clock_gettime=0
;;
--enable-ntp-signd)
feat_ntp_signd=1
;;
@ -569,6 +574,7 @@ then
fi
fi
if [ $try_clock_gettime = "1" ]; then
if test_code 'clock_gettime()' 'time.h' '' '' \
'clock_gettime(CLOCK_REALTIME, NULL);'
then
@ -579,8 +585,7 @@ else
then
add_def HAVE_CLOCK_GETTIME
EXTRA_LIBS="$EXTRA_LIBS -lrt"
else
try_phc=0
fi
fi
fi
@ -688,6 +693,7 @@ then
fi
if [ $feat_refclock = "1" ] && [ $feat_phc = "1" ] && [ $try_phc = "1" ] && \
grep '#define HAVE_CLOCK_GETTIME' config.h > /dev/null && \
test_code '<linux/ptp_clock.h>' 'sys/ioctl.h linux/ptp_clock.h' '' '' \
'ioctl(1, PTP_CLOCK_GETCAPS, 0);'
then