]> granicus.if.org Git - libevent/commitdiff
Added OPENSSL_LDFLAGS env variable which is appended to SSL checks.
authorMark Ellzey <mark.thomas@mandiant.com>
Tue, 14 Feb 2012 20:01:02 +0000 (15:01 -0500)
committerMark Ellzey <mark.thomas@mandiant.com>
Tue, 14 Feb 2012 20:01:02 +0000 (15:01 -0500)
If openssl is not installed system-wide or not compiled as a shared library,
some systems require various link flags (e.g., -ld).

configure.in
sample/Makefile.am
test/Makefile.am

index 63eb75e949f328b95d89d49fe06d631dba9884fa..cb73671f79574b6eb960f239bd9f56df598613cb 100644 (file)
@@ -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
index 234feb4059a8a348d9e261762c2efd6a86070842..d9b15fc10c5e987a283745b01e4ddddeb181a90d 100644 (file)
@@ -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:
index 1beb51d85f58993c187f35987f843089689bfde7..1842eb9029ae8a762288d043206d046b33883a41 100644 (file)
@@ -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