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.
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