MINOR: ssl: add build param USE_PRIVATE_CACHE to build cache without shared memory
It removes dependencies with futex or mutex but ssl performances decrease
using nbproc > 1 because switching process force session renegotiation.
This can be useful on small systems which never intend to run in multi-process
mode.
diff --git a/Makefile b/Makefile
index 7453198..f0533a7 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,7 @@
# USE_NETFILTER : enable netfilter on Linux. Automatic.
# USE_PCRE : enable use of libpcre for regex. Recommended.
# USE_POLL : enable poll(). Automatic.
+# USE_PRIVATE_CACHE : disable shared memory cache of ssl sessions.
# USE_REGPARM : enable regparm optimization. Recommended on x86.
# USE_SEPOLL : enable speculative epoll(). Automatic.
# USE_STATIC_PCRE : enable static libpcre. Recommended.
@@ -476,12 +477,16 @@
OPTIONS_CFLAGS += -DUSE_OPENSSL
OPTIONS_LDFLAGS += -lssl -lcrypto
OPTIONS_OBJS += src/ssl_sock.o src/shctx.o
+ifneq ($(USE_PRIVATE_CACHE),)
+OPTIONS_CFLAGS += -DUSE_PRIVATE_CACHE
+else
ifneq ($(USE_FUTEX),)
OPTIONS_CFLAGS += -DUSE_SYSCALL_FUTEX
else
OPTIONS_LDFLAGS += -lpthread
endif
endif
+endif
ifneq ($(USE_PCRE),)
# PCREDIR is the directory hosting include/pcre.h and lib/libpcre.*. It is