mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-06 05:44:11 +01:00
wrlib: Moved configure's detection of XPM 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
311ab6b08c
commit
b66a890404
@@ -35,7 +35,6 @@ libwraster_la_SOURCES = \
|
||||
rotate.c \
|
||||
convolve.c \
|
||||
nxpm.c \
|
||||
xpm.c \
|
||||
xutil.c \
|
||||
ppm.c
|
||||
|
||||
@@ -55,6 +54,10 @@ if USE_TIFF
|
||||
libwraster_la_SOURCES += tiff.c
|
||||
endif
|
||||
|
||||
if USE_XPM
|
||||
libwraster_la_SOURCES += xpm.c
|
||||
endif
|
||||
|
||||
LTCOMPILE2=`echo $(LTCOMPILE) | sed -e s/-fomit-frame-pointer//`
|
||||
COMPILE2=`echo $(COMPILE) | sed -e s/-fomit-frame-pointer//`
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* xpm.c - load XPM image from file
|
||||
/* xpm.c - load XPM image from file using libXpm
|
||||
*
|
||||
* Raster graphics library
|
||||
*
|
||||
@@ -22,8 +22,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef USE_XPM
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -271,5 +269,3 @@ RImage *RLoadXPM(RContext * context, const char *file)
|
||||
XpmFreeXpmImage(&xpm);
|
||||
return image;
|
||||
}
|
||||
|
||||
#endif /* USE_XPM */
|
||||
|
||||
Reference in New Issue
Block a user