summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2017-09-27 11:30:21 -0700
committerDylan Baker <[email protected]>2017-10-03 10:01:45 -0700
commitcc4f5873071f0cbea0dcea78359e5144ee1908e6 (patch)
treeb3f57045b51e069d5c655a0b551ba13c8a5e3bba /meson.build
parent9d9a46d4efc00b256d2c0d04dda6c4ee3f0dc47a (diff)
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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 4 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index ecd08651ff0..b1bd73691ee 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