1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-02 14:15:46 +01:00

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>
This commit is contained in:
Christophe CURIS
2013-11-04 20:52:31 +01:00
committed by Carlos R. Mafra
parent 1c21d946ec
commit a5ca34ccb1
4 changed files with 77 additions and 53 deletions

View File

@@ -37,8 +37,7 @@ libwraster_la_SOURCES = \
nxpm.c \
xpm.c \
xutil.c \
ppm.c \
tiff.c
ppm.c
if USE_GIF
libwraster_la_SOURCES += gif.c
@@ -52,6 +51,10 @@ if USE_PNG
libwraster_la_SOURCES += png.c
endif
if USE_TIFF
libwraster_la_SOURCES += tiff.c
endif
LTCOMPILE2=`echo $(LTCOMPILE) | sed -e s/-fomit-frame-pointer//`
COMPILE2=`echo $(COMPILE) | sed -e s/-fomit-frame-pointer//`

View File

@@ -22,8 +22,6 @@
#include <config.h>
#ifdef USE_TIFF
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -141,5 +139,3 @@ RImage *RLoadTIFF(const char *file, int index)
return image;
}
#endif /* USE_TIFF */