From 2c923b4df0f648d4bcc84eb9dfe784a8e537d755 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 13 Mar 2011 18:26:55 +0000 Subject: [PATCH] Allow use of system libjpeg version 6b (the LSB-blessed version) For this version we need to supply a jpeg_mem_src implementation; the one from our bundled jpeg-8c seems to work fine. --- code/renderer/tr_image_jpg.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/code/renderer/tr_image_jpg.c b/code/renderer/tr_image_jpg.c index c6c632e..8cdb441 100644 --- a/code/renderer/tr_image_jpg.c +++ b/code/renderer/tr_image_jpg.c @@ -37,8 +37,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #ifndef USE_INTERNAL_JPEG -# if JPEG_LIB_VERSION < 80 -# error Need system libjpeg >= 80 +# if JPEG_LIB_VERSION >= 80 + /* nothing special to do */ +# elif JPEG_LIB_VERSION == 62 + /* libjpeg 6b is the version required by the LSB. It doesn't have + * jpeg_mem_src so we need to supply our own. (Confirmed to work with + * Debian's libjpeg62.) */ +# include "../jpeg-8c/jdatasrc.c" +# else +# error Need system libjpeg, either version 6b, or version 8 or later # endif #endif -- 1.7.4.1