This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.

The branch, next has been updated
       via  ad98a1a338f5e64c8d978b8958f1fe2556f6e0da (commit)
       via  add823ef6a9efdd6e4192d21a69c7bda6c6c5e69 (commit)
       via  77c34804f9742a898728f8a389f209b5c5747e8c (commit)
      from  c53fc32dcd1084f17cfbe30822799a0adc3a87d5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/ad98a1a338f5e64c8d978b8958f1fe2556f6e0da

commit ad98a1a338f5e64c8d978b8958f1fe2556f6e0da
Author: Christophe CURIS <[email protected]>
Date:   Sun Nov 3 19:27:59 2013 +0100

    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 <[email protected]>

diff --git a/configure.ac b/configure.ac
index 7950f08..270bf3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -690,55 +690,20 @@ WM_IMGFMT_CHECK_GIF
 
 dnl TIFF Support
 dnl ============
-AC_ARG_ENABLE(tiff, 
-AS_HELP_STRING([--disable-tiff], [disable use of TIFF images through libtiff]),
-       tif=$enableval, tif=yes, tif=no)
-
-#
-# TIFF can optionally have JPEG and/or zlib support. Must find out
-# when they are supported so that correct library flags are passed during
-# detection and linkage
-#
-#
-# By default use xpm icons if tiff is not found.
-ICONEXT="xpm"
-#
-
-if test "$tif" = yes; then
-    my_libname=""
-    WM_CHECK_LIB(tiff, TIFFGetVersion, [-lm])
-    if test "x$ac_cv_lib_tiff_TIFFGetVersion" = xyes; then
-       my_libname="-ltiff"
-    fi
-dnl
-dnl Retry with zlib
-dnl
-    unset ac_cv_lib_tiff_TIFFGetVersion
-    if test "x$my_libname" = x; then
-       WM_CHECK_LIB(tiff, TIFFGetVersion, [$ljpeg -lz -lm])
-       if test "x$ac_cv_lib_tiff_TIFFGetVersion" = xyes; then
-           my_libname="-ltiff -lz"
-       fi
-    fi
+AC_ARG_ENABLE([tiff],
+    [AS_HELP_STRING([--disable-tiff], [disable use of TIFF images through 
libtiff])],
+    [AS_CASE(["$enableval"],
+        [yes|no], [],
+        [AC_MSG_ERROR([bad value $enableval for --enable-tiff])] )],
+    [enable_tiff=auto])
+WM_IMGFMT_CHECK_TIFF
 
-    if test "x$my_libname" = x; then
-       WM_CHECK_LIB(tiff34, TIFFGetVersion, [$ljpeg -lm])
-       if test "x$ac_cv_lib_tiff34_TIFFGetVersion" = xyes; then
-           my_libname="-ltiff34"
-       fi
-    fi
 
+# Choice of the default format for icons
+AS_IF([test "x$enable_tiff" != "xno"],
+    [ICONEXT="tiff"],
+    [ICONEXT="xpm"])
 
-    if test "x$my_libname" != x; then
-       WM_CHECK_HEADER(tiffio.h)
-       if test "x$ac_cv_header_tiffio_h" = xyes; then
-           GFXLIBS="$my_libname $GFXLIBS"
-           ICONEXT="tiff"
-            supported_gfx="$supported_gfx TIFF"
-            AC_DEFINE(USE_TIFF, 1, [define if TIFF libraries are available 
(set by configure)])            
-       fi
-    fi
-fi
 
 LIBRARY_SEARCH_PATH="$lib_search_path"
 HEADER_SEARCH_PATH="$inc_search_path"
diff --git a/m4/wm_imgfmt_check.m4 b/m4/wm_imgfmt_check.m4
index 987325d..9368266 100644
--- a/m4/wm_imgfmt_check.m4
+++ b/m4/wm_imgfmt_check.m4
@@ -188,6 +188,66 @@ AM_CONDITIONAL([USE_PNG], [test "x$enable_png" != 
"xno"])dnl
 ]) dnl AC_DEFUN
 
 
