diff options
Diffstat (limited to 'nsswitch/wscript_build')
-rw-r--r-- | nsswitch/wscript_build | 59 |
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', |