2010-03-28 01:48:49 +03:00
#!/usr/bin/env python
2018-02-02 17:34:31 +03:00
from waflib import Utils
2012-10-02 02:12:16 +04:00
import sys
host_os = sys.platform
2010-03-28 01:48:49 +03:00
2010-10-24 03:23:53 +04:00
bld.SAMBA_LIBRARY('winbind-client',
source='wb_common.c',
deps='replace',
2014-04-07 18:09:00 +04:00
cflags='-DWINBINDD_SOCKET_DIR=\"%s\"' % bld.env.WINBINDD_SOCKET_DIR,
2010-10-24 03:23:53 +04:00
private_library=True
)
2010-03-17 14:07:42 +03:00
bld.SAMBA_BINARY('nsstest',
2012-11-21 13:20:46 +04:00
source='nsstest.c',
deps='replace dl',
2019-11-22 00:06:57 +03:00
for_selftest=True
2012-11-21 13:20:46 +04:00
)
2010-03-17 14:07:42 +03:00
2018-10-05 14:53:30 +03:00
if bld.CONFIG_SET('HAVE_PTHREAD'):
bld.SAMBA_BINARY('stress-nss-libwbclient',
source='stress-nss-libwbclient.c',
2019-10-15 13:52:42 +03:00
deps='wbclient pthread',
2019-11-22 00:06:57 +03:00
for_selftest=True
2018-10-05 14:53:30 +03:00
)
2012-10-03 10:36:34 +04:00
# The nss_wrapper code relies strictly on the linux implementation and
# name, so compile but do not install a copy under this name.
bld.SAMBA_LIBRARY('nss_wrapper_winbind',
source='winbind_nss_linux.c',
deps='winbind-client',
realname='libnss_wrapper_winbind.so.2',
install=False,
vnum='2')
2012-10-02 02:12:16 +04:00
# FIXME: original was *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
# the search for .rfind('gnu') covers gnu* and *-gnu is that too broad?
if (Utils.unversioned_sys_platform() == 'linux' or (host_os.rfind('gnu') > -1)):
2014-12-18 12:33:34 +03:00
bld.SAMBA_LIBRARY('nss_winbind',
keep_underscore=True,
source='winbind_nss_linux.c',
deps='winbind-client',
public_headers=[],
public_headers_install=False,
pc_files=[],
vnum='2')
bld.SAMBA3_LIBRARY('nss_wins',
keep_underscore=True,
source='wins.c',
2016-09-19 17:21:31 +03:00
deps='wbclient replace',
2014-12-18 12:33:34 +03:00
public_headers=[],
public_headers_install=False,
pc_files=[],
vnum='2')
2012-10-02 02:12:16 +04:00
elif (host_os.rfind('freebsd') > -1):
# FreeBSD winbind client is implemented as a wrapper around
# the Linux version.
2012-09-30 23:02:13 +04:00
bld.SAMBA_LIBRARY('nss_winbind',
2012-10-02 02:12:16 +04:00
source='winbind_nss_linux.c winbind_nss_freebsd.c',
deps='winbind-client',
2013-03-08 05:36:37 +04:00
realname='nss_winbind.so.1',
2012-10-02 02:12:16 +04:00
vnum='1')
2015-09-10 12:27:42 +03:00
bld.SAMBA3_LIBRARY('nss_wins',
source='wins.c wins_freebsd.c',
2015-10-23 13:31:43 +03:00
deps='''wbclient''',
2015-09-10 12:27:42 +03:00
realname='nss_wins.so.1',
vnum='1')
2012-10-02 02:12:16 +04:00
elif (host_os.rfind('netbsd') > -1):
# NetBSD winbind client is implemented as a wrapper
# around the Linux version. It needs getpwent_r() to
# indicate libc's use of the correct nsdispatch API.
2012-09-30 23:02:13 +04:00
2012-10-02 02:12:16 +04:00
if bld.CONFIG_SET("HAVE_GETPWENT_R"):
bld.SAMBA_LIBRARY('nss_winbind',
source='winbind_nss_linux.c winbind_nss_netbsd.c',
deps='winbind-client',
realname='libnss_winbind.so')
elif Utils.unversioned_sys_platform() == 'sunos':
bld.SAMBA_LIBRARY('nss_winbind',
source='winbind_nss_solaris.c winbind_nss_linux.c',
deps='winbind-client',
realname='nss_winbind.so.1',
vnum='1')
elif (host_os.rfind('hpux') > -1):
bld.SAMBA_LIBRARY('nss_winbind',
source='winbind_nss_linux.c',
deps='winbind-client',
realname='libnss_winbind.so')
elif (host_os.rfind('aix') > -1):
2012-09-30 23:02:13 +04:00
bld.SAMBA_LIBRARY('nss_winbind',
2012-10-02 02:12:16 +04:00
source='winbind_nss_aix.c',
deps='winbind-client',
2014-06-12 12:29:47 +04:00
realname='WINBIND')
2011-02-17 02:11:18 +03:00
2011-05-08 23:50:34 +04:00
if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'):
2010-10-24 03:23:53 +04:00
bld.SAMBA_LIBRARY('pamwinbind',
2011-02-17 02:11:18 +03:00
source='pam_winbind.c',
2014-08-14 03:36:28 +04:00
deps='talloc wbclient winbind-client tiniparser pam samba_intl',
2010-10-24 03:23:53 +04:00
cflags='-DLOCALEDIR=\"%s/locale\"' % bld.env.DATADIR,
realname='pam_winbind.so',
2011-09-06 11:39:16 +04:00
install_path='${PAMMODULESDIR}'
2010-10-24 03:23:53 +04:00
)
2011-02-17 02:11:18 +03:00
if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
2018-06-27 15:06:39 +03:00
bld.SAMBA_LIBRARY('winbind_krb5_locator',
2018-06-27 15:08:56 +03:00
source='krb5_plugin/winbind_krb5_locator.c',
2018-06-27 15:06:39 +03:00
deps='wbclient krb5 com_err',
realname='winbind_krb5_locator.so',
install_path='${MODULESDIR}/krb5')
2011-02-17 02:43:05 +03:00
2020-09-25 23:42:46 +03:00
if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
bld.SAMBA_LIBRARY('async_dns_krb5_locator',
source='krb5_plugin/async_dns_krb5_locator.c',
deps='''
talloc
addns
samba_intl
libsmb
smbconf
KRBCLIENT
smbd_base
krb5
com_err
''',
realname='async_dns_krb5_locator.so',
install_path='${MODULESDIR}/krb5')
2018-06-15 15:59:00 +03:00
if bld.CONFIG_SET('HAVE_KRB5_LOCALAUTH_PLUGIN_H'):
bld.SAMBA_LIBRARY('winbind_krb5_localauth',
source='krb5_plugin/winbind_krb5_localauth.c',
deps='wbclient krb5 com_err',
2018-06-27 15:06:39 +03:00
realname='winbind_krb5_localauth.so',
install_path='${MODULESDIR}/krb5')
2018-06-15 15:59:00 +03:00
2011-02-17 02:43:05 +03:00
bld.SAMBA_SUBSYSTEM('WB_REQTRANS',
source='wb_reqtrans.c',
deps='talloc tevent LIBASYNC_REQ'
)
2011-10-08 04:19:35 +04:00
bld.SAMBA_BINARY('wbinfo',
source='wbinfo.c',
deps='samba-util LIBCLI_AUTH popt POPT_SAMBA wbclient LIBAFS_SETTOKEN'
)