mirror of
https://github.com/moparisthebest/curl
synced 2024-11-12 04:25:08 -05:00
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
This commit is contained in:
parent
c5d060cab4
commit
a284b0ebc4
40
configure.ac
40
configure.ac
@ -1509,6 +1509,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
|
if test X"$HAVECRYPTO" = X"yes"; then
|
||||||
dnl This is only reasonable to do if crypto actually is there: check for
|
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
|
dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
|
||||||
|
Loading…
Reference in New Issue
Block a user