Make pam_cap compilation conditional.

Default is for make to guess if the user wants the module or not
user can override with

    make PAM_CAP={yes|no}

Thanks to Chris Freidhoff for the suggestion and a first stab at a patch.

Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
diff --git a/Make.Rules b/Make.Rules
index 0ffabe4..0bd3554 100644
--- a/Make.Rules
+++ b/Make.Rules
@@ -62,7 +62,7 @@
 INCS=$(topdir)/libcap/include/sys/capability.h
 LIBS=-L$(topdir)/libcap -lcap
 CFLAGS=-Dlinux $(WARNINGS) $(DEBUG) $(COPTFLAG) $(IPATH)
-
+PAM_CAP ?= $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
 # Global cleanup stuff
 
 LOCALCLEAN=rm -f *~ core
diff --git a/Makefile b/Makefile
index 14f0dce..52f7b42 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,9 @@
 
 all install clean: %: %-here
 	$(MAKE) -C libcap $(MAKE_DEFS) $@
+ifneq ($(PAM_CAP),no)
 	$(MAKE) -C pam_cap $(MAKE_DEFS) $@
+endif
 	$(MAKE) -C progs $(MAKE_DEFS) $@
 	$(MAKE) -C doc $(MAKE_DEFS) $@