summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac6
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 7f597d715f..006f334c93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -206,13 +206,17 @@ AC_PROG_LIBTOOL
dnl No fork on MinGW, disable some self-tests until we fix them.
dnl Check clock_gettime and pthread_mutex_lock in libc (avoid linking to other libs)
-AC_CHECK_FUNCS([fork getrusage getpwuid_r daemon getpid clock_gettime pthread_mutex_lock],,)
+AC_CHECK_FUNCS([fork getrusage getpwuid_r nanosleep daemon getpid clock_gettime pthread_mutex_lock],,)
AM_CONDITIONAL(HAVE_FORK, test "$ac_cv_func_fork" != "no")
if test "$ac_cv_func_pthread_mutex_lock" != "yes";then
AC_LIB_HAVE_LINKFLAGS(pthread,, [#include <pthread.h>], [pthread_mutex_lock (0);])
fi
+if test "$ac_cv_func_nanosleep" != "yes";then
+ AC_LIB_HAVE_LINKFLAGS(rt,, [#include <time.h>], [nanosleep (0, 0);])
+fi
+
AC_MSG_CHECKING([whether to build libdane])
AC_ARG_ENABLE(libdane,
AS_HELP_STRING([--disable-libdane],