+# WM_IMGFMT_CHECK_TIFF
+# --------------------
+#
+# Check for TIFF file support through 'libtiff'
+# The check depends on variable 'enable_tiff' being either:
+#   yes  - detect, fail if not found
+#   no   - do not detect, disable support
+#   auto - detect, disable if not found
+#
+# When found, append appropriate stuff in GFXLIBS, and append info to
+# the variable 'supported_gfx'
+# When not found, append info to variable 'unsupported'
+AC_DEFUN_ONCE([WM_IMGFMT_CHECK_TIFF],
+[AC_REQUIRE([_WM_IMGFMT_CHECK_FUNCTS])
+AS_IF([test "x$enable_tiff" = "xno"],
+    [unsupported="$unsupported TIFF"],
+    [AC_CACHE_CHECK([for TIFF support library], [wm_cv_imgfmt_tiff],
+        [wm_cv_imgfmt_tiff=no
+         dnl
+         dnl We check first if one of the known libraries is available
+         wm_save_LDFLAGS="$LDFLAGS"
+         for wm_arg in "-ltiff"  +             dnl TIFF can have a dependancy 
over zlib
+             "-ltiff -lz" "-ltiff -lz -lm"  +             dnl It may also have 
a dependancy to jpeg_lib
+             "-ltiff -ljpeg" "-ltiff -ljpeg -lz" "-ltiff -ljpeg -lz -lm"  +    
         dnl There is also a possible dependancy on JBIGKit
+             "-ltiff -ljpeg -ljbig -lz"  +             dnl Probably for 
historical reasons?
+             "-ltiff34" "-ltiff34 -ljpeg" "-ltiff34 -ljpeg -lm" ; do
+           AS_IF([wm_fn_imgfmt_try_link "TIFFGetVersion" "$XLFLAGS $XLIBS 
$wm_arg"],
+             [wm_cv_imgfmt_tiff="$wm_arg" ; break])
+         done
+         LDFLAGS="$wm_save_LDFLAGS"
+         AS_IF([test "x$enable_tiff$wm_cv_imgfmt_tiff" = "xyesno"],
+           [AC_MSG_ERROR([explicit TIFF support requested but no library 
found])])
+         AS_IF([test "x$wm_cv_imgfmt_tiff" != "xno"],
+           [dnl
+            dnl A library was found, now check for the appropriate header
+            wm_save_CFLAGS="$CFLAGS"
+            AS_IF([wm_fn_imgfmt_try_compile "tiffio.h" "return 0" ""],
+              [],
+              [AC_MSG_ERROR([found $wm_cv_imgfmt_tiff but could not find 
appropriate header - are you missing libtiff-dev package?])])
+            AS_IF([wm_fn_imgfmt_try_compile "tiffio.h" 'TIFFOpen(filename, 
"r")' ""],
+              [],
+              [AC_MSG_ERROR([found $wm_cv_imgfmt_tiff and header, but cannot 
compile - unsupported version?])])
+            CFLAGS="$wm_save_CFLAGS"])
+         ])
+    AS_IF([test "x$wm_cv_imgfmt_tiff" = "xno"],
+        [unsupported="$unsupported TIFF"
+         enable_tiff="no"],
+        [supported_gfx="$supported_gfx TIFF"
+         GFXLIBS="$GFXLIBS $wm_cv_imgfmt_tiff"
+         AC_DEFINE([USE_TIFF], [1],
+           [defined when valid TIFF library with header was found])])
+    ])
+AM_CONDITIONAL([USE_TIFF], [test "x$enable_tiff" != "xno"])dnl
+]) dnl AC_DEFUN
+
+
 # _WM_IMGFMT_CHECK_FUNCTS
 # -----------------------
 # (internal shell functions)
diff --git a/wrlib/Makefile.am b/wrlib/Makefile.am
index a4ede86..5f4946a 100644
--- a/wrlib/Makefile.am
+++ b/wrlib/Makefile.am
@@ -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//`
 
diff --git a/wrlib/tiff.c b/wrlib/tiff.c
index a54596d..9bf033b 100644
--- a/wrlib/tiff.c
+++ b/wrlib/tiff.c
@@ -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 */

http://repo.or.cz/w/wmaker-crm.git/commit/add823ef6a9efdd6e4192d21a69c7bda6c6c5e69

commit add823ef6a9efdd6e4192d21a69c7bda6c6c5e69
Author: Christophe CURIS <[email protected]>
Date:   Sun Nov 3 19:27:58 2013 +0100

    wrlib: Moved configure's detection of PNG 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 <[email protected]>

diff --git a/configure.ac b/configure.ac
index 63d1729..7950f08 100644
--- a/configure.ac
+++ b/configure.ac
@@ -657,36 +657,13 @@ dnl ===============================================
 
 dnl PNG Support
 dnl ===========
-png=yes
-AC_ARG_ENABLE(png, AS_HELP_STRING([--disable-png], [disable PNG support 
through libpng]),
-       png=$enableval, png=yes, png=no)
-
-if test "$png" = yes ; then
-    my_libname=""
-    WM_CHECK_LIB(png, png_get_valid, [-lm])
-    if test "x$ac_cv_lib_png_png_get_valid" = xyes; then
-       my_libname="-lpng"
-    fi
-dnl
-dnl Retry with zlib
-dnl
-    if test "x$my_libname" = x; then
-        unset ac_cv_lib_png_png_get_valid
-        WM_CHECK_LIB(png, png_get_valid, [-lz -lm])
-       if test "x$ac_cv_lib_png_png_get_valid" = xyes; then
-           my_libname="-lpng -lz"
-       fi
-    fi
-
-    if test "x$ac_cv_lib_png_png_get_valid" = xyes; then
-       WM_CHECK_HEADER(png.h)
-       if test "x$ac_cv_header_png_h" = xyes; then
-           GFXLIBS="$GFXLIBS $my_libname"
-           supported_gfx="$supported_gfx PNG"
-            AC_DEFINE(USE_PNG, 1, [define if PNG libraries are available (set 
by configure)])
-       fi
-    fi
-fi
+AC_ARG_ENABLE([png],
+    [AS_HELP_STRING([--disable-png], [disable PNG support through libpng])],
+    [AS_CASE(["$enablebal"],
+        [yes|no], [],
+        [AC_MSG_ERROR([bad value $enableval for --enable-png])] )],
+    [enable_png=auto])
+WM_IMGFMT_CHECK_PNG
 
 
 dnl JPEG Support
diff --git a/m4/wm_imgfmt_check.m4 b/m4/wm_imgfmt_check.m4
index e7d143f..987325d 100644
--- a/m4/wm_imgfmt_check.m4
+++ b/m4/wm_imgfmt_check.m4
@@ -136,6 +136,58 @@ AM_CONDITIONAL([USE_JPEG], [test "x$enable_jpeg" != 
"xno"])dnl
 ]) dnl AC_DEFUN
 
 
