linux-pam: add optional libselinux and audit dependencies
authorNiranjan Reddy <niranjan.reddy@rockwellcollins.com>
Wed, 16 Mar 2016 11:45:35 +0000 (17:15 +0530)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 19 Apr 2016 21:22:32 +0000 (23:22 +0200)
This patch adds optional libselinux and audit packages
to linux-pam package.

Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/linux-pam/linux-pam.mk

index 71c5490c7c8cc595bbbe63fff365772064e8d29a..2b94412ff65c0d9a32118356e940ba9ca7a65313 100644 (file)
@@ -26,6 +26,20 @@ LINUX_PAM_DEPENDENCIES += gettext
 LINUX_PAM_MAKE_OPTS += LIBS=-lintl
 endif
 
+ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
+LINUX_PAM_CONF_OPTS += --enable-selinux
+LINUX_PAM_DEPENDENCIES += libselinux
+else
+LINUX_PAM_CONF_OPTS += --disable-selinux
+endif
+
+ifeq ($(BR2_PACKAGE_AUDIT),y)
+LINUX_PAM_CONF_OPTS += --enable-audit
+LINUX_PAM_DEPENDENCIES += audit
+else
+LINUX_PAM_CONF_OPTS += --disable-audit
+endif
+
 # Install default pam config (deny everything except login)
 define LINUX_PAM_INSTALL_CONFIG
        $(INSTALL) -m 0644 -D package/linux-pam/login.pam \