backupkey: Implement ServerWrap Decrypt
[Samba.git] / nsswitch / wscript_build
blob381ff44a669d737a7fe5b841ea8ab2c6e7d6e44f
1 #!/usr/bin/env python
2 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 install=False
20 # The nss_wrapper code relies strictly on the linux implementation and
21 # name, so compile but do not install a copy under this name.
22 bld.SAMBA_LIBRARY('nss_wrapper_winbind',
23 source='winbind_nss_linux.c',
24 deps='winbind-client',
25 realname='libnss_wrapper_winbind.so.2',
26 install=False,
27 vnum='2')
29 # FIXME: original was *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
30 # the search for .rfind('gnu') covers gnu* and *-gnu is that too broad?
32 if (Utils.unversioned_sys_platform() == 'linux' or (host_os.rfind('gnu') > -1)):
33 bld.SAMBA_LIBRARY('nss_winbind',
34 keep_underscore=True,
35 source='winbind_nss_linux.c',
36 deps='winbind-client',
37 public_headers=[],
38 public_headers_install=False,
39 pc_files=[],
40 vnum='2')
42 # for nss_wins is linux only
43 bld.SAMBA3_LIBRARY('nss_wins',
44 keep_underscore=True,
45 source='wins.c',
46 deps='''param libsmb LIBTSOCKET''',
47 public_headers=[],
48 public_headers_install=False,
49 pc_files=[],
50 vnum='2')
51 elif (host_os.rfind('freebsd') > -1):
52 # FreeBSD winbind client is implemented as a wrapper around
53 # the Linux version.
54 bld.SAMBA_LIBRARY('nss_winbind',
55 source='winbind_nss_linux.c winbind_nss_freebsd.c',
56 deps='winbind-client',
57 realname='nss_winbind.so.1',
58 vnum='1')
60 elif (host_os.rfind('netbsd') > -1):
61 # NetBSD winbind client is implemented as a wrapper
62 # around the Linux version. It needs getpwent_r() to
63 # indicate libc's use of the correct nsdispatch API.
65 if bld.CONFIG_SET("HAVE_GETPWENT_R"):
66 bld.SAMBA_LIBRARY('nss_winbind',
67 source='winbind_nss_linux.c winbind_nss_netbsd.c',
68 deps='winbind-client',
69 realname='libnss_winbind.so')
70 elif (host_os.rfind('irix') > -1):
71 bld.SAMBA_LIBRARY('ns_winbind',
72 source='winbind_nss_irix.c',
73 deps='winbind-client',
74 realname='libns_winbind.so')
76 elif Utils.unversioned_sys_platform() == 'sunos':
77 bld.SAMBA_LIBRARY('nss_winbind',
78 source='winbind_nss_solaris.c winbind_nss_linux.c',
79 deps='winbind-client',
80 realname='nss_winbind.so.1',
81 vnum='1')
82 elif (host_os.rfind('hpux') > -1):
83 bld.SAMBA_LIBRARY('nss_winbind',
84 source='winbind_nss_linux.c',
85 deps='winbind-client',
86 realname='libnss_winbind.so')
87 elif (host_os.rfind('aix') > -1):
88 bld.SAMBA_LIBRARY('nss_winbind',
89 source='winbind_nss_aix.c',
90 deps='winbind-client',
91 realname='WINBIND')
93 if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'):
94 bld.SAMBA_LIBRARY('pamwinbind',
95 source='pam_winbind.c',
96 deps='talloc wbclient winbind-client tiniparser pam samba_intl',
97 cflags='-DLOCALEDIR=\"%s/locale\"' % bld.env.DATADIR,
98 realname='pam_winbind.so',
99 install_path='${PAMMODULESDIR}'
102 if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
103 bld.SAMBA_LIBRARY('winbind_krb5_locator',
104 source='winbind_krb5_locator.c',
105 deps='wbclient krb5 com_err',
106 realname='winbind_krb5_locator.so')
108 bld.SAMBA_SUBSYSTEM('WB_REQTRANS',
109 source='wb_reqtrans.c',
110 deps='talloc tevent LIBASYNC_REQ'
113 bld.SAMBA_BINARY('wbinfo',
114 source='wbinfo.c',
115 deps='samba-util LIBCLI_AUTH popt POPT_SAMBA wbclient LIBAFS_SETTOKEN'