[Mesa-dev] [PATCH] configure: Use pkg-config for libselinux

Kusanagi Kouichi slash at ac.auone-net.jp
Thu Feb 13 05:20:37 PST 2014


libselinux provides pkgconfig file since 2.0.89 (2009-10-29).

Signed-off-by: Kusanagi Kouichi <slash at ac.auone-net.jp>
---
 configure.ac | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 00a0eaa..949aaa2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -506,12 +506,7 @@ 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"
-    DEFINES="$DEFINES -DMESA_SELINUX"
+    PKG_CHECK_MODULES([SELINUX], [libselinux], [DEFINES="$DEFINES -DMESA_SELINUX"])
 fi
 AC_SUBST([SELINUX_LIBS])
 
-- 
1.9.0.rc3



More information about the mesa-dev mailing list