Please review release 2.8.15 of xpaint. Under Arch Linux we have libpng 1.4 in our main repos, and this needs a small patch for xpaint to make it build.
See manpage for libpng 1.4 as reference. The relevant part:
png_check_sig(sig, num) was replaced with
!png_sig_cmp(sig, 0, num) It has been deprecated since libpng-0.90.