summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c9877d8..b35da75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,6 +79,16 @@ if test "$os_unix" = "yes"; then
])
])
+ SAVE_LIBS="$LIBS"
+ PTHREAD_LIBS=
+ AC_CHECK_FUNC([pthread_create], , [
+ AC_CHECK_LIB([pthread], [pthread_create],
+ [PTHREAD_LIBS=-lpthread],
+ [AC_MSG_ERROR([could not find pthread_create])])
+ ])
+ LIBS="$SAVE_LIBS"
+ AC_SUBST(PTHREAD_LIBS)
+
AC_CHECK_FUNC([nanosleep], , [
AC_SEARCH_LIBS([nanosleep], [rt], , [
AC_MSG_ERROR([could not find nanosleep])