From: Mark Ellzey Date: Tue, 14 Feb 2012 20:01:02 +0000 (-0500) Subject: Added OPENSSL_LDFLAGS env variable which is appended to SSL checks. X-Git-Tag: release-2.0.18-stable~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=92781968475c7553a08f5b4161f1df631c6ef01f;p=libevent Added OPENSSL_LDFLAGS env variable which is appended to SSL checks. If openssl is not installed system-wide or not compiled as a shared library, some systems require various link flags (e.g., -ld). --- diff --git a/configure.in b/configure.in index 63eb75e9..cb73671f 100644 --- a/configure.in +++ b/configure.in @@ -154,6 +154,7 @@ else fi AC_SUBST(EV_LIB_WS32) AC_SUBST(EV_LIB_GDI) +AC_SUBST(OPENSSL_LDFLAGS) AC_CHECK_HEADERS([openssl/bio.h]) @@ -164,10 +165,10 @@ OPENSSL_LIBS="" have_openssl=no AC_SEARCH_LIBS([SSL_new], [ssl], [have_openssl=yes - OPENSSL_LIBS="$LIBS -lcrypto $EV_LIB_GDI $EV_LIB_WS32" + OPENSSL_LIBS="$LIBS -lcrypto $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LDFLAGS" AC_DEFINE(HAVE_OPENSSL, 1, [Define if the system has openssl])], [have_openssl=no], - [-lcrypto $EV_LIB_GDI $EV_LIB_WS32]) + [-lcrypto $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LDFLAGS]) LIBS="$save_LIBS" AC_SUBST(OPENSSL_LIBS) fi diff --git a/sample/Makefile.am b/sample/Makefile.am index 234feb40..d9b15fc1 100644 --- a/sample/Makefile.am +++ b/sample/Makefile.am @@ -21,7 +21,7 @@ http_server_SOURCES = http-server.c if OPENSSL noinst_PROGRAMS += le-proxy le_proxy_SOURCES = le-proxy.c -le_proxy_LDADD = $(LDADD) ../libevent_openssl.la -lssl -lcrypto +le_proxy_LDADD = $(LDADD) ../libevent_openssl.la -lssl -lcrypto ${OPENSSL_LDFLAGS} endif verify: diff --git a/test/Makefile.am b/test/Makefile.am index 1beb51d8..1842eb90 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -65,7 +65,7 @@ regress_LDFLAGS = $(PTHREAD_CFLAGS) if OPENSSL regress_SOURCES += regress_ssl.c -regress_LDADD += ../libevent_openssl.la -lssl -lcrypto +regress_LDADD += ../libevent_openssl.la -lssl -lcrypto ${OPENSSL_LDFLAGS} endif bench_SOURCES = bench.c