Explorar el Código

hack: use PKG_CONFIG var when checking libdevmapper

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit e37985f59009186dee26c42e14f03d7a11390f2c)
CrazyMax hace 2 años
padre
commit
75596bee28
Se han modificado 1 ficheros con 1 adiciones y 5 borrados
  1. 1 5
      hack/make.sh

+ 1 - 5
hack/make.sh

@@ -92,11 +92,7 @@ fi
 # functionality. We favour libdm_dlsym_deferred_remove over
 # functionality. We favour libdm_dlsym_deferred_remove over
 # libdm_no_deferred_remove in dynamic cases because the binary could be shipped
 # libdm_no_deferred_remove in dynamic cases because the binary could be shipped
 # with a newer libdevmapper than the one it was built with.
 # 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
 	add_buildtag libdm dlsym_deferred_remove
 fi
 fi