2 from waflib
import Utils
6 bld
.SAMBA_LIBRARY('winbind-client',
9 cflags
='-DWINBINDD_SOCKET_DIR=\"%s\"' % bld
.env
.WINBINDD_SOCKET_DIR
,
14 bld
.SAMBA_BINARY('nsstest',
20 if bld
.CONFIG_SET('HAVE_PTHREAD'):
21 bld
.SAMBA_BINARY('stress-nss-libwbclient',
22 source
='stress-nss-libwbclient.c',
23 deps
='wbclient pthread',
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',
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',
42 source
='winbind_nss_linux.c',
43 deps
='winbind-client',
45 public_headers_install
=False,
49 bld
.SAMBA3_LIBRARY('nss_wins',
52 deps
='wbclient replace',
54 public_headers_install
=False,
57 elif (host_os
.rfind('freebsd') > -1):
58 # FreeBSD winbind client is implemented as a wrapper around
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',
66 bld
.SAMBA3_LIBRARY('nss_wins',
67 source
='wins.c wins_freebsd.c',
69 realname
='nss_wins.so.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',
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',
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_LOCALAUTH_PLUGIN_H'):
116 bld
.SAMBA_LIBRARY('winbind_krb5_localauth',
117 source
='krb5_plugin/winbind_krb5_localauth.c',
118 deps
='wbclient krb5 com_err',
119 realname
='winbind_krb5_localauth.so',
120 install_path
='${MODULESDIR}/krb5')
122 bld
.SAMBA_SUBSYSTEM('WB_REQTRANS',
123 source
='wb_reqtrans.c',
124 deps
='talloc tevent LIBASYNC_REQ'
127 bld
.SAMBA_BINARY('wbinfo',
129 deps
='samba-util LIBCLI_AUTH popt POPT_SAMBA wbclient LIBAFS_SETTOKEN'