summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis@xfce.org>2009-12-08 23:20:27 +0100
committerJannis Pohlmann <jannis@xfce.org>2009-12-08 23:24:08 +0100
commit14a1df9c282c0a3979bf85c0481c07d48e97cca7 (patch)
tree678aeae9f7e8bed6b8f2e8a043481af6103acb4b /acinclude.m4
parentee8b152274adaa5c2b0e89dba1bc0f70588eb402 (diff)
downloadtumbler-14a1df9c282c0a3979bf85c0481c07d48e97cca7.tar.gz
Add a fast JPEG thumbnailer with EXIF thumbnail support.
This basically is a copy of the JPEG thumbnailer Benedikt Meurer wrote for ThunarVFS. It might be a little rough around the edges but I verified that it works as it did in ThunarVFS. I'm aware of a few bugs related to rotation and stuff though that were reported against ThunarVFS.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m443
1 files changed, 43 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index ecb740a..568b4d7 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -79,6 +79,49 @@ AC_MSG_RESULT([$ac_tumbler_font_thumbnailer])
+dnl TUMBLER_JPEG_THUMBNAILER()
+dnl
+dnl Check whether to build and install the JPEG thumbnailer plugin with
+dnl EXIF support.
+dnl
+AC_DEFUN([TUMBLER_JPEG_THUMBNAILER],
+[
+AC_ARG_ENABLE([jpeg-thumbnailer], [AC_HELP_STRING([--disable-jpeg-thumbnailer], [Don't build the JPEG thumbnailer plugin with EXIF support])],
+ [ac_tumbler_jpeg_thumbnailer=$enableval], [ac_tumbler_jpeg_thumbnailer=yes])
+if test x"$ac_tumbler_jpeg_thumbnailer" = x"yes"; then
+ dnl Check for gdk-pixbuf
+ PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 >= 2.14],
+ [
+ dnl Check for libjpeg
+ LIBJPEG_LIBS=""
+ LIBJPEG_CFLAGS=""
+ AC_CHECK_LIB([jpeg], [jpeg_start_decompress],
+ [
+ AC_CHECK_HEADER([jpeglib.h],
+ [
+ LIBJPEG_LIBS="-ljpeg -lm"
+ ],
+ [
+ dnl We can only build the JPEG thumbnailer if the JPEG headers are available
+ ac_tumbler_jpeg_thumbnailer=no
+ ])
+ ],
+ [
+ dnl We can only build the JPEG thumbnailer if libjpeg is available
+ ac_tumbler_jpeg_thumbnailer=no
+ ])
+ AC_SUBST([LIBJPEG_CFLAGS])
+ AC_SUBST([LIBJPEG_LIBS])
+ ], [ac_tumbler_jpeg_thumbnailer=no])
+fi
+
+AC_MSG_CHECKING([whether to build the JPEG thumbnailer plugin with EXIF support])
+AM_CONDITIONAL([TUMBLER_JPEG_THUMBNAILER], [test x"$ac_tumbler_jpeg_thumbnailer" = x"yes"])
+AC_MSG_RESULT([$ac_tumbler_jpeg_thumbnailer])
+])
+
+
+
dnl TUMBLER_XDG_CACHE()
dnl
dnl Check whether to build and install the freedesktop.org cache plugin.