gpo: Test that VGP Sudoers policy handles group principals
[Samba.git] / nsswitch / wscript_build
blobe612377962c49f48510cca4c95f2f42781a222fb
1 #!/usr/bin/env python
2 from waflib import Utils
3 import sys
4 host_os = sys.platform
6 bld.SAMBA_LIBRARY('winbind-client',
7 source='wb_common.c',
8 deps='replace',
9 cflags='-DWINBINDD_SOCKET_DIR=\"%s\"' % bld.env.WINBINDD_SOCKET_DIR,
10 private_library=True
14 bld.SAMBA_BINARY('nsstest',
15 source='nsstest.c',
16 deps='replace dl',
17 for_selftest=True
20 if bld.CONFIG_SET('HAVE_PTHREAD'):
21 bld.SAMBA_BINARY('stress-nss-libwbclient',
22 source='stress-nss-libwbclient.c',
23 deps='wbclient pthread',
24 for_selftest=True
27 # The nss_wrapper code relies strictly on the linux implementation and
28 # name, so compile but do not install a copy under this name.
29 bld.SAMBA_LIBRARY('nss_wrapper_winbind',
30 source='winbind_nss_linux.c',
31 deps='winbind-client',
32 realname='libnss_wrapper_winbind.so.2',
33 install=False,
34 vnum='2')
36 # FIXME: original was *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
37 # the search for .rfind('gnu') covers gnu* and *-gnu is that too broad?
39 if (Utils.unversioned_sys_platform() == 'linux' or (host_os.rfind('gnu') > -1)):
40 bld.SAMBA_LIBRARY('nss_winbind',
41 keep_underscore=True,
42 source='winbind_nss_linux.c',
43 deps='winbind-client',
44 public_headers=[],
45 public_headers_install=False,
46 pc_files=[],
47 vnum='2')
49 bld.SAMBA3_LIBRARY('nss_wins',
50 keep_underscore=True,
51 source='wins.c',
52 deps='wbclient replace',
53 public_headers=[],
54 public_headers_install=False,
55 pc_files=[],
56 vnum='2')
57 elif (host_os.rfind('freebsd') > -1):
58 # FreeBSD winbind client is implemented as a wrapper around
59 # the Linux version.
60 bld.SAMBA_LIBRARY('nss_winbind',
61 source='winbind_nss_linux.c winbind_nss_freebsd.c',
62 deps='winbind-client',
63 realname='nss_winbind.so.1',
64 vnum='1')
66 bld.SAMBA3_LIBRARY('nss_wins',
67 source='wins.c wins_freebsd.c',
68 deps='''wbclient''',
69 realname='nss_wins.so.1',
70 vnum='1')
72 elif (host_os.rfind('netbsd') > -1):
73 # NetBSD winbind client is implemented as a wrapper
74 # around the Linux version. It needs getpwent_r() to
75 # indicate libc's use of the correct nsdispatch API.
77 if bld.CONFIG_SET("HAVE_GETPWENT_R"):
78 bld.SAMBA_LIBRARY('nss_winbind',
79 source='winbind_nss_linux.c winbind_nss_netbsd.c',
80 deps='winbind-client',
81 realname='libnss_winbind.so')
82 elif Utils.unversioned_sys_platform() == 'sunos':
83 bld.SAMBA_LIBRARY('nss_winbind',
84 source='winbind_nss_solaris.c winbind_nss_linux.c',
85 deps='winbind-client',
86 realname='nss_winbind.so.1',
87 vnum='1')
88 elif (host_os.rfind('hpux') > -1):
89 bld.SAMBA_LIBRARY('nss_winbind',
90 source='winbind_nss_linux.c',
91 deps='winbind-client',
92 realname='libnss_winbind.so')
93 elif (host_os.rfind('aix') > -1):
94 bld.SAMBA_LIBRARY('nss_winbind',
95 source='winbind_nss_aix.c',
96 deps='winbind-client',
97 realname='WINBIND')
99 if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'):
100 bld.SAMBA_LIBRARY('pamwinbind',
101 source='pam_winbind.c',
102 deps='talloc wbclient winbind-client tiniparser pam samba_intl',
103 cflags='-DLOCALEDIR=\"%s/locale\"' % bld.env.DATADIR,
104 realname='pam_winbind.so',
105 install_path='${PAMMODULESDIR}'
108 if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
109 bld.SAMBA_LIBRARY('winbind_krb5_locator',
110 source='krb5_plugin/winbind_krb5_locator.c',
111 deps='wbclient krb5 com_err',
112 realname='winbind_krb5_locator.so',
113 install_path='${MODULESDIR}/krb5')
115 if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
116 bld.SAMBA_LIBRARY('async_dns_krb5_locator',
117 source='krb5_plugin/async_dns_krb5_locator.c',
118 deps='''
119 talloc
120 addns
121 samba_intl
122 libsmb
123 smbconf
124 KRBCLIENT
125 smbd_base
126 krb5
127 com_err
128 ''',
129 realname='async_dns_krb5_locator.so',
130 install_path='${MODULESDIR}/krb5')
132 if bld.CONFIG_SET('HAVE_KRB5_LOCALAUTH_PLUGIN_H'):
133 bld.SAMBA_LIBRARY('winbind_krb5_localauth',
134 source='krb5_plugin/winbind_krb5_localauth.c',
135 deps='wbclient krb5 com_err',
136 realname='winbind_krb5_localauth.so',
137 install_path='${MODULESDIR}/krb5')
139 bld.SAMBA_SUBSYSTEM('WB_REQTRANS',
140 source='wb_reqtrans.c',
141 deps='talloc tevent LIBASYNC_REQ'
144 bld.SAMBA_BINARY('wbinfo',
145 source='wbinfo.c',
146 deps='samba-util LIBCLI_AUTH popt POPT_SAMBA wbclient LIBAFS_SETTOKEN'