[Mesa-dev] [PATCH] configure.ac: use pkg-config for libelf
Jan Vesely
jan.vesely at rutgers.edu
Mon Nov 23 05:52:44 PST 2015
On Mon, 2015-11-23 at 14:24 +1100, Jonathan Gray wrote:
> Use PKG_CHECK_MODULES to get the flags to link libelf.
This has been discussed before, and it does not work with elfutils:
http://lists.freedesktop.org/archives/mesa-dev/2014-October/069748.html
Jan
>
> 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])
>
> if test "x$enable_opencl" = xyes; then
> if test -z "$with_gallium_drivers"; then
> @@ -2293,8 +2293,6 @@ if test "x$USE_VC4_SIMULATOR" = xyes -a
> "x$HAVE_GALLIUM_ILO" = xyes; then
> AC_MSG_ERROR([VC4 simulator on x86 replaces i965 driver build,
> so ilo must be disabled.])
> fi
>
> -AC_SUBST([ELF_LIB])
> -
> AM_CONDITIONAL(HAVE_LIBDRM, test "x$have_libdrm" = xyes)
> AM_CONDITIONAL(HAVE_X11_DRIVER, test "x$enable_xlib_glx" = xyes)
> AM_CONDITIONAL(HAVE_OSMESA, test "x$enable_osmesa" = xyes)
> diff --git a/src/gallium/drivers/radeon/Makefile.am
> b/src/gallium/drivers/radeon/Makefile.am
> index 13d8976..fa2b5a6 100644
> --- a/src/gallium/drivers/radeon/Makefile.am
> +++ b/src/gallium/drivers/radeon/Makefile.am
> @@ -24,7 +24,7 @@ libradeon_la_SOURCES += \
> libradeon_la_LIBADD = \
> $(CLOCK_LIB) \
> $(LLVM_LIBS) \
> - $(ELF_LIB)
> + $(LIBELF_LIBS)
>
> libradeon_la_LDFLAGS = \
> $(LLVM_LDFLAGS)
> diff --git a/src/gallium/targets/opencl/Makefile.am
> b/src/gallium/targets/opencl/Makefile.am
> index 08f95e8..99532f0 100644
> --- a/src/gallium/targets/opencl/Makefile.am
> +++ b/src/gallium/targets/opencl/Makefile.am
> @@ -19,7 +19,7 @@ lib at OPENCL_LIBNAME@_la_LIBADD = \
> $(top_builddir)/src/gallium/state_trackers/clover/libclover.
> la \
> $(top_builddir)/src/gallium/auxiliary/libgallium.la \
> $(top_builddir)/src/util/libmesautil.la \
> - $(ELF_LIB) \
> + $(LIBELF_LIBS) \
> $(DLOPEN_LIBS) \
> -lclangCodeGen \
> -lclangFrontendTool \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151123/7d4c965a/attachment.sig>
More information about the mesa-dev
mailing list