libmount: Add libselinux dependency to pkgconfig file

Add libselinux dependency to libmount if it is compiled
with selinux support.

Without this fix, 'pkg-config --libs --static mount' doesn't
show libselinux related options.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
This commit is contained in:
Masami Hiramatsu 2019-10-11 16:15:35 +09:00 committed by Karel Zak
parent 6f00af5b3c
commit 9ae113ca73
2 changed files with 7 additions and 1 deletions

View File

@ -136,6 +136,12 @@ edit_cmd = sed \
-e 's|@LIBFDISK_PATCH_VERSION[@]|$(LIBFDISK_PATCH_VERSION)|g' \
-e 's|@LIBBLKID_VERSION[@]|$(LIBBLKID_VERSION)|g'
if HAVE_SELINUX
edit_cmd += -e 's|@LIBSELINUX[@]|libselinux|g'
else
edit_cmd += -e 's|@LIBSELINUX[@]||g'
endif
CLEANFILES += $(PATHFILES)
EXTRA_DIST += $(PATHFILES:=.in)

View File

@ -17,6 +17,6 @@ includedir=@includedir@
Name: mount
Description: mount library
Version: @LIBMOUNT_VERSION@
Requires.private: blkid
Requires.private: blkid @LIBSELINUX@
Cflags: -I${includedir}/libmount
Libs: -L${libdir} -lmount