From: Michael Wallner Date: Tue, 27 Feb 2018 10:04:19 +0000 (+0100) Subject: configure: fix libevent version check X-Git-Tag: RELEASE_3_2_0_RC1~22 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=a05f607f4cacc7ce82a0fde5b09f5a61d49c802d;p=m6w6%2Fext-http configure: fix libevent version check --- diff --git a/autoconf/pecl/libevent.m4 b/autoconf/pecl/libevent.m4 index bd04296..e6f60e7 100644 --- a/autoconf/pecl/libevent.m4 +++ b/autoconf/pecl/libevent.m4 @@ -1,17 +1,19 @@ AC_DEFUN([PECL_CHECK_LIBEVENT], [ PECL_CHECK_PKGCONFIG(libevent, [$1]) - PECL_HAVE_VERSION(libevent, 2.0, [ - PECL_DEFINE([HAVE_LIBEVENT2]) - ]) - ifelse([$2],,,[PECL_HAVE_VERSION(libevent, [$2])]) - AC_CHECK_FUNC(event_base_new,,[ - AC_DEFINE([event_base_new], [event_init], [missing event_base_new() in libevent1]) - ]) - AC_CHECK_FUNC(event_assign,,[ - AC_DEFINE([event_assign(e, b, s, a, cb, d)], [do {\ - event_set(e, s, a, cb, d); \ - event_base_set(b, e);\ - } while(0)], [missing event_assign() in libevent1]) - ]) + if test -n "$PECL_CHECKED_VERSION(libevent)"; then + PECL_HAVE_VERSION(libevent, 2.0, [ + PECL_DEFINE([HAVE_LIBEVENT2]) + ]., [ ]) + ifelse([$2],,,[PECL_HAVE_VERSION(libevent, [$2])]) + AC_CHECK_FUNC(event_base_new,,[ + AC_DEFINE([event_base_new], [event_init], [missing event_base_new() in libevent1]) + ]) + AC_CHECK_FUNC(event_assign,,[ + AC_DEFINE([event_assign(e, b, s, a, cb, d)], [do {\ + event_set(e, s, a, cb, d); \ + event_base_set(b, e);\ + } while(0)], [missing event_assign() in libevent1]) + ]) + fi ]) \ No newline at end of file