Use printf instead of the non-standard echo -e This came up after the last patch made it use the shell-provided `echo` which here doesn't take the -e option.
drop all usages of `which`, in particular all of these case are an useless use of it anyway This fixes an FTBFS as now `which` as shipped by debianutils emits a deprecation warning that makes the tests fail to match their checks.
Use the standard macro PKG_PROG_PKG_CONFIG tp find the correct pkg-config That macro is already implicitly used via PKG_CHECK_MODULES, and is needed to find the right pkg-confix in case of cross compilation