From 59a81237c1365b9c7643cff7511a805f5679ed4f Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Thu, 29 Dec 2011 18:49:06 +0100 Subject: [PATCH] use AC_TRY_COMPILE to determine the right libev version; AC_CHECK_LIB dosen't work. --- citadel/configure.ac | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/citadel/configure.ac b/citadel/configure.ac index 8401e58b0..1758a77fc 100644 --- a/citadel/configure.ac +++ b/citadel/configure.ac @@ -605,15 +605,17 @@ saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $SERVER_LIBS" dnl Check for libev AC_CHECK_HEADER(ev.h, - [AC_CHECK_LIB(ev, ev_cleanup_start, - [ - LIBS="-lev -lm $LIBS $SERVER_LIBS" - ], + [AC_TRY_COMPILE([#include +#include ], + [ + ev_cleanup abort_by_shutdown; + struct ev_loop *event_base; + ev_cleanup_start(event_base, &abort_by_shutdown); + ],[], [ AC_MSG_ERROR(libev was not found or is not usable. Please install libev.) - ] - , - )], + ]) + ], [ AC_MSG_ERROR(ev.h was not found or is not usable. Please install libev.) ] @@ -621,6 +623,23 @@ AC_CHECK_HEADER(ev.h, CFLAGS="$saved_CFLAGS" + + + + + + + + + + + + + + + + + # The big search for OpenSSL if test "$with_ssl" != "no"; then saved_LIBS="$LIBS" -- 2.30.2