summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorMichaƂ Fita <michal.fita@gmail.com>2015-07-23 10:38:49 +0100
committerDaniel Stenberg <daniel@haxx.se>2015-07-24 00:09:29 +0200
commitcee21eb6a7752f90fe3e2ee260a31ce0a9eeaaa0 (patch)
tree1ea3ef2efdbfaa2c5b59b65f6b8d7c9459b9c00f /acinclude.m4
parentda650c1e544e3ebb7d43332d0570cd34d31e08b3 (diff)
downloadcurl-cee21eb6a7752f90fe3e2ee260a31ce0a9eeaaa0.tar.gz
configure: add --disable-rt option
This option disables any attempts in configure to create dependency on stuff requiring linking to librt.so and libpthread.so, in this case this means clock_gettime(CLOCK_MONOTONIC, &mt). We were in need to build curl which doesn't link libpthread.so to avoid the following bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16628.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m429
1 files changed, 16 insertions, 13 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index f0132a57b..782f32d64 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1851,8 +1851,10 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC], [
AC_REQUIRE([AC_HEADER_TIME])dnl
AC_CHECK_HEADERS(sys/types.h sys/time.h time.h)
AC_MSG_CHECKING([for monotonic clock_gettime])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
+ #
+ if test "x$dontwant_rt" == "xno" ; then
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -1866,17 +1868,18 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC], [
#include <time.h>
#endif
#endif
- ]],[[
- struct timespec ts;
- (void)clock_gettime(CLOCK_MONOTONIC, &ts);
- ]])
- ],[
- AC_MSG_RESULT([yes])
- ac_cv_func_clock_gettime="yes"
- ],[
- AC_MSG_RESULT([no])
- ac_cv_func_clock_gettime="no"
- ])
+ ]],[[
+ struct timespec ts;
+ (void)clock_gettime(CLOCK_MONOTONIC, &ts);
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ ac_cv_func_clock_gettime="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ ac_cv_func_clock_gettime="no"
+ ])
+ fi
dnl Definition of HAVE_CLOCK_GETTIME_MONOTONIC is intentionally postponed
dnl until library linking and run-time checks for clock_gettime succeed.
])