hack: use PKG_CONFIG var when checking libdevmapper

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2022-12-27 01:51:08 +01:00
parent 84ea9ee0f9
commit e37985f590
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7

View file

@ -90,11 +90,7 @@ fi
# functionality. We favour libdm_dlsym_deferred_remove over
# libdm_no_deferred_remove in dynamic cases because the binary could be shipped
# with a newer libdevmapper than the one it was built with.
if
command -v gcc &> /dev/null \
&& ! (echo -e '#include <libdevmapper.h>\nint main() { dm_task_deferred_remove(NULL); }' | gcc -xc - -o /dev/null $(pkg-config --libs devmapper) &> /dev/null) \
;
then
if command -v gcc &> /dev/null && ! (echo -e '#include <libdevmapper.h>\nint main() { dm_task_deferred_remove(NULL); }' | gcc -xc - -o /dev/null $(${PKG_CONFIG} --libs devmapper 2> /dev/null) &> /dev/null); then
add_buildtag libdm dlsym_deferred_remove
fi