From a7615ceb91c7f091962ad452c56e7bfb1b557842 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Mon, 13 Aug 2012 16:44:43 +0200 Subject: [PATCH] Fixed an issue with jpeg-turbo library There were compilation errors if the version of the library was less than 1.2.0. This was happening because the macros JPEG_LIB_VERSION_MAJOR and JPEG_LIB_VERSION_MINOR were not being defined, since the compile-time macro LIBJPEG_TURBO_VERSION was introduced in version 1.2.0. The problem was fixed by giving those two macros a definition if it was missing. --- src/init.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/init.cc b/src/init.cc index 7374fbf..bd63a05 100755 --- a/src/init.cc +++ b/src/init.cc @@ -27,8 +27,10 @@ init (Handle target) { target->Set(String::New("cairoVersion"), String::New(cairo_version_string())); #ifdef HAVE_JPEG -#ifdef LIBJPEG_TURBO_VERSION +#ifndef JPEG_LIB_VERSION_MAJOR #define JPEG_LIB_VERSION_MAJOR 8 +#endif +#ifndef JPEG_LIB_VERSION_MINOR #define JPEG_LIB_VERSION_MINOR 4 #endif