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
  discards  249447363a5158589a0dca3949328f248f17dd19 (commit)
  discards  24c900a8326df46dbf024d89b30bdb6e711b53f0 (commit)
  discards  ad98a1a338f5e64c8d978b8958f1fe2556f6e0da (commit)
  discards  add823ef6a9efdd6e4192d21a69c7bda6c6c5e69 (commit)
  discards  77c34804f9742a898728f8a389f209b5c5747e8c (commit)
  discards  c53fc32dcd1084f17cfbe30822799a0adc3a87d5 (commit)
  discards  00a7d07e8c8a62510a8bc7b016eab2d204f2a6c0 (commit)
  discards  04894e94c8b2055e2f43c2d41acf5863bbd544d6 (commit)
  discards  f59b263993983a4e89dc7e51e7fa37c858304937 (commit)
  discards  45a976b5d47e7968dfee8768c1bf4373015b8593 (commit)
       via  98d753801d90b4f8293e197d8cb951eb46ac83cb (commit)
       via  ea6dd2748de0f8fcdaad7deaa97c21b3740c88af (commit)
       via  c516f2bc4363a6d7e9e1e1e1dfef5fe55edcb469 (commit)
       via  f7479659b157281938c5e71479849b20837a9737 (commit)
       via  102e62d8ab341ee72c652deb794a6654c093f5a7 (commit)
       via  3f26e2de3400acad55631ca8b612320be6b7c913 (commit)
       via  ea63dd30181932aaf89741bd2c60b995672dbde8 (commit)
       via  f07b5e4f143d8cd57b60780b1672e5e57b4ed665 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (249447363a5158589a0dca3949328f248f17dd19)
                         N -- N -- N (98d753801d90b4f8293e197d8cb951eb46ac83cb)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

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/98d753801d90b4f8293e197d8cb951eb46ac83cb

commit 98d753801d90b4f8293e197d8cb951eb46ac83cb
Author: Christophe CURIS <[email protected]>
Date:   Mon Nov 4 20:52:31 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 7c65c30..605bc8f 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 2d53e43..2ab9a17 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_LIBS="$LIBS"
+         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
+         LIBS="$wm_save_LIBS"
+         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/ea6dd2748de0f8fcdaad7deaa97c21b3740c88af

