Make compatible with libevent 2.0 by crippling streaming and ICY metadata (see issue #30)

This commit is contained in:
ejurgensen
2014-05-30 23:39:03 +02:00
parent 5b4ef31758
commit c740e6e3b0
5 changed files with 1879 additions and 9 deletions

View File

@@ -160,19 +160,28 @@ fi
PKG_CHECK_MODULES(MINIXML, [ mxml ])
PKG_CHECK_MODULES(LIBEVENT, [ libevent >= 2.1.4 ],
AC_DEFINE(HAVE_LIBEVENT2, 1, [Define to 1 if you have libevent >= 2.1.4]),
PKG_CHECK_MODULES(LIBEVENT, [ libevent >= 2 ],
AC_DEFINE(HAVE_LIBEVENT2, 1, [Define to 1 if you have libevent 2]),
try_libevent1=true;
)
AM_CONDITIONAL(COND_LIBEVENT1, false)
AM_CONDITIONAL(COND_LIBEVENT20, false)
AM_CONDITIONAL(COND_LIBEVENT21, false)
if test x$try_libevent1 = xtrue; then
AC_CHECK_HEADER(event.h, , AC_MSG_ERROR([event.h not found]))
AC_CHECK_LIB([event_core], [event_init], [LIBEVENT_LIBS="-levent_core"], AC_MSG_ERROR([libevent not found]))
AC_CHECK_LIB([event_core], [event_new], AC_MSG_ERROR([found libevent 2 but version should be at least 2.1.4]))
AC_SUBST(LIBEVENT_LIBS)
AM_CONDITIONAL(COND_LIBEVENT2, false)
AM_CONDITIONAL(COND_LIBEVENT1, true)
else
AM_CONDITIONAL(COND_LIBEVENT2, true)
PKG_CHECK_EXISTS([ libevent >= 2.1 ],
AM_CONDITIONAL(COND_LIBEVENT21, true),
AM_CONDITIONAL(COND_LIBEVENT20, true)
)
PKG_CHECK_EXISTS([ libevent >= 2.1.4 ], ,
AC_DEFINE(HAVE_LIBEVENT2_OLD, 1, [Define to 1 if you have libevent 2 (<2.1.4)])
)
fi
AC_CHECK_HEADER(avl.h, , AC_MSG_ERROR([avl.h not found]))