r14095: disable setproctitle support by default
authorStefan Metzmacher <metze@samba.org>
Thu, 9 Mar 2006 20:30:36 +0000 (20:30 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:56:50 +0000 (13:56 -0500)
--with-setproctitle enables it

metze

source/smbd/process_model.m4

index ea7373e4f71ebdb6169ef4fd03825c67fc4d50a2..6e905d4f5a8caa3373cf09d4aed99e49478fe5d9 100644 (file)
@@ -25,16 +25,30 @@ AC_MSG_RESULT(no)
 
 SMB_EXT_LIB(PTHREAD,[-lpthread])
 
-AC_CHECK_HEADERS(setproctitle.h)
-AC_CHECK_LIB_EXT(setproctitle, SETPROCTITLE_LIBS, setproctitle)
-AC_MSG_CHECKING(whether to use setproctitle)
-if test x"$ac_cv_header_setproctitle_h" = x"yes" -a x"$ac_cv_lib_ext_setproctitle_setproctitle" = x"yes"; then
-       AC_MSG_RESULT(yes)
-       SMB_EXT_LIB_ENABLE(SETPROCTITLE,YES)
-       AC_DEFINE(HAVE_SETPROCTITLE,1,[Whether setproctitle() is available])
-else 
-       AC_MSG_RESULT(no)
-fi
+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)
+               AC_CHECK_LIB_EXT(setproctitle, SETPROCTITLE_LIBS, setproctitle)
+               AC_MSG_CHECKING(whether to use setproctitle)
+               if test x"$ac_cv_header_setproctitle_h" = x"yes" -a \
+                  x"$ac_cv_lib_ext_setproctitle_setproctitle" = x"yes"; then
+                       AC_MSG_RESULT(yes)
+                       SMB_EXT_LIB_ENABLE(SETPROCTITLE,YES)
+                       AC_DEFINE(HAVE_SETPROCTITLE,1,[Whether setproctitle() is available])
+               else 
+                       AC_MSG_RESULT(no)
+               fi
+       ;;
+       *)
+               AC_MSG_RESULT(no)
+       ;;
+  esac ],
+AC_MSG_RESULT(no)
+)
 
 SMB_EXT_LIB(SETPROCTITLE,
        [${SETPROCTITLE_LIBS}],