diff options
author | Daniel Stone <daniel@fooishbar.org> | 2007-08-01 20:34:58 +0300 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2007-08-01 21:05:04 +0300 |
commit | 99a88826e5e8cfa25c5f8a88c12799d33114729c (patch) | |
tree | 3091972ea7071bdcde8b113becdfb5cc689e3792 | |
parent | 1c80e04f876e9254b93ef87eadfcff71234340c6 (diff) |
configure.ac: Actually use -lrt in monotonic clock test
If we need -lrt to use clock_gettime, then make sure we link with it.
-rw-r--r-- | configure.ac | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index ffcc72d4d..728b79a2a 100644 --- a/configure.ac +++ b/configure.ac @@ -1070,6 +1070,9 @@ if ! test "x$have_clock_gettime" = xno; then CLOCK_LIBS="" fi + LIBS_SAVE="$LIBS" + LIBS="$CLOCK_LIBS" + AC_RUN_IFELSE([ #define _POSIX_C_SOURCE 199309L #include <time.h> @@ -1084,6 +1087,8 @@ int main(int argc, char *argv[]) { } ], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no], [MONOTONIC_CLOCK="cross compiling"]) + + LIBS="$LIBS_SAVE" else MONOTONIC_CLOCK=no fi |