diff options
author | Gilles Dartiguelongue <eva@gentoo.org> | 2015-11-25 09:23:51 +0100 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2015-12-02 11:36:21 +0100 |
commit | 450bf6bc9371d246f3084757efaef1a663d9f416 (patch) | |
tree | 2056fd2c55a7febcc0939cfaea5248c0400baf65 /configure.ac | |
parent | 91d5990612fdeebb080fb2c55f1740bfc2c64ef2 (diff) | |
download | nautilus-450bf6bc9371d246f3084757efaef1a663d9f416.tar.gz |
Make libselinux dependency controllable by configure switch
https://bugzilla.gnome.org/show_bug.cgi?id=758632
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac index 703790da5..48db1bc99 100644 --- a/configure.ac +++ b/configure.ac @@ -140,18 +140,19 @@ dnl ========================================================================== dnl **************************** dnl *** Check for libselinux *** dnl **************************** - -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) + +AC_ARG_ENABLE([selinux], + [AS_HELP_STRING([--enable-selinux], + [Enable selinux support])]) +AS_IF([test "$enable_selinux" != "no"], + [PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.0], + [ + AC_DEFINE([HAVE_SELINUX], [1], [Define to 1 if libselinux is available]) + msg_selinux=yes + ]) + ]) AC_ARG_ENABLE(empty_view, |