mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-09 07:14:18 +01:00
wrlib: Moved configure's detection of JPEG 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:
committed by
Carlos R. Mafra
parent
f8d9e4cd53
commit
777bf28ab3
@@ -39,13 +39,16 @@ libwraster_la_SOURCES = \
|
||||
xutil.c \
|
||||
ppm.c \
|
||||
png.c \
|
||||
jpeg.c \
|
||||
tiff.c
|
||||
|
||||
if USE_GIF
|
||||
libwraster_la_SOURCES += gif.c
|
||||
endif
|
||||
|
||||
if USE_JPEG
|
||||
libwraster_la_SOURCES += jpeg.c
|
||||
endif
|
||||
|
||||
LTCOMPILE2=`echo $(LTCOMPILE) | sed -e s/-fomit-frame-pointer//`
|
||||
COMPILE2=`echo $(COMPILE) | sed -e s/-fomit-frame-pointer//`
|
||||
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
/* Avoid a compiler warning */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
#ifdef USE_JPEG
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -190,5 +188,3 @@ RImage *RLoadJPEG(const char *file_name)
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
#endif /* USE_JPEG */
|
||||
|
||||
Reference in New Issue
Block a user