summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-10-02 08:12:16 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-10-03 14:25:57 +0200
commit1f267ca10e174ec3661631df2169e381136c2540 (patch)
treebd3c13cfd4b687daf091140059ea3da5b8e95012 /nsswitch
parent0e037bfc60162aa094df3e3cda59f7b9c2327ca9 (diff)
downloadsamba-1f267ca10e174ec3661631df2169e381136c2540.tar.gz
samba-1f267ca10e174ec3661631df2169e381136c2540.tar.bz2
samba-1f267ca10e174ec3661631df2169e381136c2540.zip
nsswitch: Build nss_winbind on all supported platforms
This matches what the autoconf build can do. Andrew Bartlett
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/wscript_build59
1 files changed, 49 insertions, 10 deletions
diff --git a/nsswitch/wscript_build b/nsswitch/wscript_build
index 97f0af55a1..8499c62eee 100644
--- a/nsswitch/wscript_build
+++ b/nsswitch/wscript_build
@@ -1,5 +1,7 @@
#!/usr/bin/env python
import Utils
+import sys
+host_os = sys.platform
bld.SAMBA_LIBRARY('winbind-client',
source='wb_common.c',
@@ -23,19 +25,56 @@ bld.SAMBA_LIBRARY('nss_wrapper_winbind',
install=False,
vnum='2')
-if Utils.unversioned_sys_platform() == 'linux':
+# 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)):
+ bld.SAMBA_LIBRARY('nss_winbind',
+ source='winbind_nss_linux.c',
+ deps='winbind-client',
+ realname='libnss_winbind.so.2',
+ vnum='2')
+elif (host_os.rfind('freebsd') > -1):
+ # FreeBSD winbind client is implemented as a wrapper around
+ # the Linux version.
bld.SAMBA_LIBRARY('nss_winbind',
- source='winbind_nss_linux.c',
- deps='winbind-client',
- realname='libnss_winbind.so.2',
- vnum='2')
+ source='winbind_nss_linux.c winbind_nss_freebsd.c',
+ deps='winbind-client',
+ realname='libnss_winbind.so.1',
+ vnum='1')
+
+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.
-if Utils.unversioned_sys_platform() == 'sunos':
+ 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):
bld.SAMBA_LIBRARY('nss_winbind',
- source='winbind_nss_solaris.c winbind_nss_linux.c',
- deps='winbind-client',
- realname='libnss_winbind.so.2',
- vnum='2')
+ source='winbind_nss_aix.c',
+ deps='winbind-client',
+ realname='libnss_winbind.so')
if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'):
bld.SAMBA_LIBRARY('pamwinbind',