Description: Don't build with wrappers, as selftest is unused
Author: Jelmer Vernooij <jelmer@samba.org>
Status: not forwarded upstream (already fixed in master)

diff --git a/wscript b/wscript
index ad2e2a8..47a83e9 100644
--- a/wscript
+++ b/wscript
@@ -156,10 +156,12 @@ def configure(conf):
     conf.RECURSE('lib/ntdb')
     conf.RECURSE('lib/util/charset')
     conf.RECURSE('source4/auth')
-    conf.RECURSE('lib/nss_wrapper')
+    if conf.CONFIG_GET('ENABLE_SELFTEST'):
+        conf.RECURSE('lib/nss_wrapper')
     conf.RECURSE('nsswitch')
-    conf.RECURSE('lib/socket_wrapper')
-    conf.RECURSE('lib/uid_wrapper')
+    if conf.CONFIG_GET('ENABLE_SELFTEST'):
+        conf.RECURSE('lib/socket_wrapper')
+        conf.RECURSE('lib/uid_wrapper')
     conf.RECURSE('lib/subunit/c')
     conf.RECURSE('libcli/smbreadline')
     conf.RECURSE('lib/crypto')
diff --git a/wscript_build b/wscript_build
index d7dea54..a6a6556 100644
--- a/wscript_build
+++ b/wscript_build
@@ -70,9 +70,12 @@ bld.RECURSE('source4/lib/messaging')
 bld.RECURSE('source4/lib/events')
 bld.RECURSE('source4/lib/cmdline')
 bld.RECURSE('source4/lib/http')
-bld.RECURSE('lib/socket_wrapper')
-bld.RECURSE('lib/nss_wrapper')
-bld.RECURSE('lib/uid_wrapper')
+if bld.CONFIG_GET('SOCKET_WRAPPER'):
+    bld.RECURSE('lib/socket_wrapper')
+if bld.CONFIG_GET('NSS_WRAPPER'):
+    bld.RECURSE('lib/nss_wrapper')
+if bld.CONFIG_GET('UID_WRAPPER'):
+    bld.RECURSE('lib/uid_wrapper')
 if bld.CHECK_FOR_THIRD_PARTY():
     bld.RECURSE('third_party/zlib')
     bld.RECURSE('third_party/popt')
