waf: Add possibility to build with system libwbclient.
authorAndreas Schneider <asn@samba.org>
Tue, 17 Apr 2012 10:34:48 +0000 (12:34 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 17 Apr 2012 14:17:35 +0000 (16:17 +0200)
nsswitch/libwbclient/wscript [new file with mode: 0644]
nsswitch/libwbclient/wscript_build [deleted file]
wscript

diff --git a/nsswitch/libwbclient/wscript b/nsswitch/libwbclient/wscript
new file mode 100644 (file)
index 0000000..8390af1
--- /dev/null
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+
+import Options, Logs
+
+def configure(conf):
+    if conf.CHECK_BUNDLED_SYSTEM_PKG('wbclient', minversion='0'):
+        conf.define('USING_SYSTEM_LIBWBCLIENT', 1)
+
+def build(bld):
+    if bld.CONFIG_SET('USING_SYSTEM_LIBWBCLIENT'):
+        Logs.info("\tSelected system libwbclient build")
+        return
+
+    Logs.info("\tSelected embedded libwbclient build")
+
+    bld.SAMBA_LIBRARY('wbclient',
+                      source='''
+                             wbc_guid.c
+                             wbc_idmap.c
+                             wbclient.c
+                             wbc_pam.c
+                             wbc_pwd.c
+                             wbc_sid.c
+                             wbc_util.c''',
+                      deps='winbind-client',
+                      pc_files='wbclient.pc',
+                      public_headers='wbclient.h',
+                      vnum='0')
diff --git a/nsswitch/libwbclient/wscript_build b/nsswitch/libwbclient/wscript_build
deleted file mode 100644 (file)
index 2b7fc08..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env python
-
-bld.SAMBA_LIBRARY('wbclient',
-       source='wbc_guid.c wbc_idmap.c wbclient.c wbc_pam.c wbc_pwd.c wbc_sid.c wbc_util.c',
-       deps='winbind-client',
-       pc_files='wbclient.pc',
-       public_headers='wbclient.h',
-       vnum='0'
-       )
diff --git a/wscript b/wscript
index f96327c..d1c7121 100755 (executable)
--- a/wscript
+++ b/wscript
@@ -95,6 +95,7 @@ def configure(conf):
     conf.RECURSE('source4/auth')
     conf.RECURSE('lib/nss_wrapper')
     conf.RECURSE('nsswitch')
+    conf.RECURSE('nsswitch/libwbclient')
     conf.RECURSE('lib/socket_wrapper')
     conf.RECURSE('lib/uid_wrapper')
     conf.RECURSE('lib/popt')