Required for older versions of libelf that don't have a pkgconfig file.

Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
---
 meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 5353a417484..15f7f0ea64f 100644
--- a/meson.build
+++ b/meson.build
@@ -283,7 +283,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
-- 
2.14.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to