From a9557c84a382a76ebbd636bfedc21b5f31c741cc Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Mon, 11 Jan 2010 19:05:14 +0200 Subject: [PATCH] --- configure.ac | 49 +---------------------------------------------- include/bouncer.h | 3 +-- 2 files changed, 2 insertions(+), 50 deletions(-) diff --git a/configure.ac b/configure.ac index 08ad48d..13163b6 100644 --- a/configure.ac +++ b/configure.ac @@ -74,54 +74,7 @@ AC_SEARCH_LIBS(regcomp, regex, [], AC_MSG_ERROR([regcomp not found])) AC_CHECK_FUNCS(crypt lstat) dnl Find libevent -levent=yes -AC_MSG_CHECKING([for libevent]) -AC_ARG_WITH(libevent, - AC_HELP_STRING([--with-libevent=prefix],[Specify where libevent is installed]), - [ if test "$withval" = "no"; then - levent=no - else - CPPFLAGS="$CPPFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib" - fi - ]) - -if test "$levent" = "no"; then - AC_MSG_RESULT([using usual/event]) - AC_DEFINE(HAVE_EVENT_LOOPBREAK, 1, [usual/event.h has it.]) - have_libevent=no -else # libevent -AC_DEFINE(HAVE_LIBEVENT, 1, [Use real libevent.]) -LIBS="-levent $LIBS" -AC_LINK_IFELSE([ - #include - #include - #include - #include - int main(void) { - struct event ev; - event_init(); - event_set(&ev, 1, EV_READ, NULL, NULL); - /* this checks for 1.2+ but next we check for 1.3b+ anyway */ - /* event_base_free(NULL); */ - } ], -[AC_MSG_RESULT([found])], -[AC_MSG_ERROR([not found, cannot proceed])]) - -dnl libevent < 1.3b crashes on event_base_free() -dnl no good way to check libevent version. use hack: -dnl evhttp.h defines HTTP_SERVUNAVAIL only since 1.3b -AC_MSG_CHECKING([whether libevent version >= 1.3b]) -AC_EGREP_CPP([HTTP_SERVUNAVAIL], -[#include - HTTP_SERVUNAVAIL ], -[AC_MSG_ERROR([no, cannot proceed])], -[AC_MSG_RESULT([yes])]) - -AC_CHECK_FUNCS(event_loopbreak) -have_libevent=yes -fi # libevent -AC_SUBST(have_libevent) +AC_USUAL_LIBEVENT(1) AC_USUAL_DEBUG AC_USUAL_CASSERT diff --git a/include/bouncer.h b/include/bouncer.h index 72c614e..7747a56 100644 --- a/include/bouncer.h +++ b/include/bouncer.h @@ -33,8 +33,7 @@ #include #include #include - -#include +#include #ifdef DBGVER #define FULLVER PACKAGE_NAME " version " PACKAGE_VERSION " (" DBGVER ")" -- 2.40.0