Skip to content

Commit

Permalink
autotools/win32: fix searching ssl library
Browse files Browse the repository at this point in the history
  • Loading branch information
azat committed Aug 9, 2016
1 parent 6fcfa25 commit 671a24f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -778,7 +778,7 @@ fi
# check if we have and should use openssl
AM_CONDITIONAL(OPENSSL, [test "$enable_openssl" != "no" && test "$have_openssl" = "yes"])
if test "x$enable_openssl" = "xyes"; then
AC_SEARCH_LIBS([ERR_remove_thread_state], [crypto],
AC_SEARCH_LIBS([ERR_remove_thread_state], [crypto eay32],
[AC_DEFINE(HAVE_ERR_REMOVE_THREAD_STATE, 1, [Define to 1 if you have ERR_remove_thread_stat().])])
fi

Expand Down
17 changes: 11 additions & 6 deletions m4/libevent_openssl.m4
Expand Up @@ -26,12 +26,17 @@ case "$enable_openssl" in
save_LIBS="$LIBS"
LIBS=""
OPENSSL_LIBS=""
AC_SEARCH_LIBS([SSL_new], [ssl],
[have_openssl=yes
OPENSSL_LIBS="$LIBS -lcrypto $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD"],
[have_openssl=no],
[-lcrypto $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD])
LIBS="$save_LIBS"
for lib in crypto eay32; do
# clear cache
unset ac_cv_search_SSL_new
AC_SEARCH_LIBS([SSL_new], [ssl ssl32],
[have_openssl=yes
OPENSSL_LIBS="$LIBS -l$lib $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD"],
[have_openssl=no],
[-l$lib $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD])
LIBS="$save_LIBS"
test "$have_openssl" = "yes" && break
done
;;
esac
AC_SUBST(OPENSSL_INCS)
Expand Down

0 comments on commit 671a24f

Please sign in to comment.