From 0db96c5ba5027a7e4058e48b6c0199d9bee94484 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Mon, 29 Nov 2010 14:46:42 +0100 Subject: [PATCH] make it possible to set SSL_LIB and CRYPTO_LIB during build --- Makefile | 2 ++ mongoose.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Makefile b/Makefile index d2953756..faef3550 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,8 @@ all: # -DNO_SSL - disable SSL functionality (-2kb) # -DCONFIG_FILE=\"file\" - use `file' as the default config file # -DHAVE_STRTOUI64 - use system strtoui64() function for strtoull() +# -DSSL_LIB=\"libssl.so.\" - use system versioned SSL shared object +# -DCRYPTO_LIB=\"libcrypto.so.\" - use system versioned CRYPTO so ########################################################################## diff --git a/mongoose.c b/mongoose.c index 2d05f262..798f6419 100644 --- a/mongoose.c +++ b/mongoose.c @@ -181,9 +181,13 @@ typedef struct DIR { #define SSL_LIB "libssl.dylib" #define CRYPTO_LIB "libcrypto.dylib" #else +#if !defined(SSL_LIB) #define SSL_LIB "libssl.so" +#endif +#if !defined(CRYPTO_LIB) #define CRYPTO_LIB "libcrypto.so" #endif +#endif #define DIRSEP '/' #define IS_DIRSEP_CHAR(c) ((c) == '/') #define O_BINARY 0