summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-05-02 17:14:36 +0200
committerVolker Lendecke <vl@samba.org>2009-05-02 17:15:02 +0200
commitcacfd6ee01382c7d52a7cdefa30c87bfe347af23 (patch)
tree5ab16ab54c22dc5f02abe74f1be7c971029e39c6 /source3
parent4b3e89c2e7f5e36edd436fccefb852a616ef2110 (diff)
downloadsamba-cacfd6ee01382c7d52a7cdefa30c87bfe347af23.tar.gz
samba-cacfd6ee01382c7d52a7cdefa30c87bfe347af23.tar.bz2
samba-cacfd6ee01382c7d52a7cdefa30c87bfe347af23.zip
Explicitly link in pthreads for lib/pthreadpool if required
No idea why it works on my Linux without -lpthread ... :-)
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index fc925ee736..0796ff2d7d 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -6059,6 +6059,9 @@ AC_ARG_ENABLE(pthreadpool,
[AS_HELP_STRING([--enable-pthreadpool], [Enable pthreads pool helper support (default=auto)])])
if test x"$enable_pthreadpool" != x"no" -a x"$samba_cv_HAVE_PTHREAD" = x"yes"; then
+ AC_TRY_LINK([#include "pthread.h"],
+ [pthread_create(NULL, NULL, NULL, NULL)],
+ ,LIBS="$LIBS -lpthread")
AC_DEFINE(WITH_PTHREADPOOL, 1, [Whether to include pthreadpool helpers])
AC_SUBST(PTHREADPOOL_OBJ, "lib/pthreadpool.o")
fi