r14079: I just found the setproctitle library from alt linux:-)
[jelmer/samba4-debian.git] / source / smbd / process_model.m4
index 673d5e5e2b1d09a1f18e9c3132103bf974ce8a85..ea7373e4f71ebdb6169ef4fd03825c67fc4d50a2 100644 (file)
@@ -24,3 +24,20 @@ 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
+
+SMB_EXT_LIB(SETPROCTITLE,
+       [${SETPROCTITLE_LIBS}],
+       [${SETPROCTITLE_CFLAGS}],
+       [${SETPROCTITLE_CPPFLAGS}],
+       [${SETPROCTITLE_LDFLAGS}])