waf: Add possibility to build with system libwbclient.
[sfrench/samba-autobuild/.git] / nsswitch / libwbclient / wscript
1 #!/usr/bin/env python
2
3 import Options, Logs
4
5 def configure(conf):
6     if conf.CHECK_BUNDLED_SYSTEM_PKG('wbclient', minversion='0'):
7         conf.define('USING_SYSTEM_LIBWBCLIENT', 1)
8
9 def build(bld):
10     if bld.CONFIG_SET('USING_SYSTEM_LIBWBCLIENT'):
11         Logs.info("\tSelected system libwbclient build")
12         return
13
14     Logs.info("\tSelected embedded libwbclient build")
15
16     bld.SAMBA_LIBRARY('wbclient',
17                       source='''
18                              wbc_guid.c
19                              wbc_idmap.c
20                              wbclient.c
21                              wbc_pam.c
22                              wbc_pwd.c
23                              wbc_sid.c
24                              wbc_util.c''',
25                       deps='winbind-client',
26                       pc_files='wbclient.pc',
27                       public_headers='wbclient.h',
28                       vnum='0')