summaryrefslogtreecommitdiff
path: root/plugins/artwork
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-04-30 20:33:54 +0200
committerGravatar waker <wakeroid@gmail.com>2011-04-30 20:33:54 +0200
commit012b016c23fee87d0b78bb42d6b784fddb496a9a (patch)
treeb9e181b8676677da15ab372a214dacd7f31ddc44 /plugins/artwork
parenta3c4bb806ec13aff63c86fc7c6efee8ca0e8d82c (diff)
added configure option to use imlib2 in artwork plugin
Diffstat (limited to 'plugins/artwork')
-rw-r--r--plugins/artwork/Makefile.am11
-rw-r--r--plugins/artwork/artwork.c2
2 files changed, 11 insertions, 2 deletions
diff --git a/plugins/artwork/Makefile.am b/plugins/artwork/Makefile.am
index aa0c7d14..01f5e87c 100644
--- a/plugins/artwork/Makefile.am
+++ b/plugins/artwork/Makefile.am
@@ -5,6 +5,13 @@ artwork_la_SOURCES = artwork.c artwork.h albumartorg.c albumartorg.h lastfm.c la
artwork_la_LDFLAGS = -module
-artwork_la_LIBADD = $(LDADD) $(JPEG_DEPS_LIBS)
-AM_CFLAGS = -std=c99
+if HAVE_IMLIB2
+ARTWORK_DEPS=$(IMLIB2_DEPS_LIBS)
+ARTWORK_CFLAGS=-DUSE_IMLIB2
+else
+ARTWORK_DEPS=$(JPEG_DEPS_LIBS)
+endif
+
+AM_CFLAGS = $(CFLAGS) $(ARTWORK_CFLAGS) -std=c99
+artwork_la_LIBADD = $(LDADD) $(ARTWORK_DEPS)
endif
diff --git a/plugins/artwork/artwork.c b/plugins/artwork/artwork.c
index 76cb31fe..a65ed413 100644
--- a/plugins/artwork/artwork.c
+++ b/plugins/artwork/artwork.c
@@ -180,6 +180,7 @@ check_dir (const char *dir, mode_t mode)
return 1;
}
+#ifndef USE_IMLIB2
struct my_error_mgr {
struct jpeg_error_mgr pub; /* "public" fields */
@@ -331,6 +332,7 @@ jpeg_resize (const char *fname, const char *outname, int scaled_size) {
return 0;
}
+#endif
#define BUFFER_SIZE 4096