X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=65c8af01153cb578831a54e440f50183caf86532;hp=14622e47a0dd1407b934d8348cf9b1453bca0a1b;hb=ccbe77e993317eef933bd4f4d383c3f2b2db74bc;hpb=7a58bfa4aef88c9ddead6668d83640f762938e72 diff --git a/configure.ac b/configure.ac index 14622e47a..65c8af011 100644 --- a/configure.ac +++ b/configure.ac @@ -105,15 +105,26 @@ PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.3.2 ]) AC_SUBST(DBUS_CFLAGS) AC_SUBST(DBUS_LIBS) -PKG_CHECK_MODULES(SELINUX, [ libselinux ]) -AC_SUBST(SELINUX_CFLAGS) -AC_SUBST(SELINUX_LIBS) -AC_SEARCH_LIBS([is_selinux_enabled], [selinux], [], [AC_MSG_ERROR([*** libselinux library not found])]) - PKG_CHECK_MODULES(DBUSGLIB, [ dbus-glib-1 ]) AC_SUBST(DBUSGLIB_CFLAGS) AC_SUBST(DBUSGLIB_LIBS) +have_selinux=no +AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support])) +if test "x$enable_selinux" != "xno"; then + # not using PKG_CHECK_MODULES as for some reason libselinux didn't + # install any pkg-config modules here + AC_SEARCH_LIBS([getcon], [selinux], + [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELINUX is available]) have_selinux=yes], + have_selinux=no) + AC_SUBST(SELINUX_CFLAGS) + AC_SUBST(SELINUX_LIBS) + if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then + AC_MSG_ERROR([*** selinux support requested but libraries not found]) + fi +fi +AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"]) + AC_ARG_ENABLE([tcpwrap], AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]), [case "${enableval}" in