--- /dev/null
+ o Minor bugfixes:
+ - Correctly link libevent_openssl when --enable-static-libevent
+ is passed to configure. Fixes bug 3118; bugfix on 0.2.3.1-alpha.
+
else
TOR_LIBEVENT_LIBS="-levent"
fi
-AC_SUBST(TOR_LIBEVENT_LIBS)
dnl This isn't the best test for Libevent 2.0.3-alpha. Once it's released,
dnl we can do much better.
AM_CONDITIONAL(USE_BUFFEREVENTS, test "$enable_bufferevents" = "yes")
if test "$enable_bufferevents" = "yes"; then
- AC_DEFINE(USE_BUFFEREVENTS, 1, [Defined if we're going to use Libevent's buffered IO API])
+ AC_DEFINE(USE_BUFFEREVENTS, 1, [Defined if we're going to use Libevent's buffered IO API])
+ if test "$enable_static_libevent" = "yes"; then
+ TOR_LIBEVENT_LIBS="$TOR_LIBDIR_libevent/libevent_openssl.a $TOR_LIBEVENT_LIBS"
+ else
+ TOR_LIBEVENT_LIBS="-levent_openssl $TOR_LIBEVENT_LIBS"
+ fi
fi
+AC_SUBST(TOR_LIBEVENT_LIBS)
dnl ------------------------------------------------------
dnl Where do you live, openssl? And how do we call you?
# This seems to matter nowhere but on windows, but I assure you that it
# matters a lot there, and is quite hard to debug if you forget to do it.
-if USE_BUFFEREVENTS
-levent_openssl_lib = -levent_openssl
-else
-levent_openssl_lib =
-endif
tor_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
tor_LDADD = ./libtor.a ../common/libor.a ../common/libor-crypto.a \
../common/libor-event.a \
@TOR_ZLIB_LIBS@ -lm @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
- @TOR_LIB_WS32@ @TOR_LIB_GDI@ $(levent_openssl_lib)
+ @TOR_LIB_WS32@ @TOR_LIB_GDI@
noinst_HEADERS = \
buffers.h \
test_util.c \
tinytest.c
-if USE_BUFFEREVENTS
-levent_openssl_lib = -levent_openssl
-else
-levent_openssl_lib =
-endif
-
test_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
@TOR_LDFLAGS_libevent@
test_LDADD = ../or/libtor.a ../common/libor.a ../common/libor-crypto.a \
../common/libor-event.a \
@TOR_ZLIB_LIBS@ -lm @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
- @TOR_LIB_WS32@ @TOR_LIB_GDI@ $(levent_openssl_lib)
+ @TOR_LIB_WS32@ @TOR_LIB_GDI@
noinst_HEADERS = \
tinytest.h \