1 # https://github.com/BrianAker/ddm4
2 # ===========================================================================
14 # Copyright (c) 2012 Brian Aker <brian@tangent.org>
16 # Copying and distribution of this file, with or without modification, are
17 # permitted in any medium without royalty provided the copyright notice
18 # and this notice are preserved. This file is offered as-is, without any
23 AC_DEFUN([AX_LIBEVENT],[
24 AC_CACHE_CHECK([test for a working libevent], [ax_cv_libevent], [
29 AC_LANG_PROGRAM([#include <event.h>], [
30 struct event_base *tmp_event= event_init();
31 event_base_free(tmp_event);
35 [AC_MSG_WARN([test program execution failed])])
40 AS_IF([test "x$ax_cv_libevent" = "xyes"],[
41 LIBEVENT_LDFLAGS="-levent"
42 AC_SUBST(LIBEVENT_LDFLAGS)
43 AC_DEFINE([HAVE_LIBEVENT],[1],[Define if event_init is present in event.h.])],[
44 AC_DEFINE([HAVE_LIBEVENT],[0],[Define if event_init is present in event_init.h.])
47 AM_CONDITIONAL(HAVE_LIBEVENT, test "x$ax_cv_libevent" = "xyes")