configure.ac: Actually use -lrt in monotonic clock test
If we need -lrt to use clock_gettime, then make sure we link with it.
This commit is contained in:
parent
1c80e04f87
commit
99a88826e5
|
@ -1070,6 +1070,9 @@ if ! test "x$have_clock_gettime" = xno; then
|
||||||
CLOCK_LIBS=""
|
CLOCK_LIBS=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
LIBS_SAVE="$LIBS"
|
||||||
|
LIBS="$CLOCK_LIBS"
|
||||||
|
|
||||||
AC_RUN_IFELSE([
|
AC_RUN_IFELSE([
|
||||||
#define _POSIX_C_SOURCE 199309L
|
#define _POSIX_C_SOURCE 199309L
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
@ -1084,6 +1087,8 @@ int main(int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no],
|
], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no],
|
||||||
[MONOTONIC_CLOCK="cross compiling"])
|
[MONOTONIC_CLOCK="cross compiling"])
|
||||||
|
|
||||||
|
LIBS="$LIBS_SAVE"
|
||||||
else
|
else
|
||||||
MONOTONIC_CLOCK=no
|
MONOTONIC_CLOCK=no
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user