1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r14631: Add {,un}installpammodules rule and add it to the install rule.

Nothing happens if PAM_MODULES is empty which is our default.

The default destination dir is "${LIBDIR}/security".  It's possible to
overwrite the default with --with-pammodulesdir while calling configure.
This commit is contained in:
Lars Müller 2006-03-21 21:54:53 +00:00 committed by Gerald (Jerry) Carter
parent 1b6a643785
commit 7163c68605
2 changed files with 37 additions and 2 deletions

View File

@ -65,6 +65,7 @@ BINDIR = @bindir@
SBINDIR = @sbindir@
ROOTSBINDIR = @rootsbindir@
LIBDIR = @libdir@
PAMMODULESDIR = @pammodulesdir@
VFSLIBDIR = $(LIBDIR)/vfs
PDBLIBDIR = $(LIBDIR)/pdb
RPCLIBDIR = $(LIBDIR)/rpc
@ -1412,7 +1413,7 @@ bin/t_snprintf@EXEEXT@: lib/snprintf.c
bin/timelimit@EXEEXT@: script/tests/timelimit.c
$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(DYNEXP) script/tests/timelimit.c
install: installservers installbin @INSTALL_CIFSMOUNT@ installman installscripts installdat installswat installmodules @INSTALL_LIBSMBCLIENT@ @INSTALL_LIBMSRPC@
install: installservers installbin @INSTALL_CIFSMOUNT@ installman installscripts installdat installswat installmodules @INSTALL_LIBSMBCLIENT@ @INSTALL_LIBMSRPC@ installpammodules
install-everything: install installmodules
@ -1478,6 +1479,16 @@ installlibmsrpc: installdirs libmsrpc
@$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) ${prefix}/include
-$(INSTALLCMD) $(srcdir)/include/libmsrpc.h $(DESTDIR)${prefix}/include
installpammodules: $(PAM_MODULES)
@if test "$(PAM_MODULES)"; then \
$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) $(PAMMODULESDIR); \
fi
@for module in $(PAM_MODULES); do \
echo "Installing module $${module} as $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \
install -m $(INSTALLPERMS) bin/$${module}.@SHLIBEXT@ \
"$(DESTDIR)/$(PAMMODULESDIR)"; \
done
# Python extensions
PYTHON_OBJS = $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_OBJ) $(RPC_PARSE_OBJ) \
@ -1534,7 +1545,7 @@ showlayout:
@echo " swatdir: $(SWATDIR)"
uninstall: uninstallman uninstallservers uninstallbin @UNINSTALL_CIFSMOUNT@ uninstallscripts uninstalldat uninstallswat uninstallmodules @UNINSTALL_LIBSMBCLIENT@ @UNINSTALL_LIBMSRPC@
uninstall: uninstallman uninstallservers uninstallbin @UNINSTALL_CIFSMOUNT@ uninstallscripts uninstalldat uninstallswat uninstallmodules @UNINSTALL_LIBSMBCLIENT@ @UNINSTALL_LIBMSRPC@ uninstallpammodules
uninstallman:
@$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(srcdir) C
@ -1578,6 +1589,12 @@ uninstalllibmsrpc: installdirs libmsrpc
-$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/libmsrpc.a
-rm -f $(DESTDIR)${prefix}/include/libmsrpc.h
uninstallpammodules:
@for module in $(PAM_MODULES); do \
echo "Removing $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \
rm -f "$(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@"; \
done
# Toplevel clean files
TOPFILES=dynconfig.o dynconfig.@PICSUFFIX@

View File

@ -29,6 +29,7 @@ test "${mandir}" || mandir="\${prefix}/man"
logfilebase="\${VARDIR}"
privatedir="\${prefix}/private"
test "${libdir}" || libdir="\${prefix}/lib"
pammodulesdir="\${LIBDIR}/security"
configdir="\${LIBDIR}"
swatdir="\${prefix}/swat"
@ -175,6 +176,22 @@ AC_ARG_WITH(libdir,
;;
esac])
#################################################
# set PAM modules directory location
AC_ARG_WITH(pammodulesdir,
[ --with-pammodulesdir=DIR Which directory to use for PAM modules ($ac_default_prefix/$libdir/security)],
[ case "$withval" in
yes|no)
#
# Just in case anybody calls it without argument
#
AC_MSG_WARN([--with-pammodulesdir called without argument - will use default])
;;
* )
pammodulesdir="$withval"
;;
esac])
#################################################
# set man directory location
AC_ARG_WITH(mandir,
@ -219,6 +236,7 @@ AC_SUBST(swatdir)
AC_SUBST(bindir)
AC_SUBST(sbindir)
AC_SUBST(rootsbindir)
AC_SUBST(pammodulesdir)
dnl Unique-to-Samba variables we'll be playing with.
AC_SUBST(SHELL)