From: Wilfried Goesgens Date: Thu, 29 Dec 2011 17:49:06 +0000 (+0100) Subject: use AC_TRY_COMPILE to determine the right libev version; AC_CHECK_LIB dosen't work. X-Git-Tag: v8.11~275 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=59a81237c1365b9c7643cff7511a805f5679ed4f use AC_TRY_COMPILE to determine the right libev version; AC_CHECK_LIB dosen't work. --- 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"