As libssl depends on libcrypto, -lssl needs to precede -lcrypto in
linker invocations or else the build will fail with static OpenSSL
libraries. Adjust m4/ax_check_openssl.m4 to prevent this issue from
getting triggered when pkg-config files for OpenSSL are not available.
(cherry picked from commit
9223c7d59955f26d0898b27f2a758a176822cce9)
AS_IF([test -f "$ssldir/include/openssl/ssl.h"],
[
OPENSSL_CFLAGS="-I$ssldir/include"
- OPENSSL_LIBS="-L$ssldir/lib -lcrypto -lssl"
+ OPENSSL_LIBS="-L$ssldir/lib -lssl -lcrypto"
found=true
AC_MSG_RESULT([yes])
break