Module: Mesa Branch: master Commit: 6ba4392da265b0b33e3516e85b2fdcfa9c169c39 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6ba4392da265b0b33e3516e85b2fdcfa9c169c39
Author: Kusanagi Kouichi <sl...@ac.auone-net.jp> Date: Sat Feb 15 11:53:00 2014 +0900 configure: Try pkg-config first for libselinux v2 (Emil) Add SELINUX_CFLAGS in the respective locations Signed-off-by: Kusanagi Kouichi <sl...@ac.auone-net.jp> Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com> Reviewed-by: Matt Turner <matts...@gmail.com> (v1) --- configure.ac | 12 +++++++----- src/mapi/glapi/Makefile.am | 1 + src/mapi/shared-glapi/Makefile.am | 1 + src/mapi/vgapi/Makefile.am | 1 + 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index e3a72bd..d839476 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 diff --git a/src/mapi/glapi/Makefile.am b/src/mapi/glapi/Makefile.am index bf653a3..e425bac 100644 --- a/src/mapi/glapi/Makefile.am +++ b/src/mapi/glapi/Makefile.am @@ -27,6 +27,7 @@ include ../Makefile.sources AM_CPPFLAGS = \ $(DEFINES) \ + $(SELINUX_CFLAGS) \ -I$(top_srcdir)/include \ -I$(top_srcdir)/src/mapi \ -I$(top_builddir)/src/mapi \ diff --git a/src/mapi/shared-glapi/Makefile.am b/src/mapi/shared-glapi/Makefile.am index b4703be..8d8b4dd 100644 --- a/src/mapi/shared-glapi/Makefile.am +++ b/src/mapi/shared-glapi/Makefile.am @@ -21,6 +21,7 @@ CLEANFILES = $(BUILT_SOURCES) AM_CFLAGS = $(PTHREAD_CFLAGS) AM_CPPFLAGS = \ $(DEFINES) \ + $(SELINUX_CFLAGS) \ -I$(top_srcdir)/include \ -I$(top_srcdir)/src/mapi \ -I$(top_builddir)/src/mapi \ diff --git a/src/mapi/vgapi/Makefile.am b/src/mapi/vgapi/Makefile.am index 8952df0..197f19f 100644 --- a/src/mapi/vgapi/Makefile.am +++ b/src/mapi/vgapi/Makefile.am @@ -21,6 +21,7 @@ AM_CPPFLAGS = \ $(DEFINES) \ + $(SELINUX_CFLAGS) \ -I$(top_srcdir)/include \ -I$(top_srcdir)/src/mapi \ -DMAPI_ABI_HEADER=\"vgapi_tmp.h\" _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit