Use pkg-config for libevent.

pull/1/head
Nicholas Marriott 2011-10-27 23:00:45 +00:00
parent 5213d9674b
commit cf317412d9
1 changed files with 16 additions and 5 deletions

View File

@ -105,11 +105,22 @@ AC_MSG_RESULT($found_glibc)
AC_SEARCH_LIBS(clock_gettime, rt)
# Look for libevent.
AC_SEARCH_LIBS(
event_init,
[event event-1.4 event2],
found_libevent=yes,
found_libevent=no
PKG_CHECK_MODULES(
LIBEVENT,
libevent,
[
CPPFLAGS="$LIBEVENT_CFLAGS $CPPFLAGS"
LIBS="$LIBEVENT_LIBS $LIBS"
found_libevent=yes
],
[
AC_SEARCH_LIBS(
event_init,
[event event-1.4 event2],
found_libevent=yes,
found_libevent=no
)
]
)
if test "x$found_libevent" = xno; then
AC_MSG_ERROR("libevent not found")