* Niels Thykier <niels@thykier.net>, 2016-04-16, 09:08:
The script contains the following: """ # using our installed *.pc only - neither default nor user paths export PKG_CONFIG_LIBDIR="${prefix}/lib/x86_64-linux-gnu/pkgconfig" """ pkg-config's manpage says: """ [...] PKG_CONFIG_LIBDIR Replaces the default pkg-config search directory. [...] """To be honest, I cannot figure out if it is a special case that happens to work or it is subtly still broken.
It happens to work only if architectures of libsane-dev and libsane-bin match. If they don't, it's non-subtly ;-) broken:
$ dpkg-query -Wf '${Package}\t${Architecture}\n' libsane-{dev,bin} libsane-bin i386 libsane-dev amd64 $ sane-config --libs Package sane-backends was not found in the pkg-config search path. Perhaps you should add the directory containing `sane-backends.pc' to the PKG_CONFIG_PATH environment variable No package 'sane-backends' found -- Jakub Wilk