The gslite library temporarily requires patches to gs/src.  See "Patches
for Ghostscript" attached below.

How to build and test gslite library with Microsoft Visual Studio 8
with Microsoft Platform SDK for Windows Server 2003 R2.

   # install the free visual C++ 2005 and SDK.
   # modify vsvars32.bat so visual c can find the SDK (vsvars32.bat
   # patch below) and open the Visual Studio 2005 command prompt.
   # go to the gslite directory
   cd tools\gslite
   # build the library see DEBUG options in the makefile
   nmake /f gslt_lib_msvc.mak DEVSTUDIO=
   # build and run the the test files.
   nmake /f gslt_lib_msvc.mak check

how to build and test gslite library with Linux 2.6.12 and gcc version
3.4.4 20050721 (Red Hat 3.4.4-2)

   # go to the glite directory and build the library.
   make -f gslt_lib_gcc.mak
   # test the library.
   make check

Note the linux makefile supports a threads test
(gslt_image_threads_test), it is the same as gslt_image_test except it
tests rendering 2 images in 2 concurrent threads of execution.  To get
this to run on windows would require installing POSIX threads.


vsvars32.bat patch
------------------
--- vsvars32.bat	2006-12-27 23:48:11.578125000 -0700
+++ vsvars32.bat.bak	2006-12-27 21:14:42.312500000 -0700
@@ -14,8 +14,8 @@
 @set DevEnvDir=C:\Program Files\Microsoft Visual Studio 8\Common7\IDE
 
 @set PATH=C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files\Microsoft Visual Studio 8\VC\BIN;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 8\VC\VCPackages;%PATH%
-@set INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE;%INCLUDE%;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
-@set LIB=C:\Program Files\Microsoft Visual Studio 8\VC\LIB;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib;%LIB%;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib
+@set INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE;%INCLUDE%
+@set LIB=C:\Program Files\Microsoft Visual Studio 8\VC\LIB;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib;%LIB%
 @set LIBPATH=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
 
 @goto end


Patches for ghostscript
-----------------------

Note We will integrate these or compatible fixes into the gs tree as
time permits.


This is required to avoid a circular dependency in the build.

Index: sjpegc.c
===================================================================
--- sjpegc.c	(revision 7517)
+++ sjpegc.c	(working copy)
@@ -34,7 +34,6 @@
   unix-aux.mak, and written to gconfig_.h
  */
 
-#include "gconfig_.h"
 #ifdef DONT_HAVE_JMEMSYS_H

This patch is needed to support True Type Collection files.

Index: gs/src/ttfmain.c
===================================================================
--- gs/src/ttfmain.c    (revision 7637)
+++ gs/src/ttfmain.c    (working copy)
@@ -211,7 +211,8 @@
FontError ttfFont__Open(ttfInterpreter *tti, ttfFont *this, ttfReader *r,
                                   unsigned int nTTC, float w, float h,
                                   bool design_grid)
-{   char sVersion[4], sVersion0[4] = {0, 1, 0, 0};
+{   char sVersion[4], sVersion1[4] = {0, 1, 0, 0};
+    char sVersion2[4] = {0, 2, 0, 0};
    unsigned int nNumTables, i;
    TT_Error code;
    int k;
@@ -227,7 +228,7 @@
       unsigned int nPos = 0xbaadf00d; /* Quiet compiler. */

       r->Read(r, sVersion, 4);
-       if(memcmp(sVersion, sVersion0, 4))
+       if(memcmp(sVersion, sVersion1, 4) && memcmp(sVersion, sVersion2, 4))
           return fUnimplemented;
       nFonts = ttfReader__UInt(r);
       if (nFonts == 0)
@@ -239,7 +240,7 @@
       r->Seek(r, nPos);
       r->Read(r, sVersion, 4);
    }
-    if(memcmp(sVersion, sVersion0, 4) && memcmp(sVersion, "true", 4))
+    if(memcmp(sVersion, sVersion1, 4) && memcmp(sVersion, "true", 4))
       return fUnimplemented;
    nNumTables    = ttfReader__UShort(r);
    ttfReader__UShort(r); /* nSearchRange */ 


The following module does not compile without the patch.  We hope to
deprecate "check_interrupts" soon.



Index: gp_mslib.c
===================================================================
--- gp_mslib.c	(revision 7655)
+++ gp_mslib.c	(working copy)
@@ -26,10 +26,8 @@
  */
 #ifdef CHECK_INTERRUPTS
 
-#include "gx.h"
-
 int
-gp_check_interrupts(const gs_memory_t *mem)
+gp_check_interrupts(void *mem)
 {
     return 0;
 }
