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

Emil Velikov emil.l.velikov at gmail.com
Thu Feb 13 06:13:05 PST 2014


On 13/02/14 13:20, Kusanagi Kouichi wrote:
> libselinux provides pkgconfig file since 2.0.89 (2009-10-29).
> 
Can you check how many of the currently supported distros include that
version or later ?
I was nicely surprised when I did a similar change with expat

Thanks
-Emil

> 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])
>  
> 



More information about the mesa-dev mailing list