1 #################################################
2 # Check whether winbind is supported on this platform. If so we need to
3 # build and install client programs, sbin programs and shared libraries
5 AC_MSG_CHECKING(whether to build winbind)
7 # Initially, the value of $host_os decides whether winbind is supported
15 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
16 WINBIND_NSS_EXTRA_LIBS="-lsocket"
20 WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
24 winbind_no_reason=", unsupported on $host_os"
28 AC_SUBST(WINBIND_NSS_EXTRA_OBJS)
29 AC_SUBST(WINBIND_NSS_EXTRA_LIBS)
31 # Check the setting of --with-winbindd
34 [ --with-winbind Build winbind (default, if supported by OS)],
47 # We need unix domain sockets for winbind
48 if test x"$HAVE_WINBIND" = x"yes"; then
49 if test x"$samba_cv_unixsocket" = x"no"; then
50 winbind_no_reason=", no unix domain socket support on $host_os"
55 # Display test results
57 if test x"$HAVE_WINBIND" = x"yes"; then
59 AC_DEFINE(WITH_WINBIND,1,[Whether to build winbind])
61 EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo\$(EXEEXT)"
62 EXTRA_SBIN_PROGS="$EXTRA_SBIN_PROGS bin/winbindd\$(EXEEXT)"
63 if test x"$BLDSHARED" = x"true"; then
66 SHLIB_PROGS="$SHLIB_PROGS nsswitch/libns_winbind.so"
69 SHLIB_PROGS="$SHLIB_PROGS nsswitch/libnss_winbind.so"
72 if test x"$with_pam" = x"yes"; then
73 SHLIB_PROGS="$SHLIB_PROGS nsswitch/pam_winbind.so"
77 AC_MSG_RESULT(no$winbind_no_reason)
80 # Solaris has some extra fields in struct passwd that need to be
81 # initialised otherwise nscd crashes. Unfortunately autoconf < 2.50
82 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
85 #AC_CHECK_MEMBER(struct passwd.pw_comment,
86 # AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]),
89 AC_CACHE_CHECK([whether struct passwd has pw_comment],samba_cv_passwd_pw_comment, [
90 AC_TRY_COMPILE([#include <pwd.h>],[struct passwd p; p.pw_comment;],
91 samba_cv_passwd_pw_comment=yes,samba_cv_passwd_pw_comment=no)])
92 if test x"$samba_cv_passwd_pw_comment" = x"yes"; then
93 AC_DEFINE(HAVE_PASSWD_PW_COMMENT,1,[Whether struct passwd has pw_comment])
96 #AC_CHECK_MEMBER(struct passwd.pw_age,
97 # AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]),
100 AC_CACHE_CHECK([whether struct passwd has pw_age],samba_cv_passwd_pw_age, [
101 AC_TRY_COMPILE([#include <pwd.h>],[struct passwd p; p.pw_age;],
102 samba_cv_passwd_pw_age=yes,samba_cv_passwd_pw_age=no)])
103 if test x"$samba_cv_passwd_pw_age" = x"yes"; then
104 AC_DEFINE(HAVE_PASSWD_PW_AGE,1,[Whether struct passwd has pw_age])