s4: allow pam_winbind.so to be build on samba4
authorMatthieu Patou <mat@matws.net>
Wed, 3 Mar 2010 08:38:51 +0000 (11:38 +0300)
committerStefan Metzmacher <metze@samba.org>
Thu, 11 Mar 2010 12:31:38 +0000 (13:31 +0100)
* Modify the nsswitch/config.m4 to add tests and build that will be put in configure by the autoconf/autoheader
  We test if there is pam headers and pam library to be able to build the pam module
  We add s4 build directive (that are normaly in standalone config.mk) this is due to the fact that we need
  to rely on path that are guessed during configure.
  Add tests not to build pam_winbind if pam dev files is not present

Signed-off-by: Stefan Metzmacher <metze@samba.org>
nsswitch/config.m4

index 8d9118322c546b7f42ff3a7bb6c6be7777633715..8966e35aa9be6cbb99a24ae9d647a49e7b31d768 100644 (file)
@@ -35,5 +35,12 @@ SMB_EXT_LIB(PAM, $PAM_LIBS)
 
 if test x"$ac_cv_header_security_pam_appl_h" = x"yes" -a x"$ac_cv_lib_ext_pam_pam_start" = x"yes";then
        SMB_ENABLE(PAM,YES)
+       if test x"$MERGED_BUILD" != x"1"; then
+               SMB_BUILD_LIBRARY(pam_winbind,[../nsswitch/pam_winbind.o],
+                                 [LIBWBCLIENT LIBWINBIND-CLIENT LIBINIPARSER PAM],
+                                 [-DLOCALEDIR=\\\"${datarootdir}/locale\\\"],
+                                 [],
+                                 [../nsswitch/pam_winbind.\$(SHLIBEXT)])
+       fi
 fi
 #####