Revert "configure: Cache result of pthread_condattr_setclock() check"
This reverts commit 8d79bfa831 as it does
not provide any advantage over setting ac_cv_func_pthread_condattr_setclock=no.
References #1502.
This commit is contained in:
+18
-22
@@ -512,28 +512,24 @@ AC_COMPILE_IFELSE(
|
|||||||
# check if pthread_condattr_setclock(CLOCK_MONOTONIC) is supported
|
# check if pthread_condattr_setclock(CLOCK_MONOTONIC) is supported
|
||||||
saved_LIBS=$LIBS
|
saved_LIBS=$LIBS
|
||||||
LIBS=$PTHREADLIB
|
LIBS=$PTHREADLIB
|
||||||
AC_CACHE_CHECK([for pthread_condattr_setclock(CLOCK_MONOTONIC)],
|
AC_MSG_CHECKING([for pthread_condattr_setclock(CLOCK_MONOTONIC)])
|
||||||
[ss_cv_func_pthread_condattr_setclock_monotonic],
|
AC_RUN_IFELSE(
|
||||||
[AC_RUN_IFELSE(
|
[AC_LANG_SOURCE(
|
||||||
[AC_LANG_SOURCE(
|
[[#include <pthread.h>
|
||||||
[[#include <pthread.h>
|
int main() { pthread_condattr_t attr;
|
||||||
int main() { pthread_condattr_t attr;
|
pthread_condattr_init(&attr);
|
||||||
pthread_condattr_init(&attr);
|
return pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);}]])],
|
||||||
return pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);}]])],
|
[AC_MSG_RESULT([yes]);
|
||||||
[ss_cv_func_pthread_condattr_setclock_monotonic=yes],
|
AC_DEFINE([HAVE_CONDATTR_CLOCK_MONOTONIC], [],
|
||||||
[ss_cv_func_pthread_condattr_setclock_monotonic=no],
|
[pthread_condattr_setclock supports CLOCK_MONOTONIC])],
|
||||||
# Check existence of pthread_condattr_setclock if cross-compiling
|
[AC_MSG_RESULT([no])],
|
||||||
[AC_CHECK_FUNCS(pthread_condattr_setclock,
|
# Check existence of pthread_condattr_setclock if cross-compiling
|
||||||
ss_cv_func_pthread_condattr_setclock_monotonic=unknown)]
|
[AC_MSG_RESULT([unknown]);
|
||||||
)])
|
AC_CHECK_FUNCS(pthread_condattr_setclock,
|
||||||
if test x$ss_cv_func_pthread_condattr_setclock_monotonic = xyes; then
|
[AC_DEFINE([HAVE_CONDATTR_CLOCK_MONOTONIC], [],
|
||||||
AC_DEFINE([HAVE_CONDATTR_CLOCK_MONOTONIC], [],
|
[have pthread_condattr_setclock()])]
|
||||||
[pthread_condattr_setclock supports CLOCK_MONOTONIC])
|
)]
|
||||||
elif test x$ss_cv_func_pthread_condattr_setclock_monotonic = xunknown; then
|
)
|
||||||
AC_DEFINE([HAVE_CONDATTR_CLOCK_MONOTONIC], [],
|
|
||||||
[have pthread_condattr_setclock()])
|
|
||||||
fi
|
|
||||||
|
|
||||||
# check if we actually are able to configure attributes on cond vars
|
# check if we actually are able to configure attributes on cond vars
|
||||||
AC_CHECK_FUNCS(pthread_condattr_init)
|
AC_CHECK_FUNCS(pthread_condattr_init)
|
||||||
# instead of pthread_condattr_setclock Android has this function
|
# instead of pthread_condattr_setclock Android has this function
|
||||||
|
|||||||
Reference in New Issue
Block a user