[chrony-dev] [PATCH] Add option --without-clock-gettime to disable clock_gettime even if present |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: [chrony-dev] [PATCH] Add option --without-clock-gettime to disable clock_gettime even if present
- From: Bryan Christianson <bryan@xxxxxxxxxxxxx>
- Date: Tue, 23 Aug 2016 01:03:24 +1200
- Cc: Bryan Christianson <bryan@xxxxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpcorp.com; s=a0-2; h=Feedback-ID:X-Smtpcorp-Track:Message-Id:Date: Subject:To:From:List-Unsubscribe:Reply-To; bh=/iLsgmaYbghs9YprWRelVhEAtUrONp2bmHgldPEVbnk=; b=NoxygSDPcNTA/G3Ga3ZhnFd+ar R6YT/+/9sOa/m76KHXZZ6gzLZtoUVNOoz+QYH4tdy7IhBuAEmNny2vQBtcV9KCiNhrC8iQliy7hdz Mo/+OJKuB2dHXyZ+VCg5Bb/r/POETC23UhNttS0iAFW0MLjvNSQJF3tCpU98p79cSSkMJF9sj5twq dnQLE0UJdQVtZd2ds5/RRtHcQC1h2UR733TCWrzif+9JFXAXlgXovHViv9M/z7E7I7YqNJLf88JqD pFeiNrWqBgXDN/sVUh+gt4lNNgSAIm3GCMU2A2pEL1Ny0M+fjqJl0pyvpxX0/PvJ75ZNeQuZKEMD5 XfES1hCg==;
- Feedback-id: 149811m:149811acx33YQ:149811seDne8UarS:SMTPCORP
clock_gettime() will be ignored even if it is present
---
configure | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/configure b/configure
index 9857295..d1fee97 100755
--- a/configure
+++ b/configure
@@ -85,6 +85,7 @@ For better control, use the options below.
--readline-lib-dir=DIR Specify where readline lib directory is
--with-ncurses-library=DIR Specify where ncurses lib directory is
--disable-sechash Disable support for hashes other than MD5
+ --without-clock-gettime Don't use clock_gettime even if it is available
--without-nss Don't use NSS even if it is available
--without-tomcrypt Don't use libtomcrypt even if it is available
--disable-cmdmon Disable command and monitoring support
@@ -194,6 +195,7 @@ feat_readline=1
try_readline=1
try_editline=1
feat_sechash=1
+try_clock_gettime=1
try_nss=1
try_tomcrypt=1
feat_rtc=1
@@ -338,6 +340,9 @@ do
--disable-sechash )
feat_sechash=0
;;
+ --without-clock-gettime )
+ try_clock_gettime=0
+ ;;
--without-nss )
try_nss=0
;;
@@ -569,18 +574,20 @@ then
fi
fi
-if test_code 'clock_gettime()' 'time.h' '' '' \
- 'clock_gettime(CLOCK_REALTIME, NULL);'
-then
- add_def HAVE_CLOCK_GETTIME
-else
- if test_code 'clock_gettime() in -lrt' 'time.h' '' '-lrt' \
+if [ $try_clock_gettime = "1" ]; then
+ if test_code 'clock_gettime()' 'time.h' '' '' \
'clock_gettime(CLOCK_REALTIME, NULL);'
then
add_def HAVE_CLOCK_GETTIME
- EXTRA_LIBS="$EXTRA_LIBS -lrt"
else
- try_phc=0
+ if test_code 'clock_gettime() in -lrt' 'time.h' '' '-lrt' \
+ 'clock_gettime(CLOCK_REALTIME, NULL);'
+ then
+ add_def HAVE_CLOCK_GETTIME
+ EXTRA_LIBS="$EXTRA_LIBS -lrt"
+ else
+ try_phc=0
+ fi
fi
fi
--
2.8.4 (Apple Git-73)
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.