Consult libpng-config more consistently.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 4 May 2014 21:28:08 +0000 (14:28 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 4 May 2014 21:28:08 +0000 (14:28 -0700)
commitf8c2cef5e60d31f48c44fc883bc72d2f6090834b
treec31f7cd29921efb107390227ee727147f0c63561
parent4a05c50a46dee2a75b06a2e4e3bc7732c267d7bb
Consult libpng-config more consistently.

This is mainly for simplicity, but it should also avoid
some future problems like the ones we recently had with NetBSD.
* configure.ac (LIBPNG): Configure after LIBZ.  Use libpng-config
for cflags, too.  Append -lz if we're not already doing that with
LIBZ.  Do not bother appending -lm, since we always append that.
Coalesce some duplicate code.
* src/Makefile.in (PNG_CFLAGS): New var.
(ALL_CFLAGS): Use it.
* src/image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
CFLAGS now handles this.

Fixes: debbugs:17339
ChangeLog
configure.ac
src/ChangeLog
src/Makefile.in
src/image.c