commit ea6dd2748de0f8fcdaad7deaa97c21b3740c88af
Author: Christophe CURIS <[email protected]>
Date:   Mon Nov 4 20:52:30 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
    
    It includes a typo fixed by Amadeusz S-B³awiñski.-A
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/configure.ac b/configure.ac
index 63d1729..7c65c30 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(["$enableval"],
+        [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 3231f7b..2d53e43 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_LIBS="$LIBS"
+         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
+         LIBS="$wm_save_LIBS"
+         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/c516f2bc4363a6d7e9e1e1e1dfef5fe55edcb469

commit c516f2bc4363a6d7e9e1e1e1dfef5fe55edcb469
Author: Christophe CURIS <[email protected]>
Date:   Mon Nov 4 20:52:29 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 e5f403d..3231f7b 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_LIBS="$LIBS"
+         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"])
+         LIBS="$wm_save_LIBS"
+         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 */

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

commit f7479659b157281938c5e71479849b20837a9737
Author: Christophe CURIS <[email protected]>
Date:   Sun Nov 3 14:38:03 2013 +0100

    WPrefs: Marked args as unused for compiler in callback code
    
    The function is a callback, which means having a fixed argument list.
    
    It is then correct to not use all the arguments, so this patch adds the
    appropriate stuff to avoid a false report from compiler.
    
    Signed-off-by: Christophe CURIS <[email protected]>
    Signed-off-by: Carlos R. Mafra <[email protected]>

diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c
index 2b7f4fb..59d407e 100644
--- a/WPrefs.app/Menu.c
+++ b/WPrefs.app/Menu.c
@@ -1274,6 +1274,9 @@ static void menuItemEdited(struct WEditMenuDelegate 
*delegate, WEditMenu * menu,
        _Panel *panel = (_Panel *) delegate->data;
        WEditMenu *submenu;
 
+       /* Parameter not used, but tell the compiler it is ok */
+       (void) menu;
+
        updateFrameTitle(panel, WGetEditMenuItemTitle(item), 
panel->currentType);
 
        submenu = WGetEditMenuSubmenu(item);

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

commit 102e62d8ab341ee72c652deb794a6654c093f5a7
Author: Christophe CURIS <[email protected]>
Date:   Sun Nov 3 14:38:02 2013 +0100

    WPrefs: Removed unused argument in function 'WGetEditMenuSubmenu'
    
    The function did not use the argument 'mPtr', so removed it.
    
    Signed-off-by: Christophe CURIS <[email protected]>
    Signed-off-by: Carlos R. Mafra <[email protected]>

diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c
index 7d1961c..2b7f4fb 100644
--- a/WPrefs.app/Menu.c
+++ b/WPrefs.app/Menu.c
@@ -1276,7 +1276,7 @@ static void menuItemEdited(struct WEditMenuDelegate 
*delegate, WEditMenu * menu,
 
        updateFrameTitle(panel, WGetEditMenuItemTitle(item), 
panel->currentType);
 
-       submenu = WGetEditMenuSubmenu(menu, item);
+       submenu = WGetEditMenuSubmenu(item);
        if (submenu) {
                WSetEditMenuTitle(submenu, WGetEditMenuItemTitle(item));
        }
@@ -1289,7 +1289,7 @@ static Bool shouldRemoveItem(struct WEditMenuDelegate 
*delegate, WEditMenu * men
        if (panel->dontAsk)
                return True;
 
-       if (WGetEditMenuSubmenu(menu, item)) {
+       if (WGetEditMenuSubmenu(item)) {
                int res;
 
                res = WMRunAlertPanel(WMWidgetScreen(menu), NULL,
@@ -1683,7 +1683,7 @@ static WMPropList *processSubmenu(WEditMenu * menu)
 
                s = WGetEditMenuItemTitle(item);
 
-               submenu = WGetEditMenuSubmenu(menu, item);
+               submenu = WGetEditMenuSubmenu(item);
                if (submenu) {
                        pl = processSubmenu(submenu);
                } else {
diff --git a/WPrefs.app/editmenu.c b/WPrefs.app/editmenu.c
index 69cb38f..c3cf296 100644
--- a/WPrefs.app/editmenu.c
+++ b/WPrefs.app/editmenu.c
@@ -507,7 +507,7 @@ void WSetEditMenuSubmenu(WEditMenu * mPtr, WEditMenuItem * 
item, WEditMenu * sub
        paintEditMenuItem(item);
 }
 
-WEditMenu *WGetEditMenuSubmenu(WEditMenu * mPtr, WEditMenuItem * item)
+WEditMenu *WGetEditMenuSubmenu(WEditMenuItem *item)
 {
        return item->submenu;
 }
@@ -622,7 +622,7 @@ void WEditMenuHide(WEditMenu * mPtr)
        while ((item = WGetEditMenuItem(mPtr, i++))) {
                WEditMenu *submenu;
 
-               submenu = WGetEditMenuSubmenu(mPtr, item);
+               submenu = WGetEditMenuSubmenu(item);
                if (submenu) {
                        WEditMenuHide(submenu);
                }
@@ -640,7 +640,7 @@ void WEditMenuUnhide(WEditMenu * mPtr)
        while ((item = WGetEditMenuItem(mPtr, i++))) {
                WEditMenu *submenu;
 
-               submenu = WGetEditMenuSubmenu(mPtr, item);
+               submenu = WGetEditMenuSubmenu(item);
                if (submenu) {
                        WEditMenuUnhide(submenu);
                }
diff --git a/WPrefs.app/editmenu.h b/WPrefs.app/editmenu.h
index 3fde0b5..1195fe0 100644
--- a/WPrefs.app/editmenu.h
+++ b/WPrefs.app/editmenu.h
@@ -81,7 +81,7 @@ void WSetEditMenuSubmenu(WEditMenu *mPtr, WEditMenuItem *item,
                          WEditMenu *submenu);
 
 
-WEditMenu *WGetEditMenuSubmenu(WEditMenu *mPtr, WEditMenuItem *item);
+WEditMenu *WGetEditMenuSubmenu(WEditMenuItem *item);
 
 void WRemoveEditMenuItem(WEditMenu *mPtr, WEditMenuItem *item);
 

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

commit 3f26e2de3400acad55631ca8b612320be6b7c913
Author: Christophe CURIS <[email protected]>
Date:   Sun Nov 3 13:08:11 2013 +0100

    wrlib: Add support for v5 of the gif_lib API
    
    As reported by Nicolas (nhs), compilation of wrlib is broken when
    switching to gif_lib v5.
    
    The API of gif_lib has known little change to provide thread-safe usage,
    so we now detect this in configure and and use the functions as appropriate
    in gif.c
    
    Signed-off-by: Christophe CURIS <[email protected]>
    Signed-off-by: Carlos R. Mafra <[email protected]>

diff --git a/m4/wm_imgfmt_check.m4 b/m4/wm_imgfmt_check.m4
index 1cbb212..e5f403d 100644
--- a/m4/wm_imgfmt_check.m4
+++ b/m4/wm_imgfmt_check.m4
@@ -19,7 +19,7 @@
 # WM_IMGFMT_CHECK_GIF
 # -------------------
 #
-# Check for GIF file support through 'libgif' or 'libungif'
+# Check for GIF file support through 'libgif', 'libungif' or 'giflib v5'
 # The check depends on variable 'enable_gif' being either:
 #   yes  - detect, fail if not found
 #   no   - do not detect, disable support
@@ -53,7 +53,17 @@ AS_IF([test "x$enable_gif" = "xno"],
               [AC_MSG_ERROR([found $wm_cv_imgfmt_gif but could not find 
appropriate header - are you missing libgif-dev package?])])
             AS_IF([wm_fn_imgfmt_try_compile "gif_lib.h" 
"DGifOpenFileName(filename)" ""],
               [wm_cv_imgfmt_gif="$wm_cv_imgfmt_gif version:4"],
-              [AC_MSG_ERROR([found $wm_cv_imgfmt_gif and header, but cannot 
compile - unsupported version?])])
+              [AC_COMPILE_IFELSE(
+                [AC_LANG_PROGRAM(
+                  [@%:@include <gif_lib.h>
+
+const char *filename = "dummy";],
+                  [  int error_code;
+  DGifOpenFileName(filename, &error_code);] )],
+                [wm_cv_imgfmt_gif="$wm_cv_imgfmt_gif version:5"],
+                [AC_MSG_ERROR([found $wm_cv_imgfmt_gif and header, but cannot 
compile - unsupported version?])])dnl
+              ]
+            )
             CFLAGS="$wm_save_CFLAGS"])
          ])
     AS_IF([test "x$wm_cv_imgfmt_gif" = "xno"],
@@ -62,7 +72,7 @@ AS_IF([test "x$enable_gif" = "xno"],
         [supported_gfx="$supported_gfx GIF"
          GFXLIBS="$GFXLIBS `echo "$wm_cv_imgfmt_gif" | sed -e 's, 
*version:.*,,' `"
          AC_DEFINE_UNQUOTED([USE_GIF],
-           [1],
+           [`echo "$wm_cv_imgfmt_gif" | sed -e 's,.*version:,,' `],
            [defined when valid GIF library with header was found])])
     ])
     AM_CONDITIONAL([USE_GIF], [test "x$enable_gif" != "xno"])dnl
diff --git a/wrlib/gif.c b/wrlib/gif.c
index e1b1a73..acbf7da 100644
--- a/wrlib/gif.c
+++ b/wrlib/gif.c
@@ -48,6 +48,7 @@ RImage *RLoadGIF(const char *file, int index)
        GifRecordType recType;
        ColorMapObject *colormap;
        unsigned char rmap[256], gmap[256], bmap[256];
+       int gif_error;
 
        if (index < 0)
                index = 0;
@@ -55,10 +56,17 @@ RImage *RLoadGIF(const char *file, int index)
        /* default error message */
        RErrorCode = RERR_BADINDEX;
 
+#if USE_GIF == 4
        gif = DGifOpenFileName(file);
+#else /* USE_GIF == 5 */
+       gif = DGifOpenFileName(file, &gif_error);
+#endif
 
        if (!gif) {
-               switch (GifLastError()) {
+#if USE_GIF == 4
+               gif_error = GifLastError();
+#endif
+               switch (gif_error) {
                case D_GIF_ERR_OPEN_FAILED:
                        RErrorCode = RERR_OPEN;
                        break;
@@ -182,6 +190,7 @@ RImage *RLoadGIF(const char *file, int index)
        /* yuck! */
        goto did_not_get_any_errors;
  giferr:
+#if USE_GIF == 4
        switch (GifLastError()) {
        case D_GIF_ERR_OPEN_FAILED:
                RErrorCode = RERR_OPEN;
@@ -193,6 +202,10 @@ RImage *RLoadGIF(const char *file, int index)
                RErrorCode = RERR_BADIMAGEFILE;
                break;
        }
+#else
+       /* With gif_lib v5 there's no way to know what went wrong */
+       RErrorCode = RERR_BADIMAGEFILE;
+#endif
  bye:
        if (image)
                RReleaseImage(image);

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

commit ea63dd30181932aaf89741bd2c60b995672dbde8
Author: Christophe CURIS <[email protected]>
Date:   Sun Nov 3 13:08:10 2013 +0100

    wrlib: Use a Conditional for GIF in the makefile instead of #if in source
    
    The use of the conditionals provided by autotools provides a better result
    as they avoid unnecessary compilation.
    
    Signed-off-by: Christophe CURIS <[email protected]>
    Signed-off-by: Carlos R. Mafra <[email protected]>

diff --git a/m4/wm_imgfmt_check.m4 b/m4/wm_imgfmt_check.m4
index 8f7a3a8..1cbb212 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 c98a60f..dc379a1 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 ebd8729..e1b1a73 100644
--- a/wrlib/gif.c
+++ b/wrlib/gif.c
@@ -22,8 +22,6 @@
 
 #include <config.h>
 
-#ifdef USE_GIF
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -209,5 +207,3 @@ RImage *RLoadGIF(const char *file, int index)
 
        return image;
 }
-
-#endif                         /* USE_GIF */

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

commit f07b5e4f143d8cd57b60780b1672e5e57b4ed665
Author: Christophe CURIS <[email protected]>
Date:   Mon Nov 4 20:52:28 2013 +0100

    configure: Moved detection of GIF 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;
     - introduces a tracking of unsupported things to be reported to user
    
    It includes a fixes from a problem found by Amadeusz S-B³awiñski, 
because-A
    the function 'wm_fn_imgfmt_try_link' modified the variable LDFLAGS
    instead of LIBS.
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/configure.ac b/configure.ac
index eb944a6..4ebce21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -120,6 +120,12 @@ AS_IF([test "x$debug" = "xyes"],
      AX_CFLAGS_GCC_OPTION([-Wno-deprecated-declarations])
 ])
 
+
+dnl Tracking on what is detected for final status
+dnl =============================================
+unsupported=""
+
+
 dnl Platform-specific Makefile setup
 dnl ================================
 AS_CASE(["$host"],
@@ -709,36 +715,13 @@ fi
 
 dnl GIF Support
 dnl ============
-gif=yes
-AC_ARG_ENABLE(gif, AS_HELP_STRING([--disable-gif], [disable GIF support 
through libgif or libungif]),
-       gif=$enableval, gif=yes, gif=no)
-
-if test "$gif" = yes; then
-    my_libname=""
-    WM_CHECK_LIB(ungif, DGifOpenFileName, [$XLFLAGS $XLIBS])
-    if test "x$ac_cv_lib_ungif_DGifOpenFileName" = xyes; then
-        my_libname=-lungif
-    fi
-dnl
-dnl libungif is the same thing as libgif for all practical purposes.
-dnl
-    if test "x$my_libname" = x; then
-        WM_CHECK_LIB(gif, DGifOpenFileName, [$XLFLAGS $XLIBS])
-        if test "x$ac_cv_lib_gif_DGifOpenFileName" = xyes; then
-            my_libname=-lgif
-        fi
-    fi
-
-    if test "$my_libname" != x; then
-       WM_CHECK_HEADER(gif_lib.h)
-       if test "x$ac_cv_header_gif_lib_h" = xyes; then
-           GFXLIBS="$GFXLIBS $my_libname"
-           supported_gfx="$supported_gfx GIF"
-            AC_DEFINE(USE_GIF, 1, [define if GIF libraries are available (set 
by configure)])
-       fi
-    fi
-fi
-
+AC_ARG_ENABLE(gif,
+    [AS_HELP_STRING([--disable-gif], [disable GIF support through libgif or 
libungif])],
+    [AS_CASE(["$enableval"],
+        [yes|no], [],
+        [AC_MSG_ERROR([bad value $enableval for --enable-gif])] )],
+    [enable_gif=auto])
+WM_IMGFMT_CHECK_GIF
 
 
 dnl TIFF Support
@@ -924,6 +907,7 @@ echo "Installation path for binaries      : $_bindir"
 echo "Installation path for libraries     : $libdir"
 echo "Installation path for WPrefs.app    : $wprefs_base_dir" | sed -e 
's|${prefix}|'"$prefix|"
 echo "Supported graphic format libraries  : $supported_gfx"
+echo "Unsupported features                :$unsupported"
 echo "Antialiased text support in WINGs   : $xft"
 echo "Xinerama extension support          : $xinerama"
 echo "XRandR extension support            : $xrandr"
diff --git a/m4/wm_imgfmt_check.m4 b/m4/wm_imgfmt_check.m4
new file mode 100644
index 0000000..8f7a3a8
--- /dev/null
+++ b/m4/wm_imgfmt_check.m4
@@ -0,0 +1,110 @@
+# wm_imgfmt_check.m4 - Macros to check for image file format support libraries
+#
+# Copyright (c) 2013 Christophe CURIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+# WM_IMGFMT_CHECK_GIF
+# -------------------
+#
+# Check for GIF file support through 'libgif' or 'libungif'
+# The check depends on variable 'enable_gif' 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_GIF],
+[AC_REQUIRE([_WM_IMGFMT_CHECK_FUNCTS])
+AS_IF([test "x$enable_gif" = "xno"],
+    [unsupported="$unsupported GIF"],
+    [AC_CACHE_CHECK([for GIF support library], [wm_cv_imgfmt_gif],
+        [wm_cv_imgfmt_gif=no
+         wm_save_LIBS="$LIBS"
+         dnl
+         dnl We check first if one of the known libraries is available
+         for wm_arg in "-lgif" "-lungif" ; do
+           AS_IF([wm_fn_imgfmt_try_link "DGifOpenFileName" "$XLFLAGS $XLIBS 
$wm_arg"],
+             [wm_cv_imgfmt_gif="$wm_arg" ; break])
+         done
+         LIBS="$wm_save_LIBS"
+         AS_IF([test "x$enable_gif$wm_cv_imgfmt_gif" = "xyesno"],
+           [AC_MSG_ERROR([explicit GIF support requested but no library 
found])])
+         AS_IF([test "x$wm_cv_imgfmt_gif" != "xno"],
+           [dnl
+            dnl A library was found, now check for the appropriate header
+            wm_save_CFLAGS="$CFLAGS"
+            AS_IF([wm_fn_imgfmt_try_compile "gif_lib.h" "return 0" ""],
+              [],
+              [AC_MSG_ERROR([found $wm_cv_imgfmt_gif but could not find 
appropriate header - are you missing libgif-dev package?])])
+            AS_IF([wm_fn_imgfmt_try_compile "gif_lib.h" 
"DGifOpenFileName(filename)" ""],
+              [wm_cv_imgfmt_gif="$wm_cv_imgfmt_gif version:4"],
+              [AC_MSG_ERROR([found $wm_cv_imgfmt_gif and header, but cannot 
compile - unsupported version?])])
+            CFLAGS="$wm_save_CFLAGS"])
+         ])
+    AS_IF([test "x$wm_cv_imgfmt_gif" = "xno"],
+        [unsupported="$unsupported GIF"
+         enable_gif="no"],
+        [supported_gfx="$supported_gfx GIF"
+         GFXLIBS="$GFXLIBS `echo "$wm_cv_imgfmt_gif" | sed -e 's, 
*version:.*,,' `"
+         AC_DEFINE_UNQUOTED([USE_GIF],
+           [1],
+           [defined when valid GIF library with header was found])])
+    ])dnl
+]) dnl AC_DEFUN
+
+
+# _WM_IMGFMT_CHECK_FUNCTS
+# -----------------------
+# (internal shell functions)
+#
+# Create 2 shell functions:
+#  wm_fn_imgfmt_try_link: try to link against library
+#  wm_fn_imgfmt_try_compile: try to compile against header
+#
+AC_DEFUN_ONCE([_WM_IMGFMT_CHECK_FUNCTS],
+[@%:@ wm_fn_imgfmt_try_link FUNCTION LFLAGS
+@%:@ -------------------------------------
+@%:@ Try linking aginst library in $LFLAGS using function named $FUNCTION
+@%:@ Assumes that LIBS have been saved in 'wm_save_LIBS' by caller
+wm_fn_imgfmt_try_link ()
+{
+  LIBS="$wm_save_LIBS $[]2"
+  AC_TRY_LINK_FUNC([$[]1],
+    [wm_retval=0],
+    [wm_retval=1])
+  AS_SET_STATUS([$wm_retval])
+}
+
+@%:@ wm_fn_imgfmt_try_compile HEADER FUNC_CALL CFLAGS
+@%:@ -----------------------------------------
+@%:@ Try to compile using header $HEADER and trying to call a function
+@%:@ using the $FUNC_CALL expression and using extra $CFLAGS in the
+@%:@ compiler's command line
+@%:@ Assumes that CFLAGS have been saved in 'wm_save_CFLAGS' by caller
+wm_fn_imgfmt_try_compile ()
+{
+  CFLAGS="$wm_save_CFLAGS $[]3"
+  AC_COMPILE_IFELSE(
+    [AC_LANG_PROGRAM([@%:@include <$[]1>
+
+const char *filename = "dummy";], [  $[]2;])],
+    [wm_retval=0],
+    [wm_retval=1])
+  AS_SET_STATUS([$wm_retval])
+}
+])

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

Summary of changes:
 m4/wm_imgfmt_check.m4 |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 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