Merge pull request #4 from JonnyWhatshisface/master

Fix check for crypto and OpenSSL
This commit is contained in:
Colten Edwards
2022-12-16 18:08:47 -06:00
committed by GitHub

View File

@@ -559,20 +559,13 @@ case "$with_ssl" in
esac esac
case "$with_ssl" in case "$with_ssl" in
yes|check) yes|check)
AC_CHECK_LIB([crypto], [SSLeay], [], [], []) AC_CHECK_LIB([crypto], [ERR_get_error], [], [], [])
if test x"$ac_cv_lib_crypto_SSLeay" = x"yes"; then AS_IF([test x"$ac_cv_lib_crypto_ERR_get_error" = x"yes"], [AC_CHECK_LIB([ssl], [SSL_accept], [], [], [])], [])
AC_CHECK_LIB([ssl], [SSL_accept], [], [], []) AS_IF([test x"$ac_cv_lib_ssl_SSL_accept" != x"yes"],
fi [AS_IF([test x"$with_ssl" = x"yes"],
if test x"$ac_cv_lib_ssl_SSL_accept" = x"yes"; then [AC_MSG_FAILURE([--with-ssl given, but could not find OpenSSL.])],
dnl This would be unnecessary if we used HAVE_LIBSSL in the code [AC_MSG_WARN([OpenSSL not found, will not have SSL support.])])
AC_DEFINE(HAVE_SSL, 1, Define this if the system has SSL support.) ], [AC_DEFINE(HAVE_SSL, 1, SSL Defined)])
else
if test x"$with_ssl" = x"yes"; then
AC_MSG_FAILURE([--with-ssl given, but could not find OpenSSL.])
else
AC_MSG_WARN([OpenSSL not found, will not have SSL support.])
fi
fi
;; ;;
esac esac