mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
autotools/win32: fix searching ssl library
This commit is contained in:
parent
6fcfa25d82
commit
671a24f29b
@ -778,7 +778,7 @@ fi
|
|||||||
# check if we have and should use openssl
|
# check if we have and should use openssl
|
||||||
AM_CONDITIONAL(OPENSSL, [test "$enable_openssl" != "no" && test "$have_openssl" = "yes"])
|
AM_CONDITIONAL(OPENSSL, [test "$enable_openssl" != "no" && test "$have_openssl" = "yes"])
|
||||||
if test "x$enable_openssl" = "xyes"; then
|
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().])])
|
[AC_DEFINE(HAVE_ERR_REMOVE_THREAD_STATE, 1, [Define to 1 if you have ERR_remove_thread_stat().])])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -26,12 +26,17 @@ case "$enable_openssl" in
|
|||||||
save_LIBS="$LIBS"
|
save_LIBS="$LIBS"
|
||||||
LIBS=""
|
LIBS=""
|
||||||
OPENSSL_LIBS=""
|
OPENSSL_LIBS=""
|
||||||
AC_SEARCH_LIBS([SSL_new], [ssl],
|
for lib in crypto eay32; do
|
||||||
[have_openssl=yes
|
# clear cache
|
||||||
OPENSSL_LIBS="$LIBS -lcrypto $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD"],
|
unset ac_cv_search_SSL_new
|
||||||
[have_openssl=no],
|
AC_SEARCH_LIBS([SSL_new], [ssl ssl32],
|
||||||
[-lcrypto $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD])
|
[have_openssl=yes
|
||||||
LIBS="$save_LIBS"
|
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
|
esac
|
||||||
AC_SUBST(OPENSSL_INCS)
|
AC_SUBST(OPENSSL_INCS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user