From ce209bae7a067b28e864c6cda571557b06dff17a Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Thu, 22 May 2014 22:17:20 +0200 Subject: [PATCH] Modify configure script: - make check for libavresample dependent on libavcodec (since the resample functions were removed from libavcodec) - check for libevent 1 or >=2.1.4 but don't bail if other libevent is also present --- configure.ac | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index c990a4ab..d2a90a64 100644 --- a/configure.ac +++ b/configure.ac @@ -136,7 +136,7 @@ AC_RUN_IFELSE( AC_LANG_POP([C]) LIBS="$save_LIBS" -PKG_CHECK_EXISTS([libavresample], [ +PKG_CHECK_EXISTS([ libavcodec >= 54.35 ], [ PKG_CHECK_MODULES(LIBAV, [ libavformat libavcodec libswscale libavresample libavutil ]) ], [ PKG_CHECK_MODULES(LIBAV, [ libavformat libavcodec libswscale libavutil ]) @@ -160,19 +160,15 @@ fi PKG_CHECK_MODULES(MINIXML, [ mxml ]) -PKG_CHECK_MODULES(LIBEVENT, [ libevent >= 2], - AC_CHECK_LIB([event], [evhttp_request_set_header_cb], - AC_DEFINE(HAVE_LIBEVENT2, 1, [Define to 1 if you have libevent 2 with evhttp_request_set_header_cb()]), - AC_MSG_ERROR([found libevent 2 but without evhttp_request_set_header_cb() - try version >= 2.1.4]) - ), +PKG_CHECK_MODULES(LIBEVENT, [ libevent >= 2.1.4 ], + AC_DEFINE(HAVE_LIBEVENT2, 1, [Define to 1 if you have libevent >= 2.1.4]), try_libevent1=true; ) if test x$try_libevent1 = xtrue; then - AC_CHECK_HEADER(event.h, - AC_CHECK_LIB([event_core], [event_init], [LIBEVENT_LIBS="-levent_core"], AC_MSG_ERROR([libevent not found])), - AC_MSG_ERROR([event.h not found]) - ) + 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) else