2010-03-28 09:48:49 +11:00
#!/usr/bin/env python
2018-02-02 16:34:31 +02:00
from waflib import Utils
2012-10-02 08:12:16 +10:00
import sys
host_os = sys.platform
2010-03-28 09:48:49 +11:00
2010-10-23 16:23:53 -07:00
bld.SAMBA_LIBRARY('winbind-client',
source='wb_common.c',
deps='replace',
2014-04-07 16:09:00 +02:00
cflags='-DWINBINDD_SOCKET_DIR=\"%s\"' % bld.env.WINBINDD_SOCKET_DIR,
2010-10-23 16:23:53 -07:00
private_library=True
)
2010-03-17 22:07:42 +11:00
bld.SAMBA_BINARY('nsstest',
2012-11-21 20:20:46 +11:00
source='nsstest.c',
deps='replace dl',
2019-11-22 10:06:57 +13:00
for_selftest=True
2012-11-21 20:20:46 +11:00
)
2010-03-17 22:07:42 +11:00
2018-10-05 13:53:30 +02: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 10:06:57 +13:00
for_selftest=True
2018-10-05 13:53:30 +02:00
)
2012-10-03 16:36:34 +10: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 08:12:16 +10: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 10:33:34 +01: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 16:21:31 +02:00
deps='wbclient replace',
2014-12-18 10:33:34 +01:00
public_headers=[],
public_headers_install=False,
pc_files=[],
vnum='2')
2012-10-02 08:12:16 +10:00
elif (host_os.rfind('freebsd') > -1):
# FreeBSD winbind client is implemented as a wrapper around
# the Linux version.
2012-09-30 19:02:13 +00:00
bld.SAMBA_LIBRARY('nss_winbind',
2012-10-02 08:12:16 +10:00
source='winbind_nss_linux.c winbind_nss_freebsd.c',
deps='winbind-client',
2013-03-07 17:36:37 -08:00
realname='nss_winbind.so.1',
2012-10-02 08:12:16 +10:00
vnum='1')
2015-09-10 11:27:42 +02:00
bld.SAMBA3_LIBRARY('nss_wins',
source='wins.c wins_freebsd.c',
2015-10-23 12:31:43 +02:00
deps='''wbclient''',
2015-09-10 11:27:42 +02:00
realname='nss_wins.so.1',
vnum='1')
2012-10-02 08:12:16 +10: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 19:02:13 +00:00
2012-10-02 08:12:16 +10: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 19:02:13 +00:00
bld.SAMBA_LIBRARY('nss_winbind',
2012-10-02 08:12:16 +10:00
source='winbind_nss_aix.c',
deps='winbind-client',
2014-06-12 10:29:47 +02:00
realname='WINBIND')
2011-02-17 00:11:18 +01:00
2011-05-08 21:50:34 +02:00
if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'):
2010-10-23 16:23:53 -07:00
bld.SAMBA_LIBRARY('pamwinbind',
2011-02-17 00:11:18 +01:00
source='pam_winbind.c',
2014-08-13 16:36:28 -07:00
deps='talloc wbclient winbind-client tiniparser pam samba_intl',
2010-10-23 16:23:53 -07:00
cflags='-DLOCALEDIR=\"%s/locale\"' % bld.env.DATADIR,
realname='pam_winbind.so',
2011-09-06 09:39:16 +02:00
install_path='${PAMMODULESDIR}'
2010-10-23 16:23:53 -07:00
)
2011-02-17 00:11:18 +01:00
if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
2018-06-27 14:06:39 +02:00
bld.SAMBA_LIBRARY('winbind_krb5_locator',
2018-06-27 14:08:56 +02:00
source='krb5_plugin/winbind_krb5_locator.c',
2018-06-27 14:06:39 +02:00
deps='wbclient krb5 com_err',
realname='winbind_krb5_locator.so',
install_path='${MODULESDIR}/krb5')
2011-02-17 00:43:05 +01:00
2020-09-25 13:42:46 -07: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 14:59:00 +02: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 14:06:39 +02:00
realname='winbind_krb5_localauth.so',
install_path='${MODULESDIR}/krb5')
2018-06-15 14:59:00 +02:00
2011-02-17 00:43:05 +01:00
bld.SAMBA_SUBSYSTEM('WB_REQTRANS',
source='wb_reqtrans.c',
deps='talloc tevent LIBASYNC_REQ'
)
2011-10-08 11:19:35 +11:00
bld.SAMBA_BINARY('wbinfo',
source='wbinfo.c',
deps='samba-util LIBCLI_AUTH popt POPT_SAMBA wbclient LIBAFS_SETTOKEN'
)