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

Kusanagi Kouichi slash at ac.auone-net.jp
Fri Feb 14 18:53:00 PST 2014


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

diff --git a/configure.ac b/configure.ac
index 00a0eaa..5c58928 100644
--- a/configure.ac
+++ b/configure.ac
@@ -506,11 +506,12 @@ 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_LIBS])
-- 
1.9.0.rc3



More information about the mesa-dev mailing list