A trivial patch to configure.in is needed.
Created attachment 222903 [details, diff] patch to fix the detection problem (too) This patch is a bit more than required. It has also a minor modification to use proper macro/var for build type detection (as autoconf infopage (and Flameeyes) is quite clear, it should have been build, not target)
I'd prefer png_check_sig check converted to png_sig_cmp http://www.libpng.org/pub/png/src/libpng-1.2.x-to-1.4.x-summary.txt replace png_check_sig(buf, 8) with png_sig_cmp(buf, 0, 8) == 0
Like done with sed here, http://repos.archlinux.org/wsvn/packages/dosbox/trunk/PKGBUILD
libpng-1.4.1.txt, X. Detecting libpng The png_get_io_ptr() function has been present since libpng-0.88, has never changed, and is unaffected by conditional compilation macros. It is the best choice for use in configure scripts for detecting the presence of any libpng version since 0.88. In an autoconf "configure.in" you could use AC_CHECK_LIB(png, png_get_io_ptr, ... So yes, both works.
This patch also applies and works against dosbox-9999; apparently upstream still has this bug
+ 10 Mar 2010; Samuli Suominen <ssuominen@gentoo.org> dosbox-0.73.ebuild, + +files/dosbox-0.73-AC_CANONICAL_BUILD_and_libpng14.patch: + Fix libpng14 detection and replace AC_CANONICAL_TARGET with + AC_CANONICAL_BUILD wrt #308735 by Rafał Mużyło.