ndr_compression: use zlib's inflate() for decompression
[tprouty/samba.git] / source4 / smbd / process_model.m4
1 dnl # Server process model subsystem
2
3 SMB_ENABLE(process_model_thread,NO)
4
5 #################################################
6 # check for pthread support
7 AC_MSG_CHECKING(whether to use pthreads)
8 AC_ARG_WITH(pthreads,
9 [  --with-pthreads              Include pthreads (default=no) ],
10 [ case "$withval" in
11         yes)
12                 AC_MSG_RESULT(yes)
13                 if test x"$ac_cv_func_pread" != x"yes" -o x"$ac_cv_func_pwrite" != x"yes";then
14                         AC_MSG_ERROR([You cannot enable threads when you don't have pread/pwrite!])
15                 fi
16                 SMB_ENABLE(process_model_thread,YES)
17                 SMB_ENABLE(PTHREAD,YES)
18         ;;
19         *)
20                 AC_MSG_RESULT(no)
21         ;;
22   esac ],
23 AC_MSG_RESULT(no)
24 )
25
26 SMB_EXT_LIB(PTHREAD,[-lpthread])
27
28 AC_MSG_CHECKING(whether to search for setproctitle support)
29 AC_ARG_WITH(setproctitle,
30 [  --with-setproctitle          Search for setproctitle support (default=no)],
31 [ case "$withval" in
32         yes)
33                 AC_MSG_RESULT(yes)
34                 AC_CHECK_HEADERS(setproctitle.h)
35                 AC_CHECK_FUNC(setproctitle, [], [
36                    AC_CHECK_LIB_EXT(setproctitle, SETPROCTITLE_LIBS, setproctitle)
37                 ])
38                 AC_MSG_CHECKING(whether to use setproctitle)
39                 if test x"$ac_cv_func_setproctitle" = x"yes" -o \
40                    \( x"$ac_cv_header_setproctitle_h" = x"yes" -a \
41                     x"$ac_cv_lib_ext_setproctitle_setproctitle" = x"yes" \) ; then
42                         AC_MSG_RESULT(yes)
43                         SMB_ENABLE(SETPROCTITLE, YES)
44                         AC_DEFINE(HAVE_SETPROCTITLE,1,[Whether setproctitle() is available])
45                 else
46                         AC_MSG_RESULT(no)
47                 fi
48         ;;
49         *)
50                 AC_MSG_RESULT(no)
51         ;;
52   esac ],
53 AC_MSG_RESULT(no)
54 )
55
56 SMB_EXT_LIB(SETPROCTITLE,
57         [${SETPROCTITLE_LIBS}],
58         [${SETPROCTITLE_CFLAGS}],
59         [${SETPROCTITLE_CPPFLAGS}],
60         [${SETPROCTITLE_LDFLAGS}])