Commit b8b72330 authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

don't compile jpeg loader if libjpeg is not available

parent 82b962f0
......@@ -2,13 +2,21 @@ extensiondir = $(pkglibdir)/extensions
extension_LTLIBRARIES = libcairo_io.la
libcairo_io_la_SOURCES = \
cairo-io-jpeg.c \
cairo-io-jpeg.h \
main.c
libcairo_io_la_CFLAGS = $(GTHUMB_CFLAGS) $(JPEG_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb
if ENABLE_JPEG_TOOLS
libcairo_io_la_SOURCES += \
cairo-io-jpeg.c \
cairo-io-jpeg.h
endif
libcairo_io_la_CFLAGS = $(GTHUMB_CFLAGS) $(JPEG_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb
libcairo_io_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
libcairo_io_la_LIBADD = $(GTHUMB_LIBS) $(JPEG_LIBS) ../jpeg_utils/libjpeg_utils.la
libcairo_io_la_LIBADD = $(GTHUMB_LIBS) $(JPEG_LIBS)
if ENABLE_JPEG_TOOLS
libcairo_io_la_LIBADD += ../jpeg_utils/libjpeg_utils.la
endif
libcairo_io_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
extensioninidir = $(extensiondir)
......
......@@ -28,10 +28,12 @@
G_MODULE_EXPORT void
gthumb_extension_activate (void)
{
#ifdef HAVE_LIBJPEG
gth_main_register_image_loader_func (_cairo_image_surface_create_from_jpeg,
GTH_IMAGE_FORMAT_CAIRO_SURFACE,
"image/jpeg",
NULL);
#endif
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment