From 454859f3cbe6f59cbf6d5905fe469d3bf64adf4a Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 22 Dec 2010 14:58:11 +0200 Subject: [PATCH] Only sepolicy-plugin needs linking to libsemanage --- configure.ac | 5 ++++- plugins/Makefile.am | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 9254dc6..2aa190b 100644 --- a/configure.ac +++ b/configure.ac @@ -599,6 +599,7 @@ AS_IF([test "$with_selinux" = yes],[ AC_MSG_ERROR([--with-selinux given, but selinux/label.h not found]) ]) + dnl FIXME: semanage is only needed for the sepolicy plugin AC_CHECK_HEADER([semanage/semanage.h],[ save_LIBS="$LIBS" AC_CHECK_LIB([semanage],[semanage_begin_transaction],[],[ @@ -637,9 +638,11 @@ AS_IF([test "$with_selinux" = yes],[ AS_IF([test "$with_selinux" = yes],[ AC_DEFINE(WITH_SELINUX, 1, [Build with selinux support?]) - WITH_SELINUX_LIB="-lselinux -lsemanage" + WITH_SELINUX_LIB="-lselinux" + WITH_SEMANAGE_LIB="-lsemanage" ]) AC_SUBST(WITH_SELINUX_LIB) +AC_SUBST(WITH_SEMANAGE_LIB) AM_CONDITIONAL(SELINUX,[test "$with_selinux" = yes]) # libcap diff --git a/plugins/Makefile.am b/plugins/Makefile.am index b9fd823..69230de 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -19,5 +19,5 @@ exec_la_SOURCES = plugin.h exec.c exec_la_LIBADD = $(top_builddir)/lib/librpm.la $(top_builddir)/rpmio/librpmio.la sepolicy_la_SOURCES = plugin.h sepolicy.c -sepolicy_la_LIBADD = $(top_builddir)/lib/librpm.la $(top_builddir)/rpmio/librpmio.la @WITH_SELINUX_LIB@ +sepolicy_la_LIBADD = $(top_builddir)/lib/librpm.la $(top_builddir)/rpmio/librpmio.la @WITH_SELINUX_LIB@ @WITH_SEMANAGE_LIB@ -- 2.7.4