BUILD: add optional support for SSL via the USE_OPENSSL flag

When this flag is set, the SSL data layer is enabled.
At the moment, only the GNU makefile was touched, the other ones
make the option handling a bit tricky.
This commit is contained in:
Emeric Brun 2012-05-18 15:48:30 +02:00 committed by Willy Tarreau
parent e1f38dbb44
commit 7444f01ede

View File

@ -25,6 +25,7 @@
# USE_CRYPT_H : set it if your system requires including crypt.h
# USE_VSYSCALL : enable vsyscall on Linux x86, bypassing libc
# USE_GETADDRINFO : use getaddrinfo() to resolve IPv6 host names.
# USE_OPENSSL : enable use of OpenSSL. Recommended, but see below.
#
# Options can be forced by specifying "USE_xxx=1" or can be disabled by using
# "USE_xxx=" (empty string).
@ -462,6 +463,17 @@ DLMALLOC_THRES = 4096
OPTIONS_OBJS += src/dlmalloc.o
endif
ifneq ($(USE_OPENSSL),)
# OpenSSL is packaged in various forms and with various dependences.
# In general -lssl is enough, but on some platforms, -lcrypto may be needed,
# as well as -lz. Pass them in the "ADDLIB" variable if needed. Similarly,
# use ADDINC and ADDLIB to specify -I and -L if your OpenSSL library is not
# in the standard path.
OPTIONS_CFLAGS += -DUSE_OPENSSL
OPTIONS_LDFLAGS += -lssl
OPTIONS_OBJS += src/ssl_sock.o
endif
ifneq ($(USE_PCRE),)
# PCREDIR is the directory hosting include/pcre.h and lib/libpcre.*. It is
# automatically detected but can be forced if required. Forcing it to an empty