From 0fc86e9632312e9083141066d98ec260f9bc62e3 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 15 Mar 2015 12:34:51 +0000 Subject: [PATCH 1/2] Use pkg-config for a system libjpeg if available: libjpeg-turbo has it Bug: https://github.com/ioquake/ioq3/pull/116 --- Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index d0d20077..b6796f60 100644 --- a/Makefile +++ b/Makefile @@ -1074,11 +1074,10 @@ ifeq ($(USE_INTERNAL_JPEG),1) BASE_CFLAGS += -DUSE_INTERNAL_JPEG BASE_CFLAGS += -I$(JPDIR) else - # libjpeg doesn't have pkg-config yet, but let users override with - # "make JPEG_CFLAGS=-I/opt/jpeg/include JPEG_LIBS='-L/opt/jpeg/lib -ljpeg'" - # if they need to - JPEG_CFLAGS ?= - JPEG_LIBS ?= -ljpeg + # IJG libjpeg doesn't have pkg-config, but libjpeg-turbo uses libjpeg.pc; + # we fall back to hard-coded answers if libjpeg.pc is unavailable + JPEG_CFLAGS ?= $(shell pkg-config --silence-errors --cflags libjpeg || true) + JPEG_LIBS ?= $(shell pkg-config --silence-errors --libs libjpeg || echo -ljpeg) BASE_CFLAGS += $(JPEG_CFLAGS) RENDERER_LIBS += $(JPEG_LIBS) endif From caf08fdb7b939e72bbb49a15e06c4ce00b214a3c Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 18 Mar 2015 17:37:32 +0000 Subject: [PATCH 2/2] unzip: comment why there is no USE_INTERNAL_MINIZIP boolean option Bug: https://github.com/ioquake/ioq3/pull/116 --- code/qcommon/unzip.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/qcommon/unzip.c b/code/qcommon/unzip.c index 4fb2d3a9..b5043c19 100644 --- a/code/qcommon/unzip.c +++ b/code/qcommon/unzip.c @@ -1,4 +1,10 @@ /* unzip.c -- IO for uncompress .zip files using zlib + + Modified for Quake III Arena to use the Z_Malloc() memory pool; + this means a system copy of minizip is not a suitable replacement. + + Based on minizip: + Version 1.01e, February 12th, 2005 Copyright (C) 1998-2005 Gilles Vollant