From aaa597a231c47af295076f97f9d9d41a0620cf98 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 20 Dec 2011 15:29:24 -0500 Subject: [PATCH] configure script check for libev version 4 or greater --- citadel/configure.ac | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/citadel/configure.ac b/citadel/configure.ac index aa19866af..0ac40df44 100644 --- a/citadel/configure.ac +++ b/citadel/configure.ac @@ -582,7 +582,7 @@ AC_CHECK_LIB(cares, ares_init, saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $SERVER_LIBS" -dnl Check for libevent +dnl Check for c-ares AC_CHECK_HEADER(ares.h, [AC_CHECK_LIB(cares, ares_init, [ @@ -600,7 +600,7 @@ CFLAGS="$saved_CFLAGS" saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $SERVER_LIBS" -dnl Check for libevent +dnl Check for libev AC_CHECK_HEADER(ev.h, [AC_CHECK_LIB(ev, libcitadel_version_string, [ @@ -617,6 +617,26 @@ AC_CHECK_HEADER(ev.h, ) CFLAGS="$saved_CFLAGS" +AC_MSG_CHECKING(Checking version of libev) +AC_TRY_RUN([ + #include + main() { + printf("libev is version %d.%d\n", ev_version_major(), ev_version_minor()); + if (ev_version_major() >= 4) { + exit(0); + } + exit(1); + } + ], + [ + AC_MSG_RESULT(This will do just fine, thank you) + ], + [ + AC_MSG_ERROR(Citadel requires a newer version of libev. More info: http://www.citadel.org/doku.php/installation:start) + ] +) + + # The big search for OpenSSL if test "$with_ssl" != "no"; then saved_LIBS="$LIBS" -- 2.30.2