summaryrefslogtreecommitdiff
path: root/source4/auth/config.m4
blob: 03fdadb4e27aa4b61e16281669cf52b562b2cfab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
###############################
# start SMB_EXT_LIB_PAM
# check for security/pam_appl.h and -lpam
# Tests are now moved in ../nsswitch/config.m4 because winbind stuff require more pam tests
# end SMB_EXT_LIB_PAM
###############################

################################################
# test for where we get crypt() from
AC_CHECK_LIB_EXT(crypt, CRYPT_LIBS, crypt)
SMB_ENABLE(CRYPT,YES)
SMB_EXT_LIB(CRYPT, $CRYPT_LIBS)

AC_CHECK_FUNCS(crypt16 getauthuid getpwanam)

AC_CHECK_HEADERS(sasl/sasl.h)
AC_CHECK_LIB_EXT(sasl2, SASL_LIBS, sasl_client_init)

if test x"$ac_cv_header_sasl_sasl_h" = x"yes" -a x"$ac_cv_lib_ext_sasl2_sasl_client_init" = x"yes";then
	SMB_ENABLE(SASL,YES)
	SMB_ENABLE(cyrus_sasl,YES)
	SASL_CFLAGS="$CFLAGS"
	SASL_CPPFLAGS="$CPPFLAGS"
	SASL_LDFLAGS="$LDFLAGS"
	LIB_REMOVE_USR_LIB(SASL_LDFLAGS)
	CFLAGS_REMOVE_USR_INCLUDE(SASL_CPPFLAGS)
	CFLAGS_REMOVE_USR_INCLUDE(SASL_CFLAGS)
else
	SMB_ENABLE(cyrus_sasl,NO)
fi

SMB_EXT_LIB(SASL, $SASL_LIBS, [${SASL_CFLAGS}], [${SASL_CPPFLAGS}], [${SASL_LDFLAGS}])