mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Use pkg-config (if available) to handle OpenSSL.
This commit is contained in:
parent
674dc3d34e
commit
1c63860758
@ -209,6 +209,7 @@ if OPENSSL
|
||||
libevent_openssl_la_SOURCES = bufferevent_openssl.c
|
||||
libevent_openssl_la_LIBADD = $(MAYBE_CORE) $(OPENSSL_LIBS)
|
||||
libevent_openssl_la_LDFLAGS = $(GENERIC_LDFLAGS)
|
||||
libevent_openssl_la_CPPFLAGS = $(OPENSSL_INCS)
|
||||
endif
|
||||
|
||||
noinst_HEADERS = util-internal.h mm-internal.h ipv6-internal.h \
|
||||
|
17
configure.in
17
configure.in
@ -163,22 +163,7 @@ fi
|
||||
AC_SUBST(EV_LIB_WS32)
|
||||
AC_SUBST(EV_LIB_GDI)
|
||||
|
||||
AC_CHECK_HEADERS([openssl/bio.h])
|
||||
|
||||
if test "$enable_openssl" = "yes"; then
|
||||
save_LIBS="$LIBS"
|
||||
LIBS=""
|
||||
OPENSSL_LIBS=""
|
||||
have_openssl=no
|
||||
AC_SEARCH_LIBS([SSL_new], [ssl],
|
||||
[have_openssl=yes
|
||||
OPENSSL_LIBS="$LIBS -lcrypto $EV_LIB_GDI $EV_LIB_WS32"
|
||||
AC_DEFINE(HAVE_OPENSSL, 1, [Define if the system has openssl])],
|
||||
[have_openssl=no],
|
||||
[-lcrypto $EV_LIB_GDI $EV_LIB_WS32])
|
||||
LIBS="$save_LIBS"
|
||||
AC_SUBST(OPENSSL_LIBS)
|
||||
fi
|
||||
LIBEVENT_OPENSSL
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
@ -13,6 +13,7 @@ hello_world_sources = hello-world.c
|
||||
http_server_sources = http-server.c
|
||||
|
||||
if OPENSSL
|
||||
AM_CPPFLAGS += $(OPENSSL_INCS)
|
||||
noinst_PROGRAMS += le-proxy
|
||||
le_proxy_sources = le-proxy.c
|
||||
le_proxy_LDADD = $(LDADD) ../libevent_openssl.la
|
||||
|
Loading…
x
Reference in New Issue
Block a user