aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew G. Morgan <morgan@kernel.org>2008-01-17 19:31:45 -0800
committerAndrew G. Morgan <morgan@kernel.org>2008-01-17 19:31:45 -0800
commite64aa18f6da831ec1b787a57822080fd3b8cc378 (patch)
tree2d9e68ba8c043d3ddb9d72f8c9fee5cad884fe98
parentdf44db730f904c9fb1fdb83ab7f78abe8bd62844 (diff)
downloadlibcap-e64aa18f6da831ec1b787a57822080fd3b8cc378.tar.gz
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>
-rw-r--r--Make.Rules2
-rw-r--r--Makefile2
2 files changed, 3 insertions, 1 deletions
diff --git a/Make.Rules b/Make.Rules
index 0ffabe4..0bd3554 100644
--- a/Make.Rules
+++ b/Make.Rules
@@ -62,7 +62,7 @@ IPATH += -I$(topdir)/libcap/include -I$(KERNEL_HEADERS)
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 @@ include Make.Rules
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) $@