wrlib: Moved configure's detection of PNG support to a dedicated macro
commit1c21d946ec2eba1e0957605875eaf53fa4349f85
authorChristophe CURIS <christophe.curis@free.fr>
Mon, 4 Nov 2013 19:52:30 +0000 (4 20:52 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Mon, 30 Dec 2013 18:11:02 +0000 (30 18:11 +0000)
tree4e81d7d1bb2f76e2cb021ab2a6d650e80b592934
parent777bf28ab35f014e62faf3c37e0ff8e4cec7fc60
wrlib: Moved configure's detection of PNG support to a dedicated macro

The original check was not compliant with autoconf's syntax, did not
have a very good behaviour for user and was not easy to make evolve.

The new macro:
 - uses as much as possible autoconf macros for portability and code
consistency;
 - provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support);
 - makes uses of shell functions to keep generated configure smaller by
sharing reusable stuff;
 - uses an automake conditional to avoid compiling the file is support is
not enabled

It includes a typo fixed by Amadeusz S\e-B³awiñski.\e-A

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
configure.ac
m4/wm_imgfmt_check.m4
wrlib/Makefile.am
wrlib/png.c