mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-13 21:06:17 +01:00
Make libelf dependency optional via meson feature
This commit is contained in:
parent
9bc61def1f
commit
aa0e120174
@ -874,14 +874,14 @@ endif
|
|||||||
|
|
||||||
# Dependencies used by executables below
|
# Dependencies used by executables below
|
||||||
have_libelf = false
|
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()
|
if libelf.found()
|
||||||
have_libelf = true
|
have_libelf = true
|
||||||
else
|
else
|
||||||
# This fallback is necessary on *BSD. elfutils isn't the only libelf
|
# This fallback is necessary on *BSD. elfutils isn't the only libelf
|
||||||
# implementation, and *BSD usually includes their own libelf as a system
|
# implementation, and *BSD usually includes their own libelf as a system
|
||||||
# library which doesn't have a corresponding .pc file.
|
# 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 = libelf.found()
|
||||||
have_libelf = have_libelf and cc.has_function('elf_begin', dependencies : libelf)
|
have_libelf = have_libelf and cc.has_function('elf_begin', dependencies : libelf)
|
||||||
have_libelf = have_libelf and cc.has_function('elf_getshdrstrndx', dependencies : libelf)
|
have_libelf = have_libelf and cc.has_function('elf_getshdrstrndx', dependencies : libelf)
|
||||||
|
@ -111,3 +111,8 @@ option('glib_checks',
|
|||||||
value : true,
|
value : true,
|
||||||
yield : true,
|
yield : true,
|
||||||
description : 'Enable GLib checks such as API guards (see docs/macros.txt)')
|
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')
|
Loading…
Reference in New Issue
Block a user