If openssl is not installed system-wide or not compiled as a shared library,
some systems require various link flags (e.g., -ld).
fi
AC_SUBST(EV_LIB_WS32)
AC_SUBST(EV_LIB_GDI)
+AC_SUBST(OPENSSL_LDFLAGS)
AC_CHECK_HEADERS([openssl/bio.h])
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
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:
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