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

Emil Velikov emil.l.velikov at gmail.com
Tue Dec 1 08:56:54 PST 2015


Hi Jonathan,

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])
>
As suggested can you rework the patch to have the pkg check + the
original check_lib as a fall-back.
While you're doing this can we also make use of the _CFLAGS in
src/gallium/drivers/radeon/ and src/gallium/state_trackers/clover/ ?

Thanks
Emil


More information about the mesa-dev mailing list