Skip to content

Commit

Permalink
Improved libcrypto detection on osx
Browse files Browse the repository at this point in the history
  • Loading branch information
edenhill committed Dec 1, 2018
1 parent e06ef78 commit 11b43e4
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions configure.librdkafka
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ void foo (void) {
mkl_allvar_set WITH_PLUGINS WITH_PLUGINS y
fi

if [[ $MKL_DISTRO == "osx" ]]; then
# Add brew's OpenSSL pkg-config path on OSX
# to avoid picking up the outdated system-provided openssl / libcrypto.
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig"
fi


# optional libs
mkl_lib_check "zlib" "WITH_ZLIB" disable CC "-lz" \
"#include <zlib.h>"
Expand Down Expand Up @@ -121,17 +128,6 @@ void foo (void) {
mkl_allvar_set WITH_SOCKEM WITH_SOCKEM y

if [[ "$ENABLE_SSL" == "y" ]]; then
if [[ $MKL_DISTRO == "osx" ]]; then
# Add brew's OpenSSL pkg-config path on OSX
# to avoid picking up the outdated system-provided openssl.
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig"
fi

# Some platforms, OSX Mojave in particular, require
# explicit linking of libcrypto.
mkl_lib_check "libcrypto" "" disable CC "-lcrypto" \
"#include <openssl/ssl.h>"

mkl_meta_set "libssl" "deb" "libssl-dev"
mkl_lib_check "libssl" "WITH_SSL" disable CC "-lssl" \
"#include <openssl/ssl.h>"
Expand Down

0 comments on commit 11b43e4

Please sign in to comment.