mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-16 07:45:23 -04:00
Correctly detect openssl on windows
This commit is contained in:
parent
ceb03b90c4
commit
66193853fd
21
configure.in
21
configure.in
@ -116,15 +116,30 @@ fi
|
|||||||
AM_CONDITIONAL(ZLIB_REGRESS, [test "$have_zlib" = "yes"])
|
AM_CONDITIONAL(ZLIB_REGRESS, [test "$have_zlib" = "yes"])
|
||||||
|
|
||||||
dnl See if we have openssl. This doesn't go in LIBS either.
|
dnl See if we have openssl. This doesn't go in LIBS either.
|
||||||
|
if test "$bwin32" = true; then
|
||||||
|
EV_LIB_WS32=-lws2_32
|
||||||
|
EV_LIB_GDI=-lgdi32
|
||||||
|
else
|
||||||
|
EV_LIB_WS32=
|
||||||
|
EV_LIB_GDI=
|
||||||
|
fi
|
||||||
|
AC_SUBST(EV_LIB_WS32)
|
||||||
|
AC_SUBST(EV_LIB_GDI)
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS([openssl/bio.h])
|
||||||
|
|
||||||
if test "$enable_openssl" = "yes"; then
|
if test "$enable_openssl" = "yes"; then
|
||||||
save_LIBS="$LIBS"
|
save_LIBS="$LIBS"
|
||||||
LIBS=""
|
LIBS=""
|
||||||
OPENSSL_LIBS=""
|
OPENSSL_LIBS=""
|
||||||
have_openssl=no
|
have_openssl=no
|
||||||
AC_SEARCH_LIBS([SSL_new], [ssl],
|
AC_SEARCH_LIBS([SSL_new], [ssl],
|
||||||
[have_openssl=yes
|
[have_openssl=yes
|
||||||
OPENSSL_LIBS="$LIBS -lcrypto"
|
OPENSSL_LIBS="$LIBS -lcrypto $EV_LIB_GDI $EV_LIB_WS32"
|
||||||
AC_DEFINE(HAVE_OPENSSL, 1, [Define if the system has openssl])])
|
AC_DEFINE(HAVE_OPENSSL, 1, [Define if the system has openssl])],
|
||||||
|
[have_openssl=no
|
||||||
|
AC_DEFINE(HAVE_OPENSSL, 0, [Define if the system lacks openssl])],
|
||||||
|
[-lcrypto $EV_LIB_GDI $EV_LIB_WS32])
|
||||||
LIBS="$save_LIBS"
|
LIBS="$save_LIBS"
|
||||||
AC_SUBST(OPENSSL_LIBS)
|
AC_SUBST(OPENSSL_LIBS)
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user