diff options
author | Daniel Stenberg <daniel@haxx.se> | 2015-07-25 10:52:49 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-07-25 10:52:49 +0200 |
commit | a284b0ebc4c4572fcbb69df9783a4049ace3e6ec (patch) | |
tree | 9bfa7e7863b7a03022784d4018cce619f6ac031d | |
parent | c5d060cab47037163fa803a598fedd9e989ca83b (diff) | |
download | curl-a284b0ebc4c4572fcbb69df9783a4049ace3e6ec.tar.gz |
configure: check if OpenSSL linking wants -ldl
To make it easier to link with static versions of OpenSSL, the configure
script now checks if -ldl is needed for linking.
Help-by: TJ Saunders
-rw-r--r-- | configure.ac | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 162b2d6e7..ce651791d 100644 --- a/configure.ac +++ b/configure.ac @@ -1510,6 +1510,46 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then if test X"$HAVECRYPTO" = X"yes"; then + AC_MSG_CHECKING([OpenSSL linking without -ldl]) + saved_libs=$LIBS + AC_TRY_LINK( + [ + #include <openssl/evp.h> + ], + [ + SSLeay_add_all_algorithms(); + ], + [ + AC_MSG_RESULT(yes) + LIBS="$saved_libs" + ], + [ + AC_MSG_RESULT(no) + AC_MSG_CHECKING([OpenSSL linking with -ldl]) + LIBS="-ldl $LIBS" + AC_TRY_LINK( + [ + #include <openssl/evp.h> + ], + [ + SSLeay_add_all_algorithms(); + ], + [ + AC_MSG_RESULT(yes) + LIBS="$saved_libs -ldl" + ], + [ + AC_MSG_RESULT(no) + LIBS="$saved_libs" + ] + ) + + ] + ) + + fi + + if test X"$HAVECRYPTO" = X"yes"; then dnl This is only reasonable to do if crypto actually is there: check for dnl SSL libs NOTE: it is important to do this AFTER the crypto lib |