diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac index d37c34daae..4dbb3c4fa4 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ dnl Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson dnl Copyright (c) 2007-2015, The Tor Project, Inc. dnl See LICENSE for licensing information -AC_INIT([tor],[0.2.7.6-dev]) +AC_INIT([tor],[0.2.8.0-alpha-dev]) AC_CONFIG_SRCDIR([src/or/main.c]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE @@ -374,10 +374,6 @@ AC_SEARCH_LIBS(pthread_detach, [pthread]) AM_CONDITIONAL(THREADS_WIN32, test "$bwin32" = "true") AM_CONDITIONAL(THREADS_PTHREADS, test "$bwin32" = "false") -dnl ------------------------------------------------------------------- -dnl Check for functions before libevent, since libevent-1.2 apparently -dnl exports strlcpy without defining it in a header. - AC_CHECK_FUNCS( _NSGetEnviron \ accept4 \ @@ -388,6 +384,7 @@ AC_CHECK_FUNCS( flock \ ftime \ getaddrinfo \ + getentropy \ getifaddrs \ getpass \ getrlimit \ @@ -504,10 +501,7 @@ 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" - +LIBS="$STATIC_LIBEVENT_FLAGS $TOR_LIB_WS32 $save_LIBS" AM_CONDITIONAL(USE_EXTERNAL_EVDNS, test x$ac_cv_header_event2_dns_h = xyes) @@ -518,9 +512,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_MSG_ERROR("libevent2 is installed but linking it failed while searching for event_new")) + AC_SEARCH_LIBS(evdns_base_new, [event event_extra], , AC_MSG_ERROR("libevent2 is installed but linking it failed while searching for evdns_base_new")) + + 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 @@ -942,6 +952,7 @@ AC_CHECK_HEADERS( sys/select.h \ sys/socket.h \ sys/statvfs.h \ + sys/syscall.h \ sys/sysctl.h \ sys/syslimits.h \ sys/time.h \ |