aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2011-10-27 23:00:45 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2011-10-27 23:00:45 +0000
commitcf317412d92c40276af7a3e91a27670ae3f754ef (patch)
treec6e5f308527acef5dc16b5f4257823d063ccd077
parent5213d9674b115865c631021477b66ec01290c8bd (diff)
downloadrtmux-cf317412d92c40276af7a3e91a27670ae3f754ef.tar.gz
rtmux-cf317412d92c40276af7a3e91a27670ae3f754ef.tar.bz2
rtmux-cf317412d92c40276af7a3e91a27670ae3f754ef.zip
Use pkg-config for libevent.
-rw-r--r--configure.ac21
1 files changed, 16 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 53cc99aa..f3cd35e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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")