aboutsummaryrefslogtreecommitdiffstats
path: root/erts/configure.in
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2014-02-13 17:16:42 +0100
committerLukas Larsson <[email protected]>2014-02-24 15:16:06 +0100
commit6c4ee8337dff6e9b680dbff0796038948d718b5a (patch)
tree049f8b8b93353547141de24c0a294674f477d565 /erts/configure.in
parentd58602adef3412b354fd521bbd4bda24a0b1a789 (diff)
downloadotp-6c4ee8337dff6e9b680dbff0796038948d718b5a.tar.gz
otp-6c4ee8337dff6e9b680dbff0796038948d718b5a.tar.bz2
otp-6c4ee8337dff6e9b680dbff0796038948d718b5a.zip
ose: Fix support for crypto
To enable it you have to modify the OSESSL variable in the ose xcomp file.
Diffstat (limited to 'erts/configure.in')
-rw-r--r--erts/configure.in29
1 files changed, 25 insertions, 4 deletions
diff --git a/erts/configure.in b/erts/configure.in
index c964327ebc..7ef29bd959 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -3940,7 +3940,7 @@ AC_SUBST(STATIC_KERBEROS_LIBS)
AC_SUBST(SSL_LINK_WITH_ZLIB)
AC_SUBST(STATIC_ZLIB_LIBS)
-std_ssl_locations="/usr/local /usr/sfw /usr /opt/local /usr/pkg /usr/local/openssl /usr/lib/openssl /usr/openssl /usr/local/ssl /usr/lib/ssl /usr/ssl"
+std_ssl_locations="/usr/local /usr/sfw /usr /opt/local /usr/pkg /usr/local/openssl /usr/lib/openssl /usr/openssl /usr/local/ssl /usr/lib/ssl /usr/ssl /"
AC_ARG_WITH(ssl-zlib,
AS_HELP_STRING([--with-ssl-zlib=PATH],
@@ -4047,6 +4047,7 @@ for a in ssl crypto ssh; do
done
SSL_DYNAMIC_ONLY=$enable_dynamic_ssl
+SSL_STATIC_ONLY=no
case "$erl_xcomp_without_sysroot-$with_ssl" in
yes-* | no-no)
@@ -4166,6 +4167,10 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in
else
is_real_ssl=no
fi
+ elif test -f "$dir/lib/powerpc/libsslcrypto.a"; then
+ SSL_CRYPTO_LIBNAME=sslcrypto
+ SSL_LIBDIR="$dir/lib/powerpc/"
+ SSL_RUNTIME_LIBDIR="$rdir/lib/powerpc/"
else
if test "x$ac_cv_sizeof_void_p" = "x8"; then
if test -f "$dir/lib64/libcrypto.a"; then
@@ -4189,9 +4194,12 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in
SSL_LIBDIR="$dir/lib"
fi
fi
- if test '!' -f $SSL_LIBDIR/libcrypto.a; then
+ if test '!' -f "$SSL_LIBDIR/lib${SSL_CRYPTO_LIBNAME}.a"; then
SSL_DYNAMIC_ONLY=yes
fi
+ if test '!' -f "$SSL_LIBDIR/lib${SSL_CRYPTO_LIBNAME}.so"; then
+ SSL_STATIC_ONLY=yes
+ fi
SSL_BINDIR="$rdir/bin"
if test "x$is_real_ssl" = "xyes" ; then
SSL_INCLUDE="-I$dir/include"
@@ -4212,13 +4220,20 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in
if test "x$ssl_found" = "xyes"; then
if test "x$MIXED_CYGWIN" = "xyes" -o "x$MIXED_MSYS" = "xyes"; then
ssl_linkable=yes
+ elif test "x${SSL_CRYPTO_LIBNAME}" = "xsslcrypto"; then
+ # This should only be triggered seen OSE
+ ssl_linkable=yes
else
saveCFLAGS="$CFLAGS"
saveLDFLAGS="$LDFLAGS"
saveLIBS="$LIBS"
CFLAGS="$CFLAGS $SSL_INCLUDE"
- LDFLAGS="$LDFLAGS -L$SSL_LIBDIR"
- LIBS="-lcrypto"
+ if test "x$SSL_STATIC_ONLY" = "xyes"; then
+ LIBS="${SSL_LIBDIR}/lib${SSL_CRYPTO_LIBNAME}.a"
+ else
+ LDFLAGS="$LDFLAGS -L$SSL_LIBDIR"
+ LIBS="$LIBS -l${SSL_CRYPTO_LIBNAME}"
+ fi
AC_TRY_LINK([
#include <stdio.h>
#include <openssl/hmac.h>],
@@ -4346,6 +4361,9 @@ dnl so it is - be adoptable
# This probably wont work, but that's what the user said, so...
SSL_LIBDIR="$with_ssl/lib"
fi
+ elif test -f "$dir/lib/powerpc/libsslcrypto.a"; then
+ SSL_CRYPTO_LIBNAME=sslcrypto
+ SSL_LIBDIR="$with_ssl/lib/powerpc/"
elif test "x$ac_cv_sizeof_void_p" = "x8"; then
if test -f "$with_ssl/lib64/libcrypto.a"; then
SSL_LIBDIR="$with_ssl/lib64"
@@ -4364,6 +4382,9 @@ dnl so it is - be adoptable
if test '!' -f $SSL_LIBDIR/libcrypto.a; then
SSL_DYNAMIC_ONLY=yes
fi
+ if test '!' -f $SSL_LIBDIR/libcrypto.so; then
+ SSL_STATIC_ONLY=yes
+ fi
SSL_INCLUDE="-I$with_ssl/include"
SSL_APP=ssl
CRYPTO_APP=crypto