diff --git a/m4/wm_imgfmt_check.m4 b/m4/wm_imgfmt_check.m4 index 8f7a3a83..1cbb212f 100644 --- a/m4/wm_imgfmt_check.m4 +++ b/m4/wm_imgfmt_check.m4 @@ -64,7 +64,8 @@ AS_IF([test "x$enable_gif" = "xno"], AC_DEFINE_UNQUOTED([USE_GIF], [1], [defined when valid GIF library with header was found])]) - ])dnl + ]) + AM_CONDITIONAL([USE_GIF], [test "x$enable_gif" != "xno"])dnl ]) dnl AC_DEFUN diff --git a/wrlib/Makefile.am b/wrlib/Makefile.am index c98a60ff..dc379a12 100644 --- a/wrlib/Makefile.am +++ b/wrlib/Makefile.am @@ -40,9 +40,11 @@ libwraster_la_SOURCES = \ ppm.c \ png.c \ jpeg.c \ - tiff.c \ - gif.c + tiff.c +if USE_GIF +libwraster_la_SOURCES += gif.c +endif LTCOMPILE2=`echo $(LTCOMPILE) | sed -e s/-fomit-frame-pointer//` COMPILE2=`echo $(COMPILE) | sed -e s/-fomit-frame-pointer//` diff --git a/wrlib/gif.c b/wrlib/gif.c index ebd87296..e1b1a732 100644 --- a/wrlib/gif.c +++ b/wrlib/gif.c @@ -22,8 +22,6 @@ #include -#ifdef USE_GIF - #include #include #include @@ -209,5 +207,3 @@ RImage *RLoadGIF(const char *file, int index) return image; } - -#endif /* USE_GIF */