From: Emeric Brun Date: Fri, 18 May 2012 13:48:30 +0000 (+0200) Subject: BUILD: add optional support for SSL via the USE_OPENSSL flag X-Git-Tag: v1.5-dev12~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7444f01ede51846163ce2a840b4cac0e553d2abf;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/Makefile b/Makefile index 73df39738b..e927fca16f 100644 --- a/Makefile +++ b/Makefile @@ -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