Skip to content

Commit 2188ce3

Browse files
committed
CDRIVER-3813 correct linkage when using static OpenSSL
1 parent c99f53b commit 2188ce3

File tree

6 files changed

+2773
-53
lines changed

6 files changed

+2773
-53
lines changed

.evergreen/compile-unix.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,11 @@ fi
126126
[ "$DEBUG" = "ON" ] && CONFIGURE_FLAGS=$DEBUG_FLAGS || CONFIGURE_FLAGS=$RELEASE_FLAGS
127127

128128
CONFIGURE_FLAGS="$CONFIGURE_FLAGS -DENABLE_SASL=${SASL}"
129-
CONFIGURE_FLAGS="$CONFIGURE_FLAGS -DENABLE_SSL=${SSL}"
129+
if [ "${SSL}" = "OPENSSL_STATIC" ]; then
130+
CONFIGURE_FLAGS="$CONFIGURE_FLAGS -DENABLE_SSL=OPENSSL -DOPENSSL_USE_STATIC_LIBS=ON"
131+
else
132+
CONFIGURE_FLAGS="$CONFIGURE_FLAGS -DENABLE_SSL=${SSL}"
133+
fi
130134
[ "$COVERAGE" = "ON" ] && CONFIGURE_FLAGS="$CONFIGURE_FLAGS -DENABLE_COVERAGE=ON -DENABLE_EXAMPLES=OFF"
131135

132136
if [ "$RELEASE" = "ON" ]; then

.evergreen/compile-windows.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -o errexit # Exit the script with error if any of the commands fail
55

66
# Supported/used environment variables:
77
# CC Which compiler to use
8-
# SSL OPENSSL, WINDOWS, or OFF
8+
# SSL OPENSSL, OPENSSL_STATIC, WINDOWS, or OFF
99
# SASL AUTO, SSPI, CYRUS, or OFF
1010
# SRV Whether to enable SRV: ON or OFF
1111
# RELEASE Enable release-build MSVC flags (default: debug flags)
@@ -42,6 +42,9 @@ case "$SSL" in
4242
OPENSSL)
4343
CONFIGURE_FLAGS="$CONFIGURE_FLAGS -DENABLE_SSL=OPENSSL"
4444
;;
45+
OPENSSL_STATIC)
46+
CONFIGURE_FLAGS="$CONFIGURE_FLAGS -DENABLE_SSL=OPENSSL -DOPENSSL_USE_STATIC_LIBS=ON"
47+
;;
4548
WINDOWS)
4649
CONFIGURE_FLAGS="$CONFIGURE_FLAGS -DENABLE_SSL=WINDOWS"
4750
;;

0 commit comments

Comments
 (0)