library whether or not you plan to enable compression. You can find it at
http://www.oberhumer.com/opensource/lzo/.
-Since 1.1, the libevent library is used for the main event loop. You can find
-it at http://monkey.org/~provos/libevent/.
-
In order to compile tinc, you will need a GNU C compiler environment.
;;
esac
+case $host_os in
+ *mingw*)
+ ;;
+ *)
+ LIBS="-pthread $LIBS"
+ CFLAGS="-pthread $CFLAGS"
+ ;;
+esac
+
AC_ARG_ENABLE(tunemu,
AS_HELP_STRING([--enable-tunemu], [enable support for the tunemu driver]),
[ AC_DEFINE(ENABLE_TUNEMU, 1, [Support for tunemu])
AC_ARG_WITH(libgcrypt, AC_HELP_STRING([--with-libgcrypt], [enable use of libgcrypt instead of OpenSSL])], [])
-tinc_LIBEVENT
tinc_ZLIB
tinc_LZO
* OpenSSL::
* zlib::
* lzo::
-* libevent::
@end menu
default).
-@c ==================================================================
-@node libevent
-@subsection libevent
-
-@cindex libevent
-For the main event loop, tinc uses the libevent library.
-
-If this library is not installed, you wil get an error when configuring
-tinc for build.
-
-You can use your operating system's package manager to install this if
-available. Make sure you install the development AND runtime versions
-of this package.
-
-If you have to install libevent manually, you can get the source code
-from @url{http://monkey.org/~provos/libevent/}. Instructions on how to configure,
-build and install this package are included within the package. Please
-make sure you build development and runtime libraries (which is the
-default).
-
-
@c
@c
@c
#include <netinet/if_ether.h>
#endif
-#ifdef HAVE_EVENT_H
-#include <event.h>
-#endif
-
#endif /* __TINC_SYSTEM_H__ */
+++ /dev/null
-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.")]
- )
-])
EXTRA_DIST = linux bsd solaris cygwin mingw raw_socket uml_socket openssl gcrypt
tincd_SOURCES = \
- xmalloc.c utils.c getopt.c getopt1.c list.c splay_tree.c dropin.c fake-getaddrinfo.c fake-getnameinfo.c \
+ xmalloc.c utils.c event.c getopt.c getopt1.c list.c splay_tree.c dropin.c fake-getaddrinfo.c fake-getnameinfo.c \
cipher.c conf.c connection.c control.c crypto.c digest.c edge.c graph.c logger.c meta.c net.c net_packet.c net_setup.c \
net_socket.c netutl.c node.c process.c protocol.c protocol_auth.c protocol_edge.c protocol_misc.c \
protocol_key.c protocol_subnet.c route.c rsa.c subnet.c tincd.c
INCLUDES = @INCLUDES@ -I$(top_builddir)
noinst_HEADERS = \
- xalloc.h utils.h getopt.h list.h splay_tree.h dropin.h fake-getaddrinfo.h fake-getnameinfo.h fake-gai-errnos.h ipv6.h ipv4.h ethernet.h \
+ xalloc.h utils.h event.h getopt.h list.h splay_tree.h dropin.h fake-getaddrinfo.h fake-getnameinfo.h fake-gai-errnos.h ipv6.h ipv4.h ethernet.h \
cipher.h conf.h connection.h control.h control_common.h crypto.h device.h digest.h edge.h graph.h logger.h meta.h net.h netutl.h node.h process.h \
protocol.h route.h rsa.h rsagen.h subnet.h bsd/tunemu.h