From cacfd6ee01382c7d52a7cdefa30c87bfe347af23 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 2 May 2009 17:14:36 +0200 Subject: Explicitly link in pthreads for lib/pthreadpool if required No idea why it works on my Linux without -lpthread ... :-) --- source3/configure.in | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3') 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 -- cgit