diff options
author | Niklas Gürtler <profclonk@gmail.com> | 2020-10-01 13:47:36 +0000 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2020-10-01 13:47:36 +0000 |
commit | aa0e120174fd1dc19ffbdba7cee8aa16de15b3ea (patch) | |
tree | 90631ddc8f15fab860f47006d204956eefcf0b94 | |
parent | 9bc61def1f815948ea28d92b59f506d3b2024ea0 (diff) | |
download | glib-aa0e120174fd1dc19ffbdba7cee8aa16de15b3ea.tar.gz |
Make libelf dependency optional via meson feature
-rw-r--r-- | gio/meson.build | 4 | ||||
-rw-r--r-- | meson_options.txt | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gio/meson.build b/gio/meson.build index 40a9ca6d0..37af9e438 100644 --- a/gio/meson.build +++ b/gio/meson.build @@ -874,14 +874,14 @@ endif # Dependencies used by executables below have_libelf = false -libelf = dependency('libelf', version : '>= 0.8.12', required : false) +libelf = dependency('libelf', version : '>= 0.8.12', required : get_option ('libelf')) if libelf.found() have_libelf = true else # This fallback is necessary on *BSD. elfutils isn't the only libelf # implementation, and *BSD usually includes their own libelf as a system # library which doesn't have a corresponding .pc file. - libelf = cc.find_library('elf', required : false) + libelf = cc.find_library('elf', required : get_option ('libelf')) have_libelf = libelf.found() have_libelf = have_libelf and cc.has_function('elf_begin', dependencies : libelf) have_libelf = have_libelf and cc.has_function('elf_getshdrstrndx', dependencies : libelf) diff --git a/meson_options.txt b/meson_options.txt index c6f228a01..af9645eda 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -111,3 +111,8 @@ option('glib_checks', value : true, yield : true, description : 'Enable GLib checks such as API guards (see docs/macros.txt)') + +option('libelf', + type : 'feature', + value : 'auto', + description : 'Enable support for listing and extracting from ELF resource files with gresource tool')
\ No newline at end of file |