configure: fix CLOCK_MONOTONIC check for cross-compilation (#269)

In cross-compilation, we can't run test programs, so configure just
bails out. Since there is no cache variable (e.g. ac_cv_blabla, we can't
even provide the correct result.

But in thise case, we don't really need to run to start with; we just
need to check if the toolchain headers know about CLOCK_MONOTONIC.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
This commit is contained in:
yann-morin-1998 2017-10-09 11:52:44 +02:00 committed by Chrissie Caulfield
parent 9b50aa4e5b
commit ad3da47dbe

View File

@ -183,7 +183,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
)
AC_MSG_CHECKING(for a working clock_getres(CLOCK_MONOTONIC, &ts))
AC_RUN_IFELSE([AC_LANG_PROGRAM(
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#include <time.h>]],
[[struct timespec ts; if(clock_getres(CLOCK_MONOTONIC, &ts)) return -1;]])],
[