Use pkg-config (if available) to handle OpenSSL.

This commit is contained in:
Harlan Stenn 2011-08-28 14:30:52 -04:00 committed by Nick Mathewson
parent 674dc3d34e
commit 1c63860758
3 changed files with 3 additions and 16 deletions

View File

@ -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 \

View File

@ -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

View File

@ -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