Link order should list libraries after the libraries that use them,
so when we're guessing that we might also need to add -ldl in order
to use -lssl, we should add -ldl after -lssl.
Closes https://github.com/curl/curl/pull/2234
dnl still no, but what about with -ldl?
AC_MSG_CHECKING([OpenSSL linking with -ldl])
- LIBS="-ldl $LIBS"
+ LIBS="$LIBS -ldl"
AC_TRY_LINK(
[
#include <openssl/err.h>
dnl ok, so what about bouth -ldl and -lpthread?
AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread])
- LIBS="-lpthread $LIBS"
+ LIBS="$LIBS -lpthread"
AC_TRY_LINK(
[
#include <openssl/err.h>