diff --git a/configure.ac b/configure.ac index 052b4d0..12c818d 100644 --- a/configure.ac +++ b/configure.ac @@ -169,17 +169,24 @@ dnl **************************** dnl *** Check for libselinux *** dnl **************************** +AC_ARG_ENABLE(selinux, + [AC_HELP_STRING([--enable-selinux], + [build with selinux support])]) +AM_CONDITIONAL([ENABLE_SELINUX],[test "x$enable_selinux" = "xyes"]) + SELINUX_LIBS= msg_selinux=no -AC_CHECK_LIB(selinux, is_selinux_enabled, - [AC_CHECK_HEADERS(selinux/selinux.h, - [AC_SEARCH_LIBS(selinux_raw_to_trans_context, selinux, - [AC_DEFINE(HAVE_SELINUX, 1, [Define to 1 if libselinux is available]) - SELINUX_LIBS="-lselinux" - msg_selinux=yes]) - ]) - ]) -AC_SUBST(SELINUX_LIBS) +if test "x$enable_selinux" != "xno"; then + AC_CHECK_LIB(selinux, is_selinux_enabled, + [AC_CHECK_HEADERS(selinux/selinux.h, + [AC_SEARCH_LIBS(selinux_raw_to_trans_context, selinux, + [AC_DEFINE(HAVE_SELINUX, 1, [Define to 1 if libselinux is available]) + SELINUX_LIBS="-lselinux" + msg_selinux=yes]) + ]) + ]) + AC_SUBST(SELINUX_LIBS) +fi AC_ARG_ENABLE(empty_view, @@ -353,6 +360,7 @@ caja-$VERSION: warning flags: ${WARNING_CFLAGS} xmp support: $msg_xmp PackageKit support: $msg_packagekit + SELinux support: $msg_selinux Self check: $msg_self_check caja-extension documentation: ${enable_gtk_doc}