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],[],[
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
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@