Drop libevent and use our own event handling again.
There are several reasons for this: - MacOS/X doesn't support polling the tap device using kqueue, requiring a workaround to fall back to select(). - On Windows only sockets are properly handled, therefore tinc uses a second thread that does a blocking ReadFile() on the TAP-Win32/64 device. However, this does not mix well with libevent. - Libevent, event just the core, is quite large, and although it is easy to get and install on many platforms, it can be a burden. - Libev is more lightweight and seems technically superior, but it doesn't abstract away all the platform differences (for example, async events are not supported on Windows).
This commit is contained in:
parent
d30b9e1272
commit
6bc5d626a8
28 changed files with 459 additions and 299 deletions
|
|
@ -1,33 +0,0 @@
|
|||
dnl Check to find the libevent headers/libraries
|
||||
|
||||
AC_DEFUN([tinc_LIBEVENT],
|
||||
[
|
||||
AC_ARG_WITH(libevent,
|
||||
AS_HELP_STRING([--with-libevent=DIR], [libevent base directory, or:]),
|
||||
[libevent="$withval"
|
||||
CPPFLAGS="$CPPFLAGS -I$withval/include"
|
||||
LDFLAGS="$LDFLAGS -L$withval/lib"]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(libevent-include,
|
||||
AS_HELP_STRING([--with-libevent-include=DIR], [libevent headers directory]),
|
||||
[libevent_include="$withval"
|
||||
CPPFLAGS="$CPPFLAGS -I$withval"]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(libevent-lib,
|
||||
AS_HELP_STRING([--with-libevent-lib=DIR], [libevent library directory]),
|
||||
[libevent_lib="$withval"
|
||||
LDFLAGS="$LDFLAGS -L$withval"]
|
||||
)
|
||||
|
||||
AC_CHECK_HEADERS(event.h,
|
||||
[],
|
||||
[AC_MSG_ERROR("libevent header files not found."); break]
|
||||
)
|
||||
|
||||
AC_CHECK_LIB(event, event_init,
|
||||
[LIBS="-levent $LIBS"],
|
||||
[AC_MSG_ERROR("libevent libraries not found.")]
|
||||
)
|
||||
])
|
||||
Loading…
Add table
Add a link
Reference in a new issue