Allow using external libtevent.
[metze/samba/wip.git] / source4 / configure.ac
index aa5a3f3b3ef7f5179e372a648bd40cf21faee464..45154c8c88680951bc8c7e1ab5ee98c89570b770 100644 (file)
@@ -34,7 +34,6 @@ m4_include(../nsswitch/nsstest.m4)
 m4_include(../pidl/config.m4)
 
 AC_CONFIG_FILES(lib/registry/registry.pc)
-AC_CONFIG_FILES(../lib/tevent/tevent.pc)
 AC_CONFIG_FILES(librpc/dcerpc.pc)
 AC_CONFIG_FILES(../librpc/ndr.pc)
 AC_CONFIG_FILES(../lib/torture/torture.pc)
@@ -61,6 +60,17 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= 1.1.3,
 
 SMB_INCLUDE_MK(../lib/tdb/python.mk) 
 
+SMB_EXT_LIB_FROM_PKGCONFIG(LIBTEVENT, tevent >= 1.0.0,
+       [],
+       [
+               m4_include(../lib/tevent/libtevent.m4)
+               SMB_INCLUDE_MK(../lib/tevent/config.mk)
+               AC_CONFIG_FILES(../lib/tevent/tevent.pc)
+       ]
+)
+
+SMB_INCLUDE_MK(../lib/tevent/python.mk) 
+
 SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb = 0.9.1,
        [
                SMB_INCLUDE_MK(lib/ldb/ldb_ildap/config.mk)
@@ -96,7 +106,6 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb = 0.9.1,
 SMB_INCLUDE_MK(lib/ldb/python.mk) 
 
 m4_include(lib/tls/config.m4)
-m4_include(../lib/tevent/libtevent.m4)
 
 dnl m4_include(auth/kerberos/config.m4)
 m4_include(auth/gensec/config.m4)