wrlib: Moved configure's detection of TIFF 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
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>