configure: Add common file with minimum versions of external libraries.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 15 Mar 2009 15:35:13 +0000 (16:35 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 15 Mar 2009 15:35:13 +0000 (16:35 +0100)
source3/samba4.m4
source4/configure.ac
source4/min_versions.m4 [new file with mode: 0644]

index 897a9b8d7a7ab205646cc645f8a0a7ef8a68be3a..b5c7c74689ac740a896e8cd261399530440bbc59 100644 (file)
@@ -67,14 +67,16 @@ AC_CONFIG_FILES(../source4/param/samba-hostconfig.pc)
 AC_CONFIG_FILES(../source4/librpc/dcerpc_samr.pc)
 AC_CONFIG_FILES(../source4/librpc/dcerpc_atsvc.pc)
 
 AC_CONFIG_FILES(../source4/librpc/dcerpc_samr.pc)
 AC_CONFIG_FILES(../source4/librpc/dcerpc_atsvc.pc)
 
-SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.3.0,
+m4_include(../source4/min_versions.m4)
+
+SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= $TALLOC_MIN_VERSION,
        [],
        [
                SMB_INCLUDE_MK(../lib/talloc/config.mk)
        ]
 )
 
        [],
        [
                SMB_INCLUDE_MK(../lib/talloc/config.mk)
        ]
 )
 
-SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= 1.1.3,
+SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= $TDB_MIN_VERSION,
        [],
        [
                m4_include(../lib/tdb/libtdb.m4)
        [],
        [
                m4_include(../lib/tdb/libtdb.m4)
@@ -84,13 +86,13 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= 1.1.3,
 
 SMB_INCLUDE_MK(../lib/tdb/python.mk) 
 
 
 SMB_INCLUDE_MK(../lib/tdb/python.mk) 
 
-SMB_EXT_LIB_FROM_PKGCONFIG(LIBTEVENT, tevent = 0.9.4,
+SMB_EXT_LIB_FROM_PKGCONFIG(LIBTEVENT, tevent = $TEVENT_REQUIRED_VERSION,
        [],[m4_include(../lib/tevent/samba.m4)]
 )
 
 SMB_INCLUDE_MK(../lib/tevent/python.mk) 
 
        [],[m4_include(../lib/tevent/samba.m4)]
 )
 
 SMB_INCLUDE_MK(../lib/tevent/python.mk) 
 
-SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb = 0.9.3,
+SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb = $LDB_REQUIRED_VERSION,
        [
                SMB_INCLUDE_MK(lib/ldb/ldb_ildap/config.mk)
                SMB_INCLUDE_MK(lib/ldb/tools/config.mk)
        [
                SMB_INCLUDE_MK(lib/ldb/ldb_ildap/config.mk)
                SMB_INCLUDE_MK(lib/ldb/tools/config.mk)
index a1eb4f4b468d9f194f26f1bcf7ac4737487afda4..065a3300cab5d82ffc142be8b8c97980424ee1aa 100644 (file)
@@ -42,14 +42,16 @@ AC_CONFIG_FILES(param/samba-hostconfig.pc)
 AC_CONFIG_FILES(librpc/dcerpc_samr.pc)
 AC_CONFIG_FILES(librpc/dcerpc_atsvc.pc)
 
 AC_CONFIG_FILES(librpc/dcerpc_samr.pc)
 AC_CONFIG_FILES(librpc/dcerpc_atsvc.pc)
 
-SMB_INCLUDED_LIB_PKGCONFIG(LIBTALLOC, talloc >= 1.3.0, [],
+m4_include(min_versions.m4)
+
+SMB_INCLUDED_LIB_PKGCONFIG(LIBTALLOC, talloc >= $TALLOC_MIN_VERSION, [],
        [
                m4_include(../lib/talloc/libtalloc.m4)
                SMB_INCLUDE_MK(../lib/talloc/config.mk)
        ]
 )
 
        [
                m4_include(../lib/talloc/libtalloc.m4)
                SMB_INCLUDE_MK(../lib/talloc/config.mk)
        ]
 )
 
-SMB_INCLUDED_LIB_PKGCONFIG(LIBTDB, tdb >= 1.1.3,
+SMB_INCLUDED_LIB_PKGCONFIG(LIBTDB, tdb >= $TDB_MIN_VERSION,
        [],
        [
                m4_include(../lib/tdb/libtdb.m4)
        [],
        [
                m4_include(../lib/tdb/libtdb.m4)
@@ -59,13 +61,13 @@ SMB_INCLUDED_LIB_PKGCONFIG(LIBTDB, tdb >= 1.1.3,
 
 SMB_INCLUDE_MK(../lib/tdb/python.mk) 
 
 
 SMB_INCLUDE_MK(../lib/tdb/python.mk) 
 
-SMB_INCLUDED_LIB_PKGCONFIG(LIBTEVENT, tevent = 0.9.4,
+SMB_INCLUDED_LIB_PKGCONFIG(LIBTEVENT, tevent = TEVENT_REQUIRED_VERSION,
        [],[m4_include(../lib/tevent/samba.m4)]
 )
 
 SMB_INCLUDE_MK(../lib/tevent/python.mk) 
 
        [],[m4_include(../lib/tevent/samba.m4)]
 )
 
 SMB_INCLUDE_MK(../lib/tevent/python.mk) 
 
-SMB_INCLUDED_LIB_PKGCONFIG(LIBLDB, ldb = 0.9.3,
+SMB_INCLUDED_LIB_PKGCONFIG(LIBLDB, ldb = $LDB_REQUIRED_VERSION,
        [
                SMB_INCLUDE_MK(lib/ldb/ldb_ildap/config.mk)
                SMB_INCLUDE_MK(lib/ldb/tools/config.mk)
        [
                SMB_INCLUDE_MK(lib/ldb/ldb_ildap/config.mk)
                SMB_INCLUDE_MK(lib/ldb/tools/config.mk)
diff --git a/source4/min_versions.m4 b/source4/min_versions.m4
new file mode 100644 (file)
index 0000000..46f45a1
--- /dev/null
@@ -0,0 +1,6 @@
+# Minimum and exact required versions for various libraries 
+# if we use the ones installed in the system.
+TDB_MIN_VERSION=1.1.3
+TALLOC_MIN_VERSION=1.3.0
+LDB_REQUIRED_VERSION=0.9.3
+TEVENT_REQUIRED_VERSION=0.9.4