summaryrefslogtreecommitdiff
path: root/lib/compat
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-08-10 03:37:06 +0200
committerGuillem Jover <guillem@debian.org>2014-08-15 03:41:58 +0200
commit464ebf59ed3b91684e01255c4070f3eb7ea63af9 (patch)
treea018b128990cad8a03f126c3161a996817d1784a /lib/compat
parent1878855c4a3eaa5a544c81e24b5a990d6139ff7b (diff)
downloaddpkg-464ebf59ed3b91684e01255c4070f3eb7ea63af9.tar.gz
libcompat: Only build the compatibility selinux code if requested
If we are not using libselinux, then we cannot build the selinux compatibility code as it requires the library. Also fixes build failures on non-Linux systems, where the library is not available. Closes: #757637
Diffstat (limited to 'lib/compat')
-rw-r--r--lib/compat/Makefile.am7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/compat/Makefile.am b/lib/compat/Makefile.am
index 72c50b23b..b1c19e11d 100644
--- a/lib/compat/Makefile.am
+++ b/lib/compat/Makefile.am
@@ -10,7 +10,6 @@ noinst_LTLIBRARIES = libcompat-test.la libcompat.la
libcompat_test_la_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_LIBCOMPAT=1
libcompat_test_la_SOURCES = \
compat.h \
- selinux.c \
strnlen.c \
strndup.c \
strerror.c \
@@ -21,6 +20,10 @@ libcompat_test_la_SOURCES = \
scandir.c \
unsetenv.c
+if WITH_SELINUX
+libcompat_test_la_SOURCES += selinux.c
+endif
+
libcompat_la_SOURCES = \
empty.c \
compat.h \
@@ -57,9 +60,11 @@ if !HAVE_STRSIGNAL
libcompat_la_SOURCES += strsignal.c
endif
+if WITH_SELINUX
if !HAVE_SETEXECFILECON
libcompat_la_SOURCES += selinux.c
endif
+endif
if !HAVE_C99_SNPRINTF
libcompat_la_SOURCES += snprintf.c vsnprintf.c