Skip to content

meson: allow -Dlibelf=enabled without pkg-config

Jan Beich requested to merge jbeich/glib:bsd-libelf-enabled into main

I'd like to pass --auto-features=enabled downstream on FreeBSD for all packages. BSD libelf lacks pkg-config support, so fails dependency but not find_library. Let's abort build via required on find_library instead. Passing -Dlibelf=disabled disables libelf support completely, so would be a runtime regression.

See also https://github.com/mesonbuild/meson/issues/5364
Inspired by gtk#5633 (closed)

Edited by Jan Beich

Merge request reports