wscript_build 4.16 KB
Newer Older
1
#!/usr/bin/env python
2
import Utils
3 4
import sys
host_os = sys.platform
5

6 7 8
bld.SAMBA_LIBRARY('winbind-client',
	source='wb_common.c',
	deps='replace',
9
	cflags='-DWINBINDD_SOCKET_DIR=\"%s\"' % bld.env.WINBINDD_SOCKET_DIR,
10 11
	private_library=True
	)
12 13 14


bld.SAMBA_BINARY('nsstest',
15 16 17 18
		 source='nsstest.c',
		 deps='replace dl',
                 install=False
		 )
19

20 21 22 23 24 25 26 27 28
# 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')

29 30 31 32
# 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)):
33 34 35 36 37 38 39 40 41 42 43 44
    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',
45
                       deps='wbclient replace',
46 47 48 49
                       public_headers=[],
                       public_headers_install=False,
                       pc_files=[],
                       vnum='2')
50 51 52
elif (host_os.rfind('freebsd') > -1):
	# FreeBSD winbind client is implemented as a wrapper around
	# the Linux version.
53
	bld.SAMBA_LIBRARY('nss_winbind',
54 55
			  source='winbind_nss_linux.c winbind_nss_freebsd.c',
			  deps='winbind-client',
56
			  realname='nss_winbind.so.1',
57 58
			  vnum='1')

59 60
	bld.SAMBA3_LIBRARY('nss_wins',
			  source='wins.c wins_freebsd.c',
61
			  deps='''wbclient''',
62 63 64
			  realname='nss_wins.so.1',
			  vnum='1')

65 66 67 68
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.
69

70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
	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 (host_os.rfind('irix') > -1):
	bld.SAMBA_LIBRARY('ns_winbind',
			  source='winbind_nss_irix.c',
			  deps='winbind-client', 
			  realname='libns_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):
93
	bld.SAMBA_LIBRARY('nss_winbind',
94 95
			  source='winbind_nss_aix.c',
			  deps='winbind-client', 
96
			  realname='WINBIND')
97

98
if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'):
99
	bld.SAMBA_LIBRARY('pamwinbind',
100
		source='pam_winbind.c',
101
		deps='talloc wbclient winbind-client tiniparser pam samba_intl',
102 103
		cflags='-DLOCALEDIR=\"%s/locale\"' % bld.env.DATADIR,
		realname='pam_winbind.so',
104
		install_path='${PAMMODULESDIR}'
105
		)
106 107

if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
108
    bld.SAMBA_LIBRARY('winbind_krb5_locator',
109
                      source='krb5_plugin/winbind_krb5_locator.c',
110 111 112
                      deps='wbclient krb5 com_err',
                      realname='winbind_krb5_locator.so',
                      install_path='${MODULESDIR}/krb5')
113

114 115 116 117
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',
118 119
                      realname='winbind_krb5_localauth.so',
                      install_path='${MODULESDIR}/krb5')
120

121 122 123 124
bld.SAMBA_SUBSYSTEM('WB_REQTRANS',
	source='wb_reqtrans.c',
	deps='talloc tevent LIBASYNC_REQ'
	)
125 126 127 128 129

bld.SAMBA_BINARY('wbinfo',
	source='wbinfo.c',
	deps='samba-util LIBCLI_AUTH popt POPT_SAMBA wbclient LIBAFS_SETTOKEN'
	)