Mesa (master): meson: look for libelf as a library if there is no pkgconfig
Dylan Baker
dbaker at kemper.freedesktop.org
Tue Oct 3 17:03:43 UTC 2017
Module: Mesa
Branch: master
Commit: cc4f5873071f0cbea0dcea78359e5144ee1908e6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cc4f5873071f0cbea0dcea78359e5144ee1908e6
Author: Dylan Baker <dylan at pnwbakers.com>
Date: Wed Sep 27 11:30:21 2017 -0700
meson: look for libelf as a library if there is no pkgconfig
Required for older versions of libelf that don't have a pkgconfig file.
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
meson.build | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index ecd08651ff..b1bd73691e 100644
--- a/meson.build
+++ b/meson.build
@@ -286,7 +286,10 @@ endif
dep_zlib = dependency('zlib', version : '>= 1.2.3')
dep_thread = dependency('threads')
pre_args += '-DHAVE_PTHREAD'
-dep_elf = dependency('libelf')
+dep_elf = dependency('libelf', required : false)
+if not dep_elf.found()
+ dep_elf = cc.find_library('elf')
+endif
dep_expat = dependency('expat')
# this only exists on linux so either this is linux and it will be found, or
# its not linux and and wont
More information about the mesa-commit
mailing list