+install-pam:
+ @src="$(srcdir)/xscreensaver.pam" ; \
+ dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
+ < ../config.h` ; \
+ dir=/etc/pam.d ; \
+ conf=/etc/pam.conf ; \
+ \
+ if [ -d $$dir ] ; then \
+ echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
+ $(INSTALL_DATA) $$src $$dir/$$dest ; \
+ if [ ! -f $$dir/$$dest ]; then \
+ e=echo ; \
+ $$e "" ;\
+ $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
+ $$e " Authentication Modules (PAM). However, we were unable to" ;\
+ $$e " install the file $$dir/$$dest. PAM is unlikely to work" ;\
+ $$e " without this file (and old-style password authentication" ;\
+ $$e " will be used instead, which may or may not work.)" ;\
+ $$e "" ;\
+ fi ; \
+ elif [ -f $$conf ]; then \
+ if ( grep $$dest $$conf >/dev/null ); then \
+ true ; \
+ else \
+ e=echo ; \
+ $$e "" ;\
+ $$e " Warning: xscreensaver has been compiled with support for Pluggable" ;\
+ $$e " Authentication Modules (PAM). To complete the installation";\
+ $$e " of PAM support, you must add this to the file $$conf:" ;\
+ $$e "" ;\
+ cat $$src | grep -v '#%' | sed "s/^/ $$dest /" ; \
+ echo ""; \
+ fi ; \
+ fi
+
+