aboutsummaryrefslogtreecommitdiffstats
path: root/kerl
diff options
context:
space:
mode:
authorMark Allen <[email protected]>2016-10-07 00:08:41 -0500
committerGitHub <[email protected]>2016-10-07 00:08:41 -0500
commitcf6c65648fcc6132b1fa6893678c12a89521fbb4 (patch)
tree58abbb6891c69a0c8a8eadb3472f229faefe4fdf /kerl
parentc34be6bfb21decb2ddd75bf6b27617a8bc05ad93 (diff)
parentc6568abd674df6a85ca67154068a0f19da308fd6 (diff)
downloadkerl-cf6c65648fcc6132b1fa6893678c12a89521fbb4.tar.gz
kerl-cf6c65648fcc6132b1fa6893678c12a89521fbb4.tar.bz2
kerl-cf6c65648fcc6132b1fa6893678c12a89521fbb4.zip
Merge pull request #161 from kerl/homebrew
Ask homebrew for openssl location if available
Diffstat (limited to 'kerl')
-rwxr-xr-xkerl21
1 files changed, 12 insertions, 9 deletions
diff --git a/kerl b/kerl
index 5b74a63..6acdea4 100755
--- a/kerl
+++ b/kerl
@@ -508,25 +508,28 @@ _do_build()
{
case "$KERL_SYSTEM" in
Darwin)
- # Apple removed OpenSSL from El Capitan, but its still in this
- # funky location, so set ssl headers to look here
OSVERSION=`uname -r`
RELVERSION=`get_otp_version "$1"`
case "$OSVERSION" in
- 15*)
+ 16*|15*)
echo -n $KERL_CONFIGURE_OPTIONS | grep "ssl" 1>/dev/null 2>&1
# Reminder to self: 0 from grep means the string was detected
if [ $? -ne 0 ]; then
- if [ ! -d /usr/include/openssl -o ! -d /usr/local/include/openssl ]; then
+ whichbrew=$(which brew)
+ if [ -n "$whichbrew" -a -x "$whichbrew" ]; then
+ brew_prefix=$(brew --prefix openssl)
+ if [ -n "$brew_prefix" -a -d "$brew_prefix" ]; then
+ KERL_CONFIGURE_OPTIONS="$KERL_CONFIGURE_OPTIONS --with-ssl=$brew_prefix"
+ fi
+ elif [ ! -d /usr/include/openssl -o ! -d /usr/local/include/openssl ]; then
+ # Apple removed OpenSSL from El Capitan, but its still in this
+ # funky location, so set ssl headers to look here
xc_ssl='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-migrator/sdk/MacOSX.sdk/usr'
- if [ -d "$xc_ssl/include/openssl" ]
- then
+ if [ -d "$xc_ssl/include/openssl" ]; then
KERL_CONFIGURE_OPTIONS="$KERL_CONFIGURE_OPTIONS --with-ssl=$xc_ssl"
- else
- echo 'WARNING: No OpenSSL library was found in the usual places. Your Erlang will be built without crypto support!'
fi
unset xc_ssl
- fi
+ fi
fi
;;
*)