fi
AC_CHECK_LIB(pthread, pthread_mutex_lock, [WINBIND_NSS_PTHREAD="-lpthread"
- AC_DEFINE(HAVE_PTHREAD, 1, [whether pthread exists])])
+ AC_DEFINE(HAVE_PTHREAD, 1, [whether pthread exists])
+ samba_cv_HAVE_PTHREAD=yes],
+ samba_cv_HAVE_PTHREAD=no)
AC_SUBST(WINBIND_NSS_PTHREAD)
AC_SUBST(WINBIND_NSS)
fi
fi
+#################################################
+# Check if user wants pthreadpool support
+
+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_DEFINE(WITH_PTHREADPOOL, 1, [Whether to include pthreadpool helpers])
+ AC_SUBST(PTHREADPOOL_OBJ, "lib/pthreadpool.o")
+fi
+
#################################################
# Check to see if we should use the included iniparser