summaryrefslogtreecommitdiff
blob: 1e9b517735705dc4cc15436a03161804eb3be1f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
--- ldb-1.1.27/wscript
+++ ldb-1.1.27/wscript
@@ -5,6 +5,7 @@
 
 blddir = 'bin'
 
+import Logs
 import sys, os
 
 # find the buildtools directory
@@ -13,7 +14,7 @@
     srcdir = srcdir + '/..'
 sys.path.insert(0, srcdir + '/buildtools/wafsamba')
 
-import wafsamba, samba_dist, Utils
+import wafsamba, samba_dist, Utils, Options
 
 samba_dist.DIST_DIRS('''lib/ldb:. lib/replace:lib/replace lib/talloc:lib/talloc
                         lib/tdb:lib/tdb lib/tdb:lib/tdb lib/tevent:lib/tevent
@@ -28,8 +29,21 @@
     opt.RECURSE('lib/tevent')
     opt.RECURSE('lib/replace')
     opt.tool_options('python') # options for disabling pyc or pyo compilation
+    if opt.IN_LAUNCH_DIR():
+        opt.add_option('--disable-python',
+        help=("disable the pyldb modules"),
+        action="store_true", dest='disable_python', default=False)
+    if opt.IN_LAUNCH_DIR():
+        opt.add_option('--disable-ldap',
+        help=("disable ldap support"),
+        action="store_true", dest='disable_ldap', default=False)
 
 def configure(conf):
+    conf.env.standalone_ldb = conf.IN_LAUNCH_DIR()
+
+    conf.env.disable_python = getattr(Options.options, 'disable_python', False)
+    conf.env.disable_ldap = getattr(Options.options, 'disable_ldap', False)
+
     conf.RECURSE('lib/tdb')
     conf.RECURSE('lib/tevent')
 
@@ -67,9 +81,12 @@
     if conf.env.standalone_ldb:
         conf.CHECK_XSLTPROC_MANPAGES()
 
-        # we need this for the ldap backend
-        if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
-            conf.env.ENABLE_LDAP_BACKEND = True
+        if not conf.env.disable_ldap:
+    	    # we need this for the ldap backend
+    	    if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
+        	conf.env.ENABLE_LDAP_BACKEND = True
+        else:
+    	    conf.env.ENABLE_LDAP_BACKEND = False
 
         # we don't want any libraries or modules to rely on runtime
         # resolution of symbols