aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-05-30 17:43:10 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-05-30 17:51:36 +0200
commit859dbdf891e16ac20b18f5fea4189f00746805eb (patch)
treee0435fdaba5964a472635f15b98eac5605fbf359 /bin
parent4840d9b654f302ff5bb8aba2e04331374bf6c0ef (diff)
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'bin')
-rw-r--r--bin/gensquashfs/Makemodule.am7
1 files 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