+# WM_IMGFMT_CHECK_PNG
+# -------------------
+#
+# Check for PNG file support through 'libpng'
+# The check depends on variable 'enable_png' being either:
+#   yes  - detect, fail if not found
+#   no   - do not detect, disable support
+#   auto - detect, disable if not found
+#
+# When found, append appropriate stuff in GFXLIBS, and append info to
+# the variable 'supported_gfx'
+# When not found, append info to variable 'unsupported'
+AC_DEFUN_ONCE([WM_IMGFMT_CHECK_PNG],
+[AC_REQUIRE([_WM_IMGFMT_CHECK_FUNCTS])
+AS_IF([test "x$enable_png" = "xno"],
+    [unsupported="$unsupported PNG"],
+    [AC_CACHE_CHECK([for PNG support library], [wm_cv_imgfmt_png],
+        [wm_cv_imgfmt_png=no
+         dnl
+         dnl We check first if one of the known libraries is available
+         wm_save_LDFLAGS="$LDFLAGS"
+         for wm_arg in "-lpng" "-lpng -lz" "-lpng -lz -lm" ; do
+           AS_IF([wm_fn_imgfmt_try_link "png_get_valid" "$XLFLAGS $XLIBS 
$wm_arg"],
+             [wm_cv_imgfmt_png="$wm_arg" ; break])
+         done
+         LDFLAGS="$wm_save_LDFLAGS"
+         AS_IF([test "x$enable_png$wm_cv_imgfmt_png" = "xyesno"],
+           [AC_MSG_ERROR([explicit PNG support requested but no library 
found])])
+         AS_IF([test "x$wm_cv_imgfmt_png" != "xno"],
+           [dnl
+            dnl A library was found, now check for the appropriate header
+            wm_save_CFLAGS="$CFLAGS"
+            AS_IF([wm_fn_imgfmt_try_compile "png.h" "return 0" ""],
+              [],
+              [AC_MSG_ERROR([found $wm_cv_imgfmt_png but could not find 
appropriate header - are you missing libpng-dev package?])])
+            AS_IF([wm_fn_imgfmt_try_compile "png.h" "png_get_valid(NULL, NULL, 
PNG_INFO_tRNS)" ""],
+              [],
+              [AC_MSG_ERROR([found $wm_cv_imgfmt_png and header, but cannot 
compile - unsupported version?])])
+            CFLAGS="$wm_save_CFLAGS"])
+         ])
+    AS_IF([test "x$wm_cv_imgfmt_png" = "xno"],
+        [unsupported="$unsupported PNG"
+         enable_png="no"],
+        [supported_gfx="$supported_gfx PNG"
+         GFXLIBS="$GFXLIBS $wm_cv_imgfmt_png"
+         AC_DEFINE([USE_PNG], [1],
+           [defined when valid PNG library with header was found])])
+    ])
+AM_CONDITIONAL([USE_PNG], [test "x$enable_png" != "xno"])dnl
+]) dnl AC_DEFUN
+
+
 # _WM_IMGFMT_CHECK_FUNCTS
 # -----------------------
 # (internal shell functions)
diff --git a/wrlib/Makefile.am b/wrlib/Makefile.am
index e5991d5..a4ede86 100644
--- a/wrlib/Makefile.am
+++ b/wrlib/Makefile.am
@@ -38,7 +38,6 @@ libwraster_la_SOURCES =               xpm.c                   
xutil.c                 ppm.c           -       png.c                   tiff.c
 
 if USE_GIF
@@ -49,6 +48,10 @@ if USE_JPEG
 libwraster_la_SOURCES += jpeg.c
 endif
 
+if USE_PNG
+libwraster_la_SOURCES += png.c
+endif
+
 LTCOMPILE2=`echo $(LTCOMPILE) | sed -e s/-fomit-frame-pointer//`
 COMPILE2=`echo $(COMPILE) | sed -e s/-fomit-frame-pointer//`
 
diff --git a/wrlib/png.c b/wrlib/png.c
index 03074ea..fa6723d 100644
--- a/wrlib/png.c
+++ b/wrlib/png.c
@@ -22,8 +22,6 @@
 
 #include <config.h>
 
-#ifdef USE_PNG
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -215,5 +213,3 @@ RImage *RLoadPNG(RContext *context, const char *file)
        free(png_rows);
        return image;
 }
