1 dnl Check to find the libevent headers/libraries
3 AC_DEFUN([tinc_LIBEVENT],
6 AS_HELP_STRING([--with-libevent=DIR], [libevent base directory, or:]),
8 CPPFLAGS="$CPPFLAGS -I$withval/include"
9 LDFLAGS="$LDFLAGS -L$withval/lib"]
12 AC_ARG_WITH(libevent-include,
13 AS_HELP_STRING([--with-libevent-include=DIR], [libevent headers directory]),
14 [libevent_include="$withval"
15 CPPFLAGS="$CPPFLAGS -I$withval"]
18 AC_ARG_WITH(libevent-lib,
19 AS_HELP_STRING([--with-libevent-lib=DIR], [libevent library directory]),
20 [libevent_lib="$withval"
21 LDFLAGS="$LDFLAGS -L$withval"]
24 AC_CHECK_HEADERS(event.h,
26 [AC_MSG_ERROR("libevent header files not found."); break]
29 AC_CHECK_LIB(event, event_init,
30 [LIBS="-levent $LIBS"],
31 [AC_MSG_ERROR("libevent libraries not found.")]