diff options
author | James Peach <jpeach@samba.org> | 2007-04-20 21:09:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:19:33 -0500 |
commit | fc8589a3371d396197fae508e563f814899c2beb (patch) | |
tree | fc347f25b4e7839e7c729c241ff74764ae3e6972 /source/configure.in | |
parent | 19c929c6330a50f278ac322ac5fcb83d03734ea2 (diff) | |
download | samba-fc8589a3371d396197fae508e563f814899c2beb.tar.gz samba-fc8589a3371d396197fae508e563f814899c2beb.tar.xz samba-fc8589a3371d396197fae508e563f814899c2beb.zip |
r22418: Support running under launchd. We abstract the method of obtaining
sockets to listen on a little, because in the launchd case these
are provided for us. We also add an idle timeout so that a daemon
can exit after a period of inactivity.
Diffstat (limited to 'source/configure.in')
-rw-r--r-- | source/configure.in | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source/configure.in b/source/configure.in index 1e9fca76f51..b4673889471 100644 --- a/source/configure.in +++ b/source/configure.in @@ -348,6 +348,35 @@ AC_ARG_WITH(selftest-prefix, esac ]) +AC_ARG_ENABLE(launchd, +[ --enable-launchd Support running under launchd (default=auto)]) + +if test x"$enable_launchd" != x"no" ; then + AC_CACHE_CHECK([whether to include launchd support], + samba_cv_launchd_support, + [ + AC_TRY_COMPILE( + [ +#include <launch.h> + ], + [ + launchd_msg(NULL); + launchd_data_get_fd(NULL); + ], + samba_cv_launchd_support=yes, + samba_cv_launchd_support=no) + ]) + + if test x"$samba_cv_launchd_support" = x"yes" ; then + AC_DEFINE(WITH_LAUNCHD_SUPPORT, 1, + [Whether launchd support should be enabled]) + else + if test x"$enable_launchd" = x"yes" ; then + AC_ERROR(launchd support is not available) + fi + fi +fi + ################################################# # set path of samba4's smbtorture smbtorture4_path="" |