-
-#endif                         /* USE_PNG */

http://repo.or.cz/w/wmaker-crm.git/commit/77c34804f9742a898728f8a389f209b5c5747e8c

commit 77c34804f9742a898728f8a389f209b5c5747e8c
Author: Christophe CURIS <[email protected]>
Date:   Sun Nov 3 19:27:57 2013 +0100

    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 <[email protected]>

diff --git a/configure.ac b/configure.ac
index 4ebce21..63d1729 100644
--- a/configure.ac
+++ b/configure.ac
@@ -691,26 +691,13 @@ fi
 
 dnl JPEG Support
 dnl ============
-jpeg=yes
-ljpeg=""
-AC_ARG_ENABLE(jpeg, AS_HELP_STRING([--disable-jpeg], [disable JPEG support 
through libjpeg]),
-       jpeg=$enableval, jpeg=yes, jpeg=no)
-
-if test "$jpeg" = yes; then
-    WM_CHECK_LIB(jpeg, jpeg_destroy_compress)
-
-    if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = xyes; then
-
-       ljpeg="-ljpeg"
-
-       WM_CHECK_HEADER(jpeglib.h)
-       if test "x$ac_cv_header_jpeglib_h" = xyes; then
-           GFXLIBS="$GFXLIBS -ljpeg"
-           supported_gfx="$supported_gfx JPEG"
-            AC_DEFINE(USE_JPEG, 1, [define if JPEG libraries are available 
(set by configure)])
-       fi
-    fi
-fi
+AC_ARG_ENABLE([jpeg],
+    [AS_HELP_STRING([--disable-jpeg], [disable JPEG support through libjpeg])],
+    [AS_CASE(["$enableval"],
+        [yes|no], [],
+        [AC_MSG_ERROR([bad value $enableval for --enable-jpeg])] )],
+    [enable_jpeg=auto])
+WM_IMGFMT_CHECK_JPEG
 
 
 dnl GIF Support
