From: Christophe CURIS <[email protected]>

Now that the builtin XPM loading is separated from the saving code, the
use of the conditionals provided by autotools provides a better result
as it avoids unnecessary compilation.

Signed-off-by: Christophe CURIS <[email protected]>
---
 wrlib/Makefile.am | 3 ++-
 wrlib/nxpm.c      | 3 ---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/wrlib/Makefile.am b/wrlib/Makefile.am
index e98e028..910c1f7 100644
--- a/wrlib/Makefile.am
+++ b/wrlib/Makefile.am
@@ -34,7 +34,6 @@ libwraster_la_SOURCES =       \
        scale.c         \
        rotate.c        \
        convolve.c      \
-       nxpm.c          \
        save_xpm.c      \
        xutil.c         \
        ppm.c
@@ -57,6 +56,8 @@ endif
 
 if USE_XPM
 libwraster_la_SOURCES += xpm.c
+else
+libwraster_la_SOURCES += nxpm.c
 endif
 
 LTCOMPILE2=`echo $(LTCOMPILE) | sed -e s/-fomit-frame-pointer//`
diff --git a/wrlib/nxpm.c b/wrlib/nxpm.c
index 0d0e5f5..3a14637 100644
--- a/wrlib/nxpm.c
+++ b/wrlib/nxpm.c
@@ -52,7 +52,6 @@
 
 #define LINEWIDTH 64
 
-#ifndef USE_XPM
 
 static void free_color_symbol_table(unsigned char *color_table[],
                                     unsigned short *symbol_table)
@@ -444,5 +443,3 @@ RImage *RLoadXPM(RContext * context, const char *file)
                RReleaseImage(image);
        return NULL;
 }
-
-#endif
-- 
1.8.4.rc3


-- 
To unsubscribe, send mail to [email protected].

Reply via email to