Permalink
Browse files

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.
  • Loading branch information...
1 parent f8c6a90 commit a7615ceb91c7f091962ad452c56e7bfb1b557842 @lpinca lpinca committed with tj Aug 13, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/init.cc
View
4 src/init.cc
@@ -27,8 +27,10 @@ init (Handle<Object> 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

0 comments on commit a7615ce

Please sign in to comment.