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 <dmitry.eremin@intel.com>
Change-Id: I085e91464a263b6d1b1be13971e54dfc80a4e347
Reviewed-on: http://review.whamcloud.com/13030
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
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([
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