summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJefty Negapatan <jefty.dev@gmail.com>2020-04-11 15:12:11 +0200
committerdormando <dormando@rydia.net>2020-04-11 18:04:38 -0700
commitbbc544e52b3044831387ec70bb63f7c6abba9b3b (patch)
tree6ca2796355fe560cd372c3c01e6ba90b2da934b8 /configure.ac
parent05a794b2e9c2001c7d9000d648da64af3f8c9ade (diff)
downloadmemcached-bbc544e52b3044831387ec70bb63f7c6abba9b3b.tar.gz
Add build option to disable unix socket functionality.
1. configure.ac - Add --disable-unix-socket to disable and define DISABLE_UNIX_SOCKET. 2. memcached.* - Guard all unix socket-related codes with DISABLE_UNIX_SOCKET. Take note of negative checking (#ifndef DISABLE_UNIX_SOCKET instead of #ifdef UNIX_SOCKET). This is just to make sure that current code even without a config file is the default or supports unix socket. 3. t/ - Check first if unix socket is supported before executing some unix socket-related tests.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c0c2c53..451b5ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,6 +110,9 @@ AC_ARG_ENABLE(asan,
AC_ARG_ENABLE(static,
[AS_HELP_STRING([--enable-static], [Compile a statically linked binary])])
+AC_ARG_ENABLE(unix_socket,
+ [AS_HELP_STRING([--disable-unix-socket], [Disable unix domain socket])])
+
dnl **********************************************************************
dnl DETECT_SASL_CB_GETCONF
dnl
@@ -218,6 +221,10 @@ if test "x$enable_static" = "xyes"; then
AC_DEFINE([STATIC],1,[Set to nonzero if you want to compile a statically linked binary])
fi
+if test "x$enable_unix_socket" = "xno"; then
+ AC_DEFINE([DISABLE_UNIX_SOCKET],1,[Set to nonzero if you want to disable unix domain socket])
+fi
+
AM_CONDITIONAL([BUILD_DTRACE],[test "$build_dtrace" = "yes"])
AM_CONDITIONAL([DTRACE_INSTRUMENT_OBJ],[test "$dtrace_instrument_obj" = "yes"])
AM_CONDITIONAL([ENABLE_SASL],[test "$enable_sasl" = "yes"])
@@ -226,6 +233,7 @@ AM_CONDITIONAL([ENABLE_ARM_CRC32],[test "$enable_arm_crc32" = "yes"])
AM_CONDITIONAL([ENABLE_TLS],[test "$enable_tls" = "yes"])
AM_CONDITIONAL([ENABLE_ASAN],[test "$enable_asan" = "yes"])
AM_CONDITIONAL([ENABLE_STATIC],[test "$enable_static" = "yes"])
+AM_CONDITIONAL([DISABLE_UNIX_SOCKET],[test "$enable_unix_socket" = "no"])
AC_SUBST(DTRACE)