1
dnl Copyright (C) 2009 Sun Microsystems
2
dnl This file is free software; Sun Microsystems
3
dnl gives unlimited permission to copy and/or distribute it,
4
dnl with or without modifications, as long as this notice is preserved.
6
#--------------------------------------------------------------------
8
#--------------------------------------------------------------------
11
AC_DEFUN([_PANDORA_SEARCH_LIBEVENT],[
12
AC_REQUIRE([AC_LIB_PREFIX])
14
AC_LIB_HAVE_LINKFLAGS(event,,
16
#include <sys/types.h>
21
struct bufferevent bev;
22
bufferevent_settimeout(&bev, 1, 1);
24
event_loop(EVLOOP_ONCE);
27
AM_CONDITIONAL(HAVE_LIBEVENT, [test "x${ac_cv_libevent}" = "xyes"])
30
AC_DEFUN([_PANDORA_HAVE_LIBEVENT],[
32
AC_ARG_ENABLE([libevent],
33
[AS_HELP_STRING([--disable-libevent],
34
[Build with libevent support @<:@default=on@:>@])],
35
[ac_enable_libevent="$enableval"],
36
[ac_enable_libevent="yes"])
38
_PANDORA_SEARCH_LIBEVENT
42
AC_DEFUN([PANDORA_HAVE_LIBEVENT],[
43
AC_REQUIRE([_PANDORA_HAVE_LIBEVENT])
46
AC_DEFUN([_PANDORA_REQUIRE_LIBEVENT],[
47
ac_enable_libevent="yes"
48
_PANDORA_SEARCH_LIBEVENT
50
AS_IF([test x$ac_cv_libevent = xno],[
51
AC_MSG_ERROR([libevent is required for ${PACKAGE}. On Debian this can be found in libevent-dev. On RedHat this can be found in libevent-devel.])
55
AC_DEFUN([PANDORA_REQUIRE_LIBEVENT],[
56
AC_REQUIRE([_PANDORA_REQUIRE_LIBEVENT])