From 2791d5bb767469458070b1b87b947278779d03d7 Mon Sep 17 00:00:00 2001 From: Dmitry Eremin Date: Thu, 11 Dec 2014 16:17:59 +0300 Subject: [PATCH] LU-6023 build: fix libselinux support Enabling correct libselinux-devel detection by searching for the same header file in autoconf that is used in code. Link mount_osd_ldiskfs.so with -lselinux. Signed-off-by: Dmitry Eremin Change-Id: I085e91464a263b6d1b1be13971e54dfc80a4e347 Reviewed-on: http://review.whamcloud.com/13030 Reviewed-by: Bob Glossman Reviewed-by: Andreas Dilger Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Simmons --- lustre/autoconf/lustre-core.m4 | 4 ++-- lustre/utils/Makefile.am | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 239172b..d9b2993 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1858,13 +1858,13 @@ AC_CHECK_HEADERS([ext2fs/ext2fs.h]) SELINUX="" AC_CHECK_LIB([selinux], [is_selinux_enabled], - [AC_CHECK_HEADERS([selinux.h], + [AC_CHECK_HEADERS([selinux/selinux.h], [SELINUX="-lselinux" AC_DEFINE([HAVE_SELINUX], 1, [support for selinux ])], [AC_MSG_WARN([ -No selinux-devel package found, unable to build selinux enabled tools +No libselinux-devel package found, unable to build selinux enabled tools ]) ])], [AC_MSG_WARN([ diff --git a/lustre/utils/Makefile.am b/lustre/utils/Makefile.am index 69a07e3..2a1482e 100644 --- a/lustre/utils/Makefile.am +++ b/lustre/utils/Makefile.am @@ -138,6 +138,7 @@ pkglib_LTLIBRARIES += mount_osd_ldiskfs.la mount_osd_ldiskfs_la_SOURCES = mount_utils_ldiskfs.c mount_osd_ldiskfs_la_LDFLAGS = -shared -export-dynamic -module -avoid-version +mount_osd_ldiskfs_la_LIBADD := $(SELINUX) endif mount_lustre_SOURCES = mount_lustre.c mount_utils.c mount_utils.h -- 1.8.3.1