clock_gettime.patch 786 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
--- a/configure.ac	2016-08-17 11:04:37.000000000 -0400
+++ b/configure.ac	2016-08-17 11:04:33.000000000 -0400
@@ -2798,8 +2798,16 @@
 # clock_getres said only 1 millisecond.

 old_LIBS="$LIBS"
-AC_SEARCH_LIBS(clock_gettime, rt, [
-  AC_DEFINE([HAVE_CLOCK_GETTIME],1,[Define to 1 if you have the `clock_gettime' function])])
+
+AC_ARG_WITH([clock_gettime],
+            AS_HELP_STRING([--without-clock-gettime],
+                           [Ignore presence of clock_gettime and disable it]), [], [with_clock_gettime=yes])
+
+AS_IF([test "x$with_clock_gettime" = "xyes"],
+      [AC_SEARCH_LIBS(clock_gettime, rt, [
+        AC_DEFINE([HAVE_CLOCK_GETTIME],1,[Define to 1 if you have the `clock_gettime' function])])],
+      [HAVE_CLOCK_GETTIME=0])
+
 TUNE_LIBS="$LIBS"
 LIBS="$old_LIBS"