build: Fix the build with old system-installed tevent
authorVolker Lendecke <vl@samba.org>
Tue, 6 Nov 2012 15:17:22 +0000 (16:17 +0100)
committerAmitay Isaacs <amitay@gmail.com>
Thu, 8 Nov 2012 01:57:58 +0000 (12:57 +1100)
We depend on the tracing callback mechanism in ctdb.

lib/tevent/libtevent.m4

index 409232a866ca8b3f9b7f68da58e4afbf9d79ad97..2141af6717f74b40bb167802685886c455fad0ee 100644 (file)
@@ -11,7 +11,10 @@ AC_SUBST(TEVENT_CFLAGS)
 if test x"$INCLUDED_TEVENT" != x"yes" ; then
     AC_CHECK_HEADERS(tevent.h)
     AC_CHECK_LIB(tevent, tevent_context_init, [ TEVENT_LIBS="-ltevent" ])
-    if test x"$ac_cv_header_tevent_h" = x"no" -o x"$ac_cv_lib_tevent_tevent_context_init" = x"no" ; then
+    AC_CHECK_DECLS([TEVENT_TRACE_BEFORE_WAIT], [[#include <tevent.h>]])
+    if test x"$ac_cv_header_tevent_h" = x"no" -o \
+       x"$ac_cv_lib_tevent_tevent_context_init" = x"no" -o \
+       x"$ac_cv_have_decl_TEVENT_TRACE_BEFORE_WAIT" = x"no" ; then
         INCLUDED_TEVENT=yes
         TEVENT_CFLAGS=""
     else