summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid CARLIER <devnexen@gmail.com>2021-02-21 17:52:52 +0000
committerdormando <dormando@rydia.net>2022-08-25 20:35:04 -0700
commit8f478cdaf50c1467fc2191ac1c3a8e85ec2efcff (patch)
tree5197b5a3ffec2625e8417d3b95f8b08a9b5ada5b /configure.ac
parented110bb0db938810d8fdb9d4e4b2fef9ab0bf5ac (diff)
downloadmemcached-8f478cdaf50c1467fc2191ac1c3a8e85ec2efcff.tar.gz
MacOS drop privileges support
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 34a457b..ba162cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -803,11 +803,21 @@ AC_CHECK_FUNCS(cap_enter, [
], [])
],[])
+AC_CHECK_FUNCS(sandbox_init, [
+ AC_CHECK_HEADER(sandbox.h, [
+ AC_DEFINE([HAVE_DROP_PRIVILEGES], 1,
+ [Define this if you have an implementation of drop_privileges()])
+ build_darwin_privs=yes
+ ], [])
+],[])
+
+
AM_CONDITIONAL([BUILD_SOLARIS_PRIVS],[test "$build_solaris_privs" = "yes"])
AM_CONDITIONAL([BUILD_LINUX_PRIVS],[test "$build_linux_privs" = "yes"])
AM_CONDITIONAL([BUILD_OPENBSD_PRIVS],[test "$build_openbsd_privs" = "yes"])
AM_CONDITIONAL([BUILD_FREEBSD_PRIVS],[test "$build_freebsd_privs" = "yes"])
+AM_CONDITIONAL([BUILD_DARWIN_PRIVS],[test "$build_darwin_privs" = "yes"])
AC_ARG_ENABLE(docs,
[AS_HELP_STRING([--disable-docs],[Disable documentation generation])])