erofs-utils: fuse: fix linking when using --with-selinux

The libselinux functions selabel_open and selabel_close are called
by lib/config.c, so include libselinux in CFLAGS and LIBS to fix
building erofsfuse.

Signed-off-by: David Michael <>
Reviewed-and-tested-by: Li Guifu <>
Signed-off-by: Gao Xiang <>
diff --git a/fuse/ b/fuse/
index f14f6fd..e7757bc 100644
--- a/fuse/
+++ b/fuse/
@@ -5,6 +5,6 @@
 bin_PROGRAMS     = erofsfuse
 erofsfuse_SOURCES = dir.c main.c
 erofsfuse_CFLAGS = -Wall -Werror -I$(top_srcdir)/include
-erofsfuse_CFLAGS += -DFUSE_USE_VERSION=26 ${libfuse_CFLAGS}
-erofsfuse_LDADD = $(top_builddir)/lib/ ${libfuse_LIBS} ${liblz4_LIBS}
+erofsfuse_CFLAGS += -DFUSE_USE_VERSION=26 ${libfuse_CFLAGS} ${libselinux_CFLAGS}
+erofsfuse_LDADD = $(top_builddir)/lib/ ${libfuse_LIBS} ${liblz4_LIBS} ${libselinux_LIBS}