[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