2004-02-02 16:43:03 +03:00
dnl # Server process model subsystem
2005-10-29 01:13:30 +04:00
SMB_ENABLE(process_model_thread,NO)
2004-11-15 14:13:35 +03:00
2004-02-02 16:43:03 +03:00
#################################################
# check for pthread support
AC_MSG_CHECKING(whether to use pthreads)
AC_ARG_WITH(pthreads,
[ --with-pthreads Include pthreads (default=no) ],
[ case "$withval" in
yes)
AC_MSG_RESULT(yes)
2004-05-17 11:17:51 +04:00
if test x"$ac_cv_func_pread" != x"yes" -o x"$ac_cv_func_pwrite" != x"yes";then
AC_MSG_ERROR([You cannot enable threads when you don't have pread/pwrite!])
fi
2005-10-29 01:13:30 +04:00
SMB_ENABLE(process_model_thread,YES)
2006-04-26 16:22:54 +04:00
SMB_ENABLE(PTHREAD,YES)
2004-02-02 16:43:03 +03:00
;;
*)
AC_MSG_RESULT(no)
;;
esac ],
AC_MSG_RESULT(no)
)
2004-05-13 14:20:53 +04:00
SMB_EXT_LIB(PTHREAD,[-lpthread])
2006-03-09 20:48:41 +03:00
2006-03-09 23:30:36 +03:00
AC_MSG_CHECKING(whether to search for setproctitle support)
AC_ARG_WITH(setproctitle,
[ --with-setproctitle Search for setproctitle support (default=no)],
[ case "$withval" in
yes)
AC_MSG_RESULT(yes)
AC_CHECK_HEADERS(setproctitle.h)
2006-04-23 19:34:47 +04:00
AC_CHECK_FUNC(setproctitle, [], [
AC_CHECK_LIB_EXT(setproctitle, SETPROCTITLE_LIBS, setproctitle)
])
2006-03-09 23:30:36 +03:00
AC_MSG_CHECKING(whether to use setproctitle)
2006-04-24 02:45:54 +04:00
if test x"$ac_cv_func_setproctitle" = x"yes" -o \
\( x"$ac_cv_header_setproctitle_h" = x"yes" -a \
x"$ac_cv_lib_ext_setproctitle_setproctitle" = x"yes" \) ; then
2006-03-09 23:30:36 +03:00
AC_MSG_RESULT(yes)
2006-04-26 16:22:54 +04:00
SMB_ENABLE(SETPROCTITLE, YES)
2006-03-09 23:30:36 +03:00
AC_DEFINE(HAVE_SETPROCTITLE,1,[Whether setproctitle() is available])
2006-04-24 02:45:54 +04:00
else
2006-03-09 23:30:36 +03:00
AC_MSG_RESULT(no)
fi
;;
*)
AC_MSG_RESULT(no)
;;
esac ],
AC_MSG_RESULT(no)
)
2006-03-09 20:48:41 +03:00
SMB_EXT_LIB(SETPROCTITLE,
[${SETPROCTITLE_LIBS}],
[${SETPROCTITLE_CFLAGS}],
[${SETPROCTITLE_CPPFLAGS}],
[${SETPROCTITLE_LDFLAGS}])