s3: Fix some blank line endings
[Samba/gebeck_regimport.git] / nsswitch / wscript_build
bloba94c02ca6f29b9134fd924f1e5cdc8a11e504789
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='-DSOCKET_WRAPPER_DISABLE=1 -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'
19 # The nss_wrapper code relies strictly on the linux implementation and
20 # name, so compile but do not install a copy under this name.
21 bld.SAMBA_LIBRARY('nss_wrapper_winbind',
22 source='winbind_nss_linux.c',
23 deps='winbind-client',
24 realname='libnss_wrapper_winbind.so.2',
25 install=False,
26 vnum='2')
28 # FIXME: original was *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
29 # the search for .rfind('gnu') covers gnu* and *-gnu is that too broad?
31 if (Utils.unversioned_sys_platform() == 'linux' or (host_os.rfind('gnu') > -1)):
32 bld.SAMBA_LIBRARY('nss_winbind',
33 source='winbind_nss_linux.c',
34 deps='winbind-client',
35 realname='libnss_winbind.so.2',
36 soname='libnss_winbind.so',
37 vnum='2')
38 elif (host_os.rfind('freebsd') > -1):
39 # FreeBSD winbind client is implemented as a wrapper around
40 # the Linux version.
41 bld.SAMBA_LIBRARY('nss_winbind',
42 source='winbind_nss_linux.c winbind_nss_freebsd.c',
43 deps='winbind-client',
44 realname='libnss_winbind.so.1',
45 vnum='1')
47 elif (host_os.rfind('netbsd') > -1):
48 # NetBSD winbind client is implemented as a wrapper
49 # around the Linux version. It needs getpwent_r() to
50 # indicate libc's use of the correct nsdispatch API.
52 if bld.CONFIG_SET("HAVE_GETPWENT_R"):
53 bld.SAMBA_LIBRARY('nss_winbind',
54 source='winbind_nss_linux.c winbind_nss_netbsd.c',
55 deps='winbind-client',
56 realname='libnss_winbind.so')
57 elif (host_os.rfind('irix') > -1):
58 bld.SAMBA_LIBRARY('ns_winbind',
59 source='winbind_nss_irix.c',
60 deps='winbind-client',
61 realname='libns_winbind.so')
63 elif Utils.unversioned_sys_platform() == 'sunos':
64 bld.SAMBA_LIBRARY('nss_winbind',
65 source='winbind_nss_solaris.c winbind_nss_linux.c',
66 deps='winbind-client',
67 realname='nss_winbind.so.1',
68 vnum='1')
69 elif (host_os.rfind('hpux') > -1):
70 bld.SAMBA_LIBRARY('nss_winbind',
71 source='winbind_nss_linux.c',
72 deps='winbind-client',
73 realname='libnss_winbind.so')
74 elif (host_os.rfind('aix') > -1):
75 bld.SAMBA_LIBRARY('nss_winbind',
76 source='winbind_nss_aix.c',
77 deps='winbind-client',
78 realname='libnss_winbind.so')
80 if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'):
81 bld.SAMBA_LIBRARY('pamwinbind',
82 source='pam_winbind.c',
83 deps='intl talloc wbclient winbind-client iniparser pam',
84 cflags='-DLOCALEDIR=\"%s/locale\"' % bld.env.DATADIR,
85 realname='pam_winbind.so',
86 install_path='${PAMMODULESDIR}'
89 if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
90 bld.SAMBA_LIBRARY('winbind_krb5_locator',
91 source='winbind_krb5_locator.c',
92 deps='wbclient krb5 com_err',
93 realname='winbind_krb5_locator.so')
95 bld.SAMBA_SUBSYSTEM('WB_REQTRANS',
96 source='wb_reqtrans.c',
97 deps='talloc tevent LIBASYNC_REQ'
100 bld.SAMBA_BINARY('wbinfo',
101 source='wbinfo.c',
102 deps='samba-util LIBCLI_AUTH popt POPT_SAMBA wbclient LIBAFS_SETTOKEN'