ntdb: make --disable-ntdb work properly.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 4 Jul 2012 04:21:07 +0000 (13:51 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 4 Jul 2012 06:11:33 +0000 (08:11 +0200)
As per bug #9024, make --disable-ntdb work again.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Wed Jul  4 08:11:33 CEST 2012 on sn-devel-104

lib/dbwrap/dbwrap_local_open.c
lib/util/wscript_build
wscript

index bb0df485fbbbc092e8d20d0bb9ce270021c83c42..fb5f17ebabec4839a5ffa690999a8a5b910c0bba 100644 (file)
@@ -22,7 +22,9 @@
 #include "dbwrap/dbwrap.h"
 #include "dbwrap/dbwrap_tdb.h"
 #include "tdb.h"
+#ifndef DISABLE_NTDB
 #include "lib/util/util_ntdb.h"
+#endif
 #include "lib/param/param.h"
 #include "system/filesys.h"
 #include "ccan/str/str.h"
index e601ecd4ed059f62b7f37382ade4736071bb7af1..340cf12cd4f0dedf312172203a04ce6232e600c0 100755 (executable)
@@ -45,12 +45,13 @@ bld.SAMBA_LIBRARY('util_tdb',
        private_library=True
        )
 
-bld.SAMBA_LIBRARY('util_ntdb',
-       source='util_ntdb.c',
-       local_include=False,
-       public_deps='ntdb talloc samba-util samba-hostconfig',
-       private_library=True
-       )
+if not bld.env.disable_ntdb:
+    bld.SAMBA_LIBRARY('util_ntdb',
+               source='util_ntdb.c',
+               local_include=False,
+               public_deps='ntdb talloc samba-util samba-hostconfig',
+               private_library=True
+               )
 
 bld.SAMBA_LIBRARY('tevent-util',
        source='tevent_unix.c tevent_ntstatus.c tevent_werror.c',
diff --git a/wscript b/wscript
index 1238eb6ae3afc14b19498c710a468263e52ef308..727374dee2a99565a33d06dc1fbaebcae7699736 100755 (executable)
--- a/wscript
+++ b/wscript
@@ -132,6 +132,8 @@ def configure(conf):
     conf.env.disable_ntdb = getattr(Options.options, 'disable_ntdb', False)
     if not Options.options.disable_ntdb:
         conf.RECURSE('lib/ntdb')
+    else:
+        conf.DEFINE('DISABLE_NTDB', 1)
     conf.RECURSE('lib/zlib')
     conf.RECURSE('lib/util/charset')
     conf.RECURSE('source4/auth')