@@ -921,19 +908,19 @@ echo
 
 dnl WM_PRINT_REDCRAP_BUG_STATUS
 
-if test "x$ac_cv_header_jpeglib_h" != xyes; then
-echo "WARNING   WARNING   WARNING   WARNING   WARNING   WARNING   WARNING"
-echo
-echo "JPEG support will not be included because the JPEG library is"
-echo "not installed correctly or was not found. Background images"
-echo "from themes will not display as they usually are JPEG files."
-echo
-echo "To fix, download and install the jpeg library and/or make sure you"
-echo "installed all jpeg related packages, SPECIALLY the development packages"
-echo "like jpeg-devel (if you use some prepackaged version of libjpeg)."
-echo
-echo "WARNING   WARNING   WARNING   WARNING   WARNING   WARNING   WARNING"
-fi
+AS_IF([test "x$enable_jpeg" = xno], [dnl
+    AS_ECHO(["WARNING   WARNING   WARNING   WARNING   WARNING   WARNING   
WARNING"])
+    AS_ECHO([])
+    AS_ECHO(["JPEG support will not be included because the JPEG library is"])
+    AS_ECHO(["not installed correctly or was not found. Background images"])
+    AS_ECHO(["from themes will not display as they usually are JPEG files."])
+    AS_ECHO([])
+    AS_ECHO(["To fix, download and install the jpeg library and/or make sure 
you"])
+    AS_ECHO(["installed all jpeg related packages, SPECIALLY the development 
packages"])
+    AS_ECHO(["like jpeg-dev (if you use some prepackaged version of 
libjpeg)."])
+    AS_ECHO([])
+    AS_ECHO(["WARNING   WARNING   WARNING   WARNING   WARNING   WARNING   
WARNING"])dnl
+])
 
 
 dnl This is for Emacs.  I'm lazy, I know... (nicolai)
diff --git a/m4/wm_imgfmt_check.m4 b/m4/wm_imgfmt_check.m4
index 8092b8a..e7d143f 100644
--- a/m4/wm_imgfmt_check.m4
+++ b/m4/wm_imgfmt_check.m4
@@ -79,6 +79,63 @@ const char *filename = "dummy";],
 ]) dnl AC_DEFUN
 
 
+# WM_IMGFMT_CHECK_JPEG
+# --------------------
+#
+# Check for JPEG file support through 'libjpeg'
+# The check depends on variable 'enable_jpeg' being either:
+#   yes  - detect, fail if not found
+#   no   - do not detect, disable support
+#   auto - detect, disable if not found
+#
+# When found, append appropriate stuff in GFXLIBS, and append info to
+# the variable 'supported_gfx'
+# When not found, append info to variable 'unsupported'
+AC_DEFUN_ONCE([WM_IMGFMT_CHECK_JPEG],
+[AC_REQUIRE([_WM_IMGFMT_CHECK_FUNCTS])
+AS_IF([test "x$enable_jpeg" = "xno"],
+    [unsupported="$unsupported JPEG"],
+    [AC_CACHE_CHECK([for JPEG support library], [wm_cv_imgfmt_jpeg],
+        [wm_cv_imgfmt_jpeg=no
+         wm_save_LDFLAGS="$LDFLAGS"
+         dnl
+         dnl We check first if one of the known libraries is available
+         AS_IF([wm_fn_imgfmt_try_link "jpeg_destroy_compress" "$XLFLAGS $XLIBS 
-ljpeg"],
+             [wm_cv_imgfmt_jpeg="-ljpeg"])
+         LDFLAGS="$wm_save_LDFLAGS"
+         AS_IF([test "x$enable_jpeg$wm_cv_imgfmt_jpeg" = "xyesno"],
+             [AC_MSG_ERROR([explicit JPEG support requested but no library 
found])])
+         AS_IF([test "x$wm_cv_imgfmt_jpeg" != "xno"],
+           [dnl
+            dnl A library was found, now check for the appropriate header
+            AC_COMPILE_IFELSE(
+                [AC_LANG_PROGRAM(
+                    [@%:@include <stdlib.h>
+@%:@include <stdio.h>
+@%:@include <jpeglib.h>],
+                    [  struct jpeg_decompress_struct cinfo;
+
+  jpeg_destroy_decompress(&cinfo);])],
+                [],
+                [AS_ECHO([failed])
+                 AS_ECHO(["$as_me: error: found $wm_cv_imgfmt_jpeg but cannot 
compile header"])
+                 AS_ECHO(["$as_me: error:   - does header 'jpeglib.h' exists? 
(is package 'jpeg-dev' missing?)"])
+                 AS_ECHO(["$as_me: error:   - version of header is not 
supported? (report to dev team)"])
+                 AC_MSG_ERROR([JPEG library is not usable, cannot continue])])
+           ])
+         ])
+    AS_IF([test "x$wm_cv_imgfmt_jpeg" = "xno"],
+        [unsupported="$unsupported JPEG"
+         enable_jpeg="no"],
+        [supported_gfx="$supported_gfx JPEG"
+         GFXLIBS="$GFXLIBS $wm_cv_imgfmt_jpeg"
+         AC_DEFINE([USE_JPEG], [1],
+           [defined when valid JPEG library with header was found])])
+    ])
+AM_CONDITIONAL([USE_JPEG], [test "x$enable_jpeg" != "xno"])dnl
+]) dnl AC_DEFUN
+
+
 # _WM_IMGFMT_CHECK_FUNCTS
 # -----------------------
 # (internal shell functions)
diff --git a/wrlib/Makefile.am b/wrlib/Makefile.am
index dc379a1..e5991d5 100644
--- a/wrlib/Makefile.am
+++ b/wrlib/Makefile.am
@@ -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//`
 
diff --git a/wrlib/jpeg.c b/wrlib/jpeg.c
index 2648c40..815181b 100644
--- a/wrlib/jpeg.c
+++ b/wrlib/jpeg.c
@@ -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 */

-----------------------------------------------------------------------

Summary of changes:
 configure.ac          |  147 +++++++++++-------------------------------
 m4/wm_imgfmt_check.m4 |  169 +++++++++++++++++++++++++++++++++++++++++++++++++
 wrlib/Makefile.am     |   17 ++++-
 wrlib/jpeg.c          |    4 -
 wrlib/png.c           |    4 -
 wrlib/tiff.c          |    4 -
 6 files changed, 220 insertions(+), 125 deletions(-)


repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
-- 
wmaker-crm.git ("The Window Maker window manager")


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

Reply via email to