summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2011-04-01 18:00:12 +0000
committerRobin Watts <robin.watts@artifex.com>2011-04-01 18:00:12 +0000
commit50ecc84d5463bd013f794a9dd53254c2e295a85e (patch)
treed7bce1f060af15c61d37034fe6f2cc174b9d715e /common
parentb960ff15c895dbe5a7d6baf470ad8a12949ad054 (diff)
Initial import of LittleCMS v2.1 into the Ghostscript/GhostPDL
build, with simple integration. LittleCMS version 1 is still used by default, so no cluster differences expected. The version of little cms imported was taken from the lcms git repository, commit 314bc7201d340ab303b36a0ade2c37cf40b83a3b, and then a couple of small tweaks were applied: * lcms2 currently offers no way to get the input/output format for a transform, so I add 2 functions (cmsGetTransformInputFormat and cmsGetTransformOutputFormat) to do this. * lcms2 currently offers no easy way to redirect malloc/free operations away from it's internal implementation, so we add a define (LCMS_USER_ALLOC) to allow us to be able to define our own functions. This mirrors the work done in lcms1 by Michael, I believe. The choice of which version of lcms to build with is made by the WHICH_CMS define option in the makefile. Currently this is set to lcms by default, but can be changed to lcms2 to allow lcms2 to be used instead. To make this work, various small tweaks have been required. Firstly, we rename gsicc_littlecms.h to gsicc_cms.h, reflecting the fact that this is not littlecms specific - rather, it defines the interface that any cms would have to provide in order to work with Ghostscript/GhostPDL. Secondly, we rename gsicc_littlecms.c to gsicc_lcms.c to make the makefile macros easier. We add a gsicc_lcms2.c file (derived from copying and editing gsicc_lcms.c) that interfaces with lcms2. Currently lcms2 builds and appears to run without crashing, but gives differing results in some cases. This will need to be solved before we can swap over to using lcms2 by default. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@12340 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'common')
-rw-r--r--common/msvc_top.mak2
-rw-r--r--common/ugcc_top.mak7
2 files changed, 8 insertions, 1 deletions
diff --git a/common/msvc_top.mak b/common/msvc_top.mak
index e966cf198..44daca4f6 100644
--- a/common/msvc_top.mak
+++ b/common/msvc_top.mak
@@ -107,6 +107,7 @@ $(GENDIR)/ldgs.tr: FORCE
GLGENDIR="$(GLGENDIR)" GLOBJDIR="$(GLOBJDIR)" \
EXPATSRCDIR="$(EXPATSRCDIR)" SHARE_EXPAT="$(SHARE_EXPAT)" \
EXPAT_CFLAGS="$(EXPAT_CFLAGS)" LCMSSRCDIR="$(LCMSSRCDIR)" \
+ LCMS2SRCDIR="$(LCMS2SRCDIR)" \
ICCSRCDIR="$(ICCSRCDIR)" IMDISRCDIR="$(IMDISRCDIR)" \
PNGSRCDIR="$(PNGSRCDIR)" \
SHARE_LIBPNG="$(SHARE_LIBPNG)" \
@@ -154,6 +155,7 @@ $(GENDIR)/ldgs.tr: FORCE
GLGENDIR="$(GLGENDIR)" GLOBJDIR="$(GLOBJDIR)" \
EXPATSRCDIR="$(EXPATSRCDIR)" SHARE_EXPAT="$(SHARE_EXPAT)" \
EXPAT_CFLAGS="$(EXPAT_CFLAGS)" LCMSSRCDIR="$(LCMSSRCDIR)" \
+ LCMS2SRCDIR="$(LCMS2SRCDIR)" \
ICCSRCDIR="$(ICCSRCDIR)" IMDISRCDIR="$(IMDISRCDIR)" \
PNGSRCDIR="$(PNGSRCDIR)" \
SHARE_LIBPNG="$(SHARE_LIBPNG)" \
diff --git a/common/ugcc_top.mak b/common/ugcc_top.mak
index 6c7104805..386bd4a91 100644
--- a/common/ugcc_top.mak
+++ b/common/ugcc_top.mak
@@ -35,6 +35,11 @@ CCAUX=$(CC)
CC_NO_WARN=$(CC_) -Wno-cast-qual -Wno-traditional
CC_SHARED=$(CC_)
+# Which CMS are we using?
+# Options are currently lcms or lcms2
+
+WHICH_CMS=lcms
+
include $(GLSRCDIR)/unixhead.mak
include $(GLSRCDIR)/gs.mak
include $(GLSRCDIR)/lib.mak
@@ -45,7 +50,7 @@ include $(GLSRCDIR)/zlib.mak
include $(GLSRCDIR)/png.mak
include $(GLSRCDIR)/jbig2.mak
include $(GLSRCDIR)/icclib.mak
-include $(GLSRCDIR)/lcms.mak
+include $(GLSRCDIR)/$(WHICH_CMS).mak
include $(GLSRCDIR)/ijs.mak
include $(GLSRCDIR)/tiff.mak
include $(GLSRCDIR)/devs.mak