Signed-off-by: Felipe Contreras <[email protected]>
---
m4/libs.m4 | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/m4/libs.m4 b/m4/libs.m4
index 255a7ef..a99afbe 100644
--- a/m4/libs.m4
+++ b/m4/libs.m4
@@ -70,10 +70,18 @@ if test "x$with_selinux" != "xno"; then
AC_CHECK_LIB([selinux], [is_selinux_enabled],
[AC_DEFINE(WITH_SELINUX, 1,
[Define to 1 to compile in SELinux support])
- if test "x$with_selinux" = "xstatic"; then
- dpkg_selinux_libs="-Wl,-Bstatic "$(pkg-config --static
--libs libselinux)" -Wl,-Bdynamic"
+ if test $(pkg-config --exists libselinux); then
+ if test "x$with_selinux" = "xstatic"; then
+ dpkg_selinux_libs="-Wl,-Bstatic "$(pkg-config
--static --libs libselinux)" -Wl,-Bdynamic"
+ else
+ dpkg_selinux_libs=$(pkg-config --libs
libselinux)
+ fi
else
- dpkg_selinux_libs=$(pkg-config --libs libselinux)
+ if test "x$with_selinux" = "xstatic"; then
+ dpkg_selinux_libs="-Wl,-Bstatic -lselinux
-Wl,-Bdynamic"
+ else
+ dpkg_selinux_libs="-lselinux"
+ fi
fi
SELINUX_LIBS="${SELINUX_LIBS:+$SELINUX_LIBS
}$dpkg_selinux_libs"
with_selinux="yes"],
--
1.6.5.1
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]