Checking for the header is NOT sufficient when utilizing its shared library symbols. Look it up with pkg-config explicitly, and explicitly add it to ensure that at runtime, libppd has its own DT_NEEDED dependency on libz.so; if libppd successfully links at all -- not a given, if -Wl,-no-undefined is used -- then it may transitively get libz.so from its recursive dependencies, but this is no guarantee at all.
Checking for the header is NOT sufficient when utilizing its shared library symbols. Look it up with pkg-config explicitly, and explicitly add it to ensure that at runtime, libppd has its own DT_NEEDED dependency on libz.so; if libppd successfully links at all -- not a given, if -Wl,-no-undefined is used -- then it may transitively get libz.so from its recursive dependencies, but this is no guarantee at all.
Fixes failure to build discovered at https://bugs.gentoo.org/920273