1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-04 16:45:06 -05:00

configure: Add dependent libraries after crypto

The linker is pretty dumb and processes things left to right, keeping a
tally of symbols it hasn't resolved yet. So, we need -ldl to appear
after -lcrypto otherwise the linker won't find the dl functions.

Closes #2684
This commit is contained in:
Max Dymond 2018-06-26 09:29:48 +01:00
parent be231ef88a
commit b0a365f8a0
No known key found for this signature in database
GPG Key ID: 12A8D9E2219BD5FA

View File

@ -1657,7 +1657,7 @@ if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
dnl still no, but what about with -ldl?
AC_MSG_CHECKING([OpenSSL linking with -ldl])
LIBS="$LIBS -ldl -lcrypto"
LIBS="$CLEANLIBS -lcrypto -ldl"
AC_TRY_LINK(
[
#include <openssl/err.h>
@ -1671,10 +1671,10 @@ if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
],
[
AC_MSG_RESULT(no)
dnl ok, so what about bouth -ldl and -lpthread?
dnl ok, so what about both -ldl and -lpthread?
AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread])
LIBS="$CLEANLIBS -ldl -lpthread -lcrypto"
LIBS="$CLEANLIBS -lcrypto -ldl -lpthread"
AC_TRY_LINK(
[
#include <openssl/err.h>