s4: Modify auth/config.m4 to move pam tests to nsswitch.m4 so that we tests things...
[ira/wip.git] / nsswitch / config.m4
1 ######
2 AC_CHECK_HEADERS(nss.h nss_common.h ns_api.h )
3
4 case "$host_os" in
5         *linux*)
6             if test x"$MERGED_BUILD" != x"1"; then
7                 SMB_BUILD_LIBRARY(nss_winbind,
8                             [../nsswitch/winbind_nss_linux.o],
9                             [LIBWINBIND-CLIENT])
10                 SMB_MAKE_SETTINGS([nss_winbind_VERSION = 2])
11                 SMB_MAKE_SETTINGS([nss_winbind_SOVERSION = 2])
12             fi
13         ;;
14         *)
15         ;;
16 esac
17 #####
18
19 #####
20 #All the pam requirement tests are regrouped here
21 #It is mandatory not to remove them otherwise it will break badly the source4/auth part
22 AC_CHECK_HEADERS(security/pam_appl.h)
23 AC_CHECK_LIB_EXT(pam, PAM_LIBS, pam_start)
24 # This part is need for the compilation
25 AC_CHECK_HEADERS(security/pam_modules.h pam/pam_modules.h,,,[[
26     #if HAVE_SECURITY_PAM_APPL_H
27     #include <security/pam_appl.h>
28     #endif
29     #if HAVE_PAM_PAM_APPL_H
30     #include <pam/pam_appl.h>
31     #endif
32 ]])
33
34 SMB_EXT_LIB(PAM, $PAM_LIBS)
35
36 if test x"$ac_cv_header_security_pam_appl_h" = x"yes" -a x"$ac_cv_lib_ext_pam_pam_start" = x"yes";then
37         SMB_ENABLE(PAM,YES)
38 fi
39 #####