From: Dmitry Eremin Date: Thu, 11 Dec 2014 13:17:59 +0000 (+0300) Subject: LU-6023 build: fix libselinux support X-Git-Tag: 2.6.92~30 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=2791d5bb767469458070b1b87b947278779d03d7 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 --- 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