summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-11-25 09:43:12 -0500
committerNick Mathewson <nickm@torproject.org>2015-11-25 09:43:12 -0500
commit5dff4ae0ad5e2a1fb93ceae3446f0a315fbd8a3a (patch)
tree947525e13bd521b942f88b6adaa86459c805a510 /configure.ac
parentc59c622d8590c4abed6b8095a7451e2ba4d9200a (diff)
downloadtor-5dff4ae0ad5e2a1fb93ceae3446f0a315fbd8a3a.tar.gz
tor-5dff4ae0ad5e2a1fb93ceae3446f0a315fbd8a3a.zip
Attempt to make openbsd compilation happier with libevent2 installed
Fix for bug 16651; patch from "rubiate".
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 17 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 868ff55825..82b933abc0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -501,9 +501,6 @@ AC_CHECK_MEMBERS([struct event.min_heap_idx], , ,
AC_CHECK_HEADERS(event2/event.h event2/dns.h event2/bufferevent_ssl.h)
LIBS="$save_LIBS"
-LDFLAGS="$save_LDFLAGS"
-CPPFLAGS="$save_CPPFLAGS"
-
AM_CONDITIONAL(USE_EXTERNAL_EVDNS, test x$ac_cv_header_event2_dns_h = xyes)
@@ -514,9 +511,25 @@ if test "$enable_static_libevent" = "yes"; then
TOR_LIBEVENT_LIBS="$TOR_LIBDIR_libevent/libevent.a $STATIC_LIBEVENT_FLAGS"
fi
else
- TOR_LIBEVENT_LIBS="-levent"
+ if test x$ac_cv_header_event2_event_h = "xyes"; then
+ AC_SEARCH_LIBS(event_new, [event event_core])
+ AC_SEARCH_LIBS(evdns_base_new, [event event_extra])
+
+ if test $ac_cv_search_event_new != "none required"; then
+ TOR_LIBEVENT_LIBS="$ac_cv_search_event_new"
+ fi
+ if test $ac_cv_search_evdns_base_new != "none required"; then
+ TOR_LIBEVENT_LIBS="$ac_cv_search_evdns_base_new $TOR_LIBEVENT_LIBS"
+ fi
+ else
+ TOR_LIBEVENT_LIBS="-levent"
+ fi
fi
+LIBS="$save_LIBS"
+LDFLAGS="$save_LDFLAGS"
+CPPFLAGS="$save_CPPFLAGS"
+
dnl This isn't the best test for Libevent 2.0.3-alpha. Once it's released,
dnl we can do much better.
if test "$enable_bufferevents" = "yes" ; then