diff options
author | Kusanagi Kouichi <slash@ac.auone-net.jp> | 2014-02-15 11:53:00 +0900 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2014-02-17 21:14:16 +0000 |
commit | 6ba4392da265b0b33e3516e85b2fdcfa9c169c39 (patch) | |
tree | c43566de942fb35bcb1556b47b1722938ae2035d /configure.ac | |
parent | 61f6cddef72a49d87e2b31ed49cdbc941d3b1efc (diff) |
configure: Try pkg-config first for libselinux
v2 (Emil) Add SELINUX_CFLAGS in the respective locations
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com> (v1)
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index e3a72bdc9a..d839476827 100644 --- a/configure.ac +++ b/configure.ac @@ -506,13 +506,15 @@ AC_ARG_ENABLE([selinux], [MESA_SELINUX="$enableval"], [MESA_SELINUX=no]) if test "x$enable_selinux" = "xyes"; then - AC_CHECK_HEADER([selinux/selinux.h],[], - [AC_MSG_ERROR([SELinux headers not found])]) - AC_CHECK_LIB([selinux],[is_selinux_enabled],[], - [AC_MSG_ERROR([SELinux library not found])]) - SELINUX_LIBS="-lselinux" + PKG_CHECK_MODULES([SELINUX], [libselinux], [], + [AC_CHECK_HEADER([selinux/selinux.h],[], + [AC_MSG_ERROR([SELinux headers not found])]) + AC_CHECK_LIB([selinux],[is_selinux_enabled],[], + [AC_MSG_ERROR([SELinux library not found])]) + SELINUX_LIBS="-lselinux"]) DEFINES="$DEFINES -DMESA_SELINUX" fi +AC_SUBST([SELINUX_CFLAGS]) AC_SUBST([SELINUX_LIBS]) dnl Options for APIs |