From 9597d2def7435bf31966d3179ff37d95c613e9b2 Mon Sep 17 00:00:00 2001 From: Michael Afanasiev Date: Thu, 7 Oct 2021 14:23:21 -0400 Subject: curl-openssl.m4: modify library order for openssl linking lcrypto may depend on lz, and configure corrently fails with when statically linking as the order is "-lz -lcrypto". This commit switches the order to "-lcrypto -lz". Closes #7826 --- m4/curl-openssl.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/m4/curl-openssl.m4 b/m4/curl-openssl.m4 index e008c4513..5309f33d2 100644 --- a/m4/curl-openssl.m4 +++ b/m4/curl-openssl.m4 @@ -437,7 +437,7 @@ if test "x$OPT_OPENSSL" != xno; then dnl still no, but what about with -ldl? AC_MSG_CHECKING([OpenSSL linking with -ldl]) - LIBS="$CLEANLIBS -lcrypto -ldl" + LIBS="-lcrypto $CLEANLIBS -ldl" AC_LINK_IFELSE([ AC_LANG_PROGRAM([[ #include ]], [[ @@ -453,7 +453,7 @@ if test "x$OPT_OPENSSL" != xno; then dnl This may be necessary for static libraries. AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread]) - LIBS="$CLEANLIBS -lcrypto -ldl -lpthread" + LIBS="-lcrypto $CLEANLIBS -ldl -lpthread" AC_LINK_IFELSE([ AC_LANG_PROGRAM([[ #include -- cgit v1.2.1