[Mesa-stable] [PATCH] configure.ac: use pkg-config for libelf

Emil Velikov emil.l.velikov at gmail.com
Mon Nov 23 06:06:57 PST 2015


On 23 November 2015 at 03:24, Jonathan Gray <jsg at jsg.id.au> wrote:
> Use PKG_CHECK_MODULES to get the flags to link libelf.
>
> Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
> Cc: "11.0 11.1" <mesa-stable at lists.freedesktop.org>
> ---
>  configure.ac                           | 4 +---
>  src/gallium/drivers/radeon/Makefile.am | 2 +-
>  src/gallium/targets/opencl/Makefile.am | 2 +-
>  3 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 72a2ec1..afee3ed 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1712,7 +1712,7 @@ AC_ARG_WITH([clang-libdir],
>     [CLANG_LIBDIR=''])
>
>  PKG_CHECK_EXISTS([libclc], [have_libclc=yes], [have_libclc=no])
> -AC_CHECK_LIB([elf], [elf_memory], [have_libelf=yes;ELF_LIB=-lelf])
> +PKG_CHECK_MODULES([LIBELF], [libelf], [have_libelf=yes], [have_libelf=no])
>
There are (at least) two providers/projects for libelf one of which
iirc does not provide a .pc file. We might need to keep the check_lib
as a fall back. Don't know which one is required/compatible with
radeon and opencl.

Tom, Marek any ideas ?

Thanks
Emil


More information about the mesa-stable mailing list