[PATCH] [FreeBSD 4] Make python bindings aware of external libs.

Timur I. Bakeyev timur at com.bat.ru
Sun Jun 7 12:10:19 GMT 2009


This patch is also relevant to Samba 4. for it it's possible to use
external versions of libtalloc, libevent and libtdb. The source for
them is still the same, but installing them as external libraries 
let you to reuse this libraries in other projects(like libmapi).

With current setup we get a bit of the problem - both external build
and local one create Python bindings for the named libraries and
install them into the same location. That, of course, breaks package
managers and not nice in general.

This patch build Python bindings for the libraries only if we are
building them localy. That should be Ok, as soon as we unconditionally
build Python bindings for external libs. In the future, it could be
required to test presence of such bindings to be on a safe side.

With regards,
Timur Bakeyev.
-------------- next part --------------
--- ./source4/configure.ac.orig	2009-04-30 07:53:01.000000000 +0000
+++ ./source4/configure.ac	2009-06-01 11:49:40.000000000 +0000
@@ -56,17 +56,18 @@
 	[
 		m4_include(../lib/tdb/libtdb.m4)
 		SMB_INCLUDE_MK(../lib/tdb/config.mk)
+		SMB_INCLUDE_MK(../lib/tdb/python.mk) 
 	]
 )
 
-SMB_INCLUDE_MK(../lib/tdb/python.mk) 
-
 SMB_INCLUDED_LIB_PKGCONFIG(LIBTEVENT, tevent = TEVENT_REQUIRED_VERSION,
-	[],[m4_include(../lib/tevent/samba.m4)]
+	[],
+	[
+		m4_include(../lib/tevent/samba.m4)
+		SMB_INCLUDE_MK(../lib/tevent/python.mk) 
+	]
 )
 
-SMB_INCLUDE_MK(../lib/tevent/python.mk) 
-
 SMB_INCLUDED_LIB_PKGCONFIG(LIBLDB, ldb = $LDB_REQUIRED_VERSION,
 	[
 		SMB_INCLUDE_MK(lib/ldb/ldb_ildap/config.mk)
@@ -97,8 +98,8 @@
 		m4_include(lib/ldb/libldb.m4)
 		SMB_INCLUDE_MK(lib/ldb/config.mk)
 		AC_CONFIG_FILES(lib/ldb/ldb.pc)
+		SMB_INCLUDE_MK(lib/ldb/python.mk) 
 	], [no])
-SMB_INCLUDE_MK(lib/ldb/python.mk) 
 
 m4_include(lib/tls/config.m4)
 


More information about the samba-technical mailing list