use AC_TRY_COMPILE to determine the right libev version; AC_CHECK_LIB dosen't work.
authorWilfried Goesgens <dothebart@citadel.org>
Thu, 29 Dec 2011 17:49:06 +0000 (18:49 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Thu, 29 Dec 2011 17:49:06 +0000 (18:49 +0100)
citadel/configure.ac

index 8401e58b0e8013a162da797390595433b7fd3413..1758a77fce404290bb82fbd3087a3e900ef3d480 100644 (file)
@@ -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 <math.h>
+#include <ev.h>], 
+                         [
+                        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"