aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-05-16 19:44:57 +0000
committerNick Mathewson <nickm@torproject.org>2008-05-16 19:44:57 +0000
commit3f55caa72260a2e2ce9ebd89416d7fb0617dbe4a (patch)
treecb53d4c7540aa3e501e3103628b64c111e662495
parent09cd8fa371092e1c1f75ba86c8899a2af04857ad (diff)
downloadtor-3f55caa72260a2e2ce9ebd89416d7fb0617dbe4a.tar
tor-3f55caa72260a2e2ce9ebd89416d7fb0617dbe4a.tar.gz
r19797@catbus: nickm | 2008-05-16 15:42:53 -0400
Try to build correctly on win32 with libevent versions 1.4.x or greater. 1.4.5 should remove the need to do this, but hey. Backport candidate. svn:r14640
-rw-r--r--configure.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 2a153ddbb..1ce1f7fa4 100644
--- a/configure.in
+++ b/configure.in
@@ -232,11 +232,19 @@ tor_libevent_devpkg_redhat="libevent-devel"
tor_libevent_devpkg_debian="libevent-dev"
TOR_SEARCH_LIBRARY(libevent, $trylibeventdir, [-levent $TOR_LIB_WS32], [
+#ifdef WIN32
+#include <winsock2.h>
+#endif
#include <stdlib.h>
#include <sys/time.h>
#include <sys/types.h>
#include <event.h>], [void exit(int); void *event_init(void);],
- [event_init(); exit(0);], [--with-libevent-dir], [/opt/libevent])
+ [
+#ifdef WIN32
+{WSAData d; WSAStartup(0x101,&d); }
+#endif
+event_init(); exit(0);
+], [--with-libevent-dir], [/opt/libevent])
dnl Now check for particular libevent functions.
save_LIBS="$LIBS"