From 859dbdf891e16ac20b18f5fea4189f00746805eb Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 30 May 2020 17:43:10 +0200 Subject: Fix: Only add Selinux flags if WITH_SELINUX is set On a current Fedora 31, when cross compiling with mingw, pkg config manages to find the Selinux library, but not the header. The configure script disables WITH_SELINUX, but the library variable is still set, causing a linker error further down the line. Signed-off-by: David Oberhollenzer --- bin/gensquashfs/Makemodule.am | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/gensquashfs/Makemodule.am b/bin/gensquashfs/Makemodule.am index ab11dae..a9ae5b6 100644 --- a/bin/gensquashfs/Makemodule.am +++ b/bin/gensquashfs/Makemodule.am @@ -2,13 +2,14 @@ gensquashfs_SOURCES = bin/gensquashfs/mkfs.c bin/gensquashfs/mkfs.h gensquashfs_SOURCES += bin/gensquashfs/options.c bin/gensquashfs/selinux.c gensquashfs_SOURCES += bin/gensquashfs/dirscan.c bin/gensquashfs/dirscan_xattr.c gensquashfs_LDADD = libcommon.a libsquashfs.la libfstree.a -gensquashfs_LDADD += libcompat.a $(LIBSELINUX_LIBS) $(LZO_LIBS) -gensquashfs_LDADD += $(PTHREAD_LIBS) +gensquashfs_LDADD += libcompat.a $(LZO_LIBS) $(PTHREAD_LIBS) gensquashfs_CPPFLAGS = $(AM_CPPFLAGS) -gensquashfs_CFLAGS = $(AM_CFLAGS) $(LIBSELINUX_CFLAGS) $(PTHREAD_CFLAGS) +gensquashfs_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) if WITH_SELINUX gensquashfs_CPPFLAGS += -DWITH_SELINUX +gensquashfs_CFLAGS += $(LIBSELINUX_CFLAGS) +gensquashfs_LDADD += $(LIBSELINUX_LIBS) endif dist_man1_MANS += bin/gensquashfs/gensquashfs.1 -- cgit v1.2.3