13ff48bf5SDavid du Colombier<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 27dd7cddfSDavid du Colombier<html> 37dd7cddfSDavid du Colombier<head> 47dd7cddfSDavid du Colombier<title>How to build Ghostscript from source code</title> 5*593dc095SDavid du Colombier<!-- $Id: Make.htm,v 1.90 2005/10/20 19:46:23 ray Exp $ --> 67dd7cddfSDavid du Colombier<!-- Originally: make.txt --> 73ff48bf5SDavid du Colombier<link rel="stylesheet" type="text/css" href="gs.css" title="Ghostscript Style"> 87dd7cddfSDavid du Colombier</head> 97dd7cddfSDavid du Colombier 107dd7cddfSDavid du Colombier<body> 117dd7cddfSDavid du Colombier<!-- [1.0 begin visible header] ============================================ --> 127dd7cddfSDavid du Colombier 137dd7cddfSDavid du Colombier<!-- [1.1 begin headline] ================================================== --> 147dd7cddfSDavid du Colombier 153ff48bf5SDavid du Colombier<h1>How to build Ghostscript from source code</h1> 167dd7cddfSDavid du Colombier 177dd7cddfSDavid du Colombier<!-- [1.1 end headline] ==================================================== --> 187dd7cddfSDavid du Colombier 197dd7cddfSDavid du Colombier<!-- [1.2 begin table of contents] ========================================= --> 207dd7cddfSDavid du Colombier 217dd7cddfSDavid du Colombier<h2>Table of contents</h2> 227dd7cddfSDavid du Colombier 237dd7cddfSDavid du Colombier<blockquote><ul> 247dd7cddfSDavid du Colombier<li><a href="#General_overview">General overview</a> 257dd7cddfSDavid du Colombier<li><a href="#Acquiring">How to acquire the source code</a> 267dd7cddfSDavid du Colombier<ul> 277dd7cddfSDavid du Colombier<li><a href="#Ghostscript_source">Ghostscript source code</a> 287dd7cddfSDavid du Colombier<li><a href="#Third-party_libraries">Third-party library source code</a> 297dd7cddfSDavid du Colombier</ul> 307dd7cddfSDavid du Colombier<li><a href="#Unpack">How to unpack the source code</a> 317dd7cddfSDavid du Colombier<ul> 327dd7cddfSDavid du Colombier<li><a href="#Tarfiles">How to unpack compressed tar files generally</a> 337dd7cddfSDavid du Colombier<li><a href="#Zipfiles">How to unpack zip files generally</a> 347dd7cddfSDavid du Colombier<li><a href="#Unpack_Ghostscript">How to unpack Ghostscript itself</a> 357dd7cddfSDavid du Colombier<li><a href="#Unpack_libraries">How to unpack the third-party libraries</a> 367dd7cddfSDavid du Colombier</ul> 377dd7cddfSDavid du Colombier<li><a href="#Bug_check">How to check for post-release bug fixes</a> 387dd7cddfSDavid du Colombier<li><a href="#Makefile_overview">How to prepare the makefiles</a> 397dd7cddfSDavid du Colombier<ul> 407dd7cddfSDavid du Colombier<li><a href="#Preparing_makefiles">Changes for your environment</a> 417dd7cddfSDavid du Colombier<li><a href="#Features_and_devices">Selecting features and devices</a> 427dd7cddfSDavid du Colombier<ul> 437dd7cddfSDavid du Colombier<li><a href="#Precompiled_data">Precompiled run-time data</a> 447dd7cddfSDavid du Colombier<li><a href="#GNU_readline">GNU readline</a> 457dd7cddfSDavid du Colombier</ul> 467dd7cddfSDavid du Colombier<li><a href="#Makefile_setup">Setting up "makefile"</a> 477dd7cddfSDavid du Colombier<li><a href="#Invoke_make">Invoking "make"</a> 487dd7cddfSDavid du Colombier<li><a href="#Cross-compiling">Cross-compiling</a> 497dd7cddfSDavid du Colombier</ul> 507dd7cddfSDavid du Colombier<li><a href="#PC_build">How to build Ghostscript from source (PC version)</a> 517dd7cddfSDavid du Colombier<ul> 527dd7cddfSDavid du Colombier<li><a href="#Borland_build">Borland/Inprise environment</a> 537dd7cddfSDavid du Colombier<li><a href="#Microsoft_build">Microsoft environment</a> 54*593dc095SDavid du Colombier<li><a href="#Microsoft_build_64">Microsoft environment 64-bit</a> 557dd7cddfSDavid du Colombier<li><a href="#Self-extracting_executables">Making self-extracting executables</a> 567dd7cddfSDavid du Colombier<li><a href="#Watcom_build">Watcom environment</a> 577dd7cddfSDavid du Colombier<li><a href="#Cygwin32_build">Cygwin32 gcc</a> 587dd7cddfSDavid du Colombier<li><a href="#IntelWin32_build">Intel C/C++ compiler</a> 597dd7cddfSDavid du Colombier</ul> 603ff48bf5SDavid du Colombier<li><a href="#Mac_build">How to build Ghostscript from source (MacOS version)</a> 617dd7cddfSDavid du Colombier<ul> 627dd7cddfSDavid du Colombier<li><a href="#MacOS">Traditional MacOS</a> 633ff48bf5SDavid du Colombier<li><a href="#MacOSX">MacOS X</a> 647dd7cddfSDavid du Colombier</ul> 657dd7cddfSDavid du Colombier<li><a href="#Unix_build">How to build Ghostscript from source (Unix version)</a> 667dd7cddfSDavid du Colombier<ul> 677dd7cddfSDavid du Colombier<li><a href="#Multi_architecture_makefile">The multi-architecture makefile</a> 687dd7cddfSDavid du Colombier<li><a href="#UNIX_makefile">Setting up "makefile"</a> 693ff48bf5SDavid du Colombier<li><a href="#Shared_object">Shared object</a> 707dd7cddfSDavid du Colombier<li><a href="#Tool_specific_issues">Tool-specific issues</a> 717dd7cddfSDavid du Colombier<ul> 727dd7cddfSDavid du Colombier<li><a href="#gcc_27x">gcc 2.7.*</a> 737dd7cddfSDavid du Colombier<li><a href="#GNU_make">GNU make</a> 747dd7cddfSDavid du Colombier</ul> 757dd7cddfSDavid du Colombier<li><a href="#OS_specific_issues">OS-specific issues</a> 767dd7cddfSDavid du Colombier<ul> 777dd7cddfSDavid du Colombier<li><a href="#386_Unix">386 Unix</a> 787dd7cddfSDavid du Colombier<li><a href="#BSDI">BSDI</a> 797dd7cddfSDavid du Colombier<li><a href="#Digital_Unix">Digital Unix (Alpha)</a> 807dd7cddfSDavid du Colombier<li><a href="#Linux">Linux</a> 813ff48bf5SDavid du Colombier<li><a href="#NeXTSTEP">NeXTSTEP / OpenSTEP</a> 827dd7cddfSDavid du Colombier<li><a href="#SCO">SCO Unix/Xenix</a> 837dd7cddfSDavid du Colombier<li><a href="#SVR4">SVR4 Unix</a> 847dd7cddfSDavid du Colombier<li><a href="#System_V">System V Unix platforms</a> 857dd7cddfSDavid du Colombier<li><a href="#Unixware">Unixware</a> 867dd7cddfSDavid du Colombier</ul> 877dd7cddfSDavid du Colombier<li><a href="#Hardware_specific_issues">Hardware-specific issues</a> 887dd7cddfSDavid du Colombier<ul> 897dd7cddfSDavid du Colombier<li><a href="#Alpha_with_gcc">Alpha with gcc</a> 907dd7cddfSDavid du Colombier<li><a href="#Apollo">H-P Apollo</a> 917dd7cddfSDavid du Colombier<li><a href="#ATT_7040">AT&T 7040 R3</a> 927dd7cddfSDavid du Colombier<li><a href="#Convex">Convex</a> 937dd7cddfSDavid du Colombier<li><a href="#DECStations">DECStations with Ultrix</a> 947dd7cddfSDavid du Colombier<li><a href="#HP_RISC">H-P RISC workstations</a> 957dd7cddfSDavid du Colombier<li><a href="#Intergraph">Intergraph Clipper</a> 967dd7cddfSDavid du Colombier<li><a href="#MIPS">MIPS</a> 977dd7cddfSDavid du Colombier<li><a href="#NCR_3550">NCR 3550</a> 987dd7cddfSDavid du Colombier<li><a href="#Pyramid">Pyramid MIServer-S</a> 997dd7cddfSDavid du Colombier<li><a href="#RS6000">IBM RS/6000 with AIX</a> 1007dd7cddfSDavid du Colombier<li><a href="#Silicon_Graphics">Silicon Graphics</a> 1017dd7cddfSDavid du Colombier<li><a href="#Sun">Sun</a> 1027dd7cddfSDavid du Colombier<li><a href="#SunOS">SunOS</a> 1037dd7cddfSDavid du Colombier<li><a href="#Solaris">Solaris</a> 1047dd7cddfSDavid du Colombier<li><a href="#VAX_Ultrix">VAX with Ultrix</a> 1057dd7cddfSDavid du Colombier</ul> 1067dd7cddfSDavid du Colombier</ul> 1077dd7cddfSDavid du Colombier<li><a href="#OS2_build">How to build Ghostscript from source (OS/2 version)</a> 1087dd7cddfSDavid du Colombier<li><a href="#VMS_build">How to build Ghostscript from source (OpenVMS version)</a> 1097dd7cddfSDavid du Colombier<ul> 1107dd7cddfSDavid du Colombier<li><a href="#GNU_make_VMS">Building with GNU make on OpenVMS</a> 1117dd7cddfSDavid du Colombier<li><a href="#MMK_MMS_VMS">Building with MMK or MMS on OpenVMS</a> 1127dd7cddfSDavid du Colombier</ul> 1137dd7cddfSDavid du Colombier<li><a href="#Other_environments">Other environments</a> 1147dd7cddfSDavid du Colombier<ul> 1157dd7cddfSDavid du Colombier<li><a href="#No_multi_thread">Environments lacking multi-threading</a> 1167dd7cddfSDavid du Colombier<li><a href="#Plan_9">Plan 9</a> 1177dd7cddfSDavid du Colombier<li><a href="#QNX">QNX</a> 1187dd7cddfSDavid du Colombier</ul> 119*593dc095SDavid du Colombier<li><a href="#UFST_build">How to build Ghostscript with UFST</a> 120*593dc095SDavid du Colombier<li><a href="#FT_build">How to build Ghostscript with Free Type</a> 1217dd7cddfSDavid du Colombier</ul></blockquote> 1227dd7cddfSDavid du Colombier 1237dd7cddfSDavid du Colombier<!-- [1.2 end table of contents] =========================================== --> 1247dd7cddfSDavid du Colombier 1257dd7cddfSDavid du Colombier<!-- [1.3 begin hint] ====================================================== --> 1267dd7cddfSDavid du Colombier 1277dd7cddfSDavid du Colombier<p>For other information, see the <a href="Readme.htm">Ghostscript 1287dd7cddfSDavid du Colombieroverview</a> and the instructions on how to <a href="Install.htm">install 1297dd7cddfSDavid du ColombierGhostscript</a>. 1307dd7cddfSDavid du Colombier 1317dd7cddfSDavid du Colombier<!-- [1.3 end hint] ======================================================== --> 1327dd7cddfSDavid du Colombier 1337dd7cddfSDavid du Colombier<hr> 1347dd7cddfSDavid du Colombier 1357dd7cddfSDavid du Colombier<!-- [1.0 end visible header] ============================================== --> 1367dd7cddfSDavid du Colombier 1377dd7cddfSDavid du Colombier<!-- [2.0 begin contents] ================================================== --> 1387dd7cddfSDavid du Colombier 1393ff48bf5SDavid du Colombier<h2><a name="General_overview"></a>General overview</h2> 1407dd7cddfSDavid du Colombier 1417dd7cddfSDavid du Colombier<p> 1427dd7cddfSDavid du ColombierThis document describes how to build a Ghostscript executable from source 1437dd7cddfSDavid du Colombiercode. There are four major steps to building Ghostscript: 1447dd7cddfSDavid du Colombier 1457dd7cddfSDavid du Colombier<ol> 1467dd7cddfSDavid du Colombier<li>Acquire the compressed archive files of source code for Ghostscript and 1477dd7cddfSDavid du Colombierthe required third-party libraries. 1487dd7cddfSDavid du Colombier<li>Unpack the archive files into the Ghostscript directory and correctly 1497dd7cddfSDavid du Colombiernamed subdirectories. 150*593dc095SDavid du Colombier<li>Configure the build to match your system and desired configuration options. 1517dd7cddfSDavid du Colombier<li>Invoke "<b><tt>make</tt></b>" to build the software. 1527dd7cddfSDavid du Colombier</ol> 1537dd7cddfSDavid du Colombier 1547dd7cddfSDavid du Colombier<p> 1557dd7cddfSDavid du ColombierThe remainder of this document describes each of these steps in detail. 1567dd7cddfSDavid du ColombierNote that some of this process is platform-dependent. After building 1577dd7cddfSDavid du ColombierGhostscript you must then install it; for that, see the 1587dd7cddfSDavid du Colombier<a href="Install.htm">installation instructions</a>. 1597dd7cddfSDavid du Colombier 1607dd7cddfSDavid du Colombier<hr> 1617dd7cddfSDavid du Colombier 1623ff48bf5SDavid du Colombier<h2><a name="Acquiring"></a>How to acquire the source code</h2> 1637dd7cddfSDavid du Colombier 1647dd7cddfSDavid du Colombier<p> 1657dd7cddfSDavid du ColombierBuilding Ghostscript requires the Ghostscript source code itself, and also 1667dd7cddfSDavid du Colombierthe source code for some third-party libraries that Ghostscript uses. 1677dd7cddfSDavid du Colombier 1683ff48bf5SDavid du Colombier<h3><a name="Ghostscript_source"></a>Ghostscript source code</h3> 1697dd7cddfSDavid du Colombier 1707dd7cddfSDavid du Colombier<p><a name="Authoritative_distribution_site"></a> 1713ff48bf5SDavid du ColombierThere are two kinds of Ghostscript distributions available, called "AFPL 172*593dc095SDavid du ColombierGhostscript" and "GPL Ghostscript"; the distinction between them is 1737dd7cddfSDavid du Colombierexplained in the <a href="Commprod.htm">conditions for distributing 1743ff48bf5SDavid du ColombierGhostscript</a>. The authoritative distribution site for AFPL 1757dd7cddfSDavid du ColombierGhostscript is 1767dd7cddfSDavid du Colombier 1777dd7cddfSDavid du Colombier<blockquote> 1783ff48bf5SDavid du Colombier<a href="ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/" 1793ff48bf5SDavid du Colombierclass="offsite">ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/</a>gs### 1807dd7cddfSDavid du Colombier</blockquote> 1817dd7cddfSDavid du Colombier 1827dd7cddfSDavid du Colombier<p> 183*593dc095SDavid du Colombierwhere "###" is the unpunctuated version number. GPL Ghostscript is 184*593dc095SDavid du Colombieravailable from the same site at 1857dd7cddfSDavid du Colombier 1867dd7cddfSDavid du Colombier<blockquote> 187*593dc095SDavid du Colombier<a href="ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/" 188*593dc095SDavid du Colombierclass="offsite">ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/</a> 1897dd7cddfSDavid du Colombier</blockquote> 1907dd7cddfSDavid du Colombier 1917dd7cddfSDavid du Colombier<p> 1927dd7cddfSDavid du ColombierGhostscript source code is packaged in two different formats: 1937dd7cddfSDavid du Colombiergzip-compressed tar files (*<b><tt>.tar.gz</tt></b>) and zip files 1947dd7cddfSDavid du Colombier(*<b><tt>.zip</tt></b>). For all versions there are gzip-compressed tar 1957dd7cddfSDavid du Colombierfiles: 1967dd7cddfSDavid du Colombier 1977dd7cddfSDavid du Colombier<blockquote> 1987dd7cddfSDavid du Colombier<b><tt>ghostscript-</tt></b>#.##<b><tt>.tar.gz</tt></b><br> 1997dd7cddfSDavid du Colombier<b><tt>ghostscript-fonts-std-</tt></b>#.##<b><tt>.tar.gz</tt></b><br> 2007dd7cddfSDavid du Colombier<b><tt>ghostscript-fonts-other-</tt></b>#.##<b><tt>.tar.gz</tt></b> 2017dd7cddfSDavid du Colombier</blockquote> 2027dd7cddfSDavid du Colombier 203*593dc095SDavid du Colombier<p>For recent versions of Ghostscript there are also zip files 2047dd7cddfSDavid du Colombier 2057dd7cddfSDavid du Colombier<blockquote> 206*593dc095SDavid du Colombier<b><tt>gs</tt></b>###<b><tt>src.zip</tt></b><br> 207*593dc095SDavid du Colombier<b><tt>gs</tt></b>###<b><tt>w32.exe</tt></b> 2087dd7cddfSDavid du Colombier</blockquote> 2097dd7cddfSDavid du Colombier 2107dd7cddfSDavid du Colombier<p> 2117dd7cddfSDavid du Colombier("#.##" and "###" are version numbers in punctuated and unpunctuated form.) 2127dd7cddfSDavid du ColombierSoftware to decompress and extract both formats is available for almost 2137dd7cddfSDavid du Colombierevery platform for which Ghostscript is available -- including Unix, DOS, 2147dd7cddfSDavid du ColombierMS Windows, and VMS -- so you can choose the format most convenient for 2157dd7cddfSDavid du Colombieryou; but it's up to you to locate that software. See the section on <a 2167dd7cddfSDavid du Colombierhref="#Unpack">unpacking the source code</a>. 2177dd7cddfSDavid du Colombier 2183ff48bf5SDavid du Colombier<h3><a name="Third-party_libraries"></a>Third-party library source code</h3> 2197dd7cddfSDavid du Colombier 2207dd7cddfSDavid du Colombier<p> 2217dd7cddfSDavid du ColombierTo build Ghostscript you need the source code for the <a 2227dd7cddfSDavid du Colombierhref="http://www.ijg.org/">Independent JPEG Group</a> (IJG) library, the 2233ff48bf5SDavid du Colombier<a href="http://www.libpng.org/pub/png/">Portable Network Graphics</a> 2243ff48bf5SDavid du Colombier(PNG) 2253ff48bf5SDavid du Colombierlibrary, and the <a 226*593dc095SDavid du Colombierhref="http://www.gzip.org/zlib/">zlib</a> 227*593dc095SDavid du Colombiercompression and decompression library. The default build also expects source 228*593dc095SDavid du Colombierfor the <a href="http://jbig2dec.sourceforge.net">jbig2dec</a> JBIG2 decompression 229*593dc095SDavid du Colombierlibrary. 230*593dc095SDavid du Colombier 231*593dc095SDavid du Colombier<p> 232*593dc095SDavid du ColombierOn Windows and MacOS, the .zip and .sit source archives include the appropriate 233*593dc095SDavid du Colombiersource versions of these libraries, so no additional downloads are necessary. 234*593dc095SDavid du ColombierUnix tarballs may also contain appropriate library source; the configure script 235*593dc095SDavid du Colombierwill tell you if it cannot find the appropriate libraries. 236*593dc095SDavid du Colombier 237*593dc095SDavid du Colombier<p> 238*593dc095SDavid du ColombierHere are authoritative distribution points for these libraries, should you need 239*593dc095SDavid du Colombierto obtain the source yourself. As elsewhere, "#" is used for version 2407dd7cddfSDavid du Colombiernumbers. The JPEG source code is quite stable, so the reference 241*593dc095SDavid du Colombierhere includes the latest version number. Versions of the zlib source are 242*593dc095SDavid du Colombiernot compatible between the 1.1.x and 1.2.x series; if you wish to 243*593dc095SDavid du Colombiercompile in zlib (as opposed to linking to a separately build dynamic 244*593dc095SDavid du Colombierlibrary) you must use a 1.2.x version. 2457dd7cddfSDavid du Colombier 2467dd7cddfSDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0> 2477dd7cddfSDavid du Colombier<tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Third-party libraries: authoritative sources</font><hr> 2487dd7cddfSDavid du Colombier<tr> <td valign=top>JPEG 2497dd7cddfSDavid du Colombier <td> 2503ff48bf5SDavid du Colombier <td><a href="ftp://ftp.uu.net/graphics/jpeg/" 2513ff48bf5SDavid du Colombierclass="offsite">ftp://ftp.uu.net/graphics/jpeg/</a><a 2523ff48bf5SDavid du Colombierhref="ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz" 2533ff48bf5SDavid du Colombierclass="offsite">jpegsrc.v6b.tar.gz</a><br> 2543ff48bf5SDavid du Colombier <a href="ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/" 2553ff48bf5SDavid du Colombierclass="offsite">ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/</a><a 2563ff48bf5SDavid du Colombierhref="ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/jpegsr6b.zip">jpegsr6b.zip</a> 2577dd7cddfSDavid du Colombier 2587dd7cddfSDavid du Colombier<tr> <td valign=top>PNG 2597dd7cddfSDavid du Colombier <td> 2603ff48bf5SDavid du Colombier <td><a href="http://www.libpng.org/pub/png/src/" 2613ff48bf5SDavid du Colombierclass="offsite">http://www.libpng.org/pub/png/src/</a>libpng-#.#.#.tar.gz<br> 2623ff48bf5SDavid du Colombier <a href="http://www.libpng.org/pub/png/src/" 2633ff48bf5SDavid du Colombierclass="offsite">http://www.libpng.org/pub/png/src/</a>lpng###.zip<br> 2643ff48bf5SDavid du Colombier <a href="ftp://swrinde.nde.swri.edu/pub/png/src/" 2653ff48bf5SDavid du Colombierclass="offsite">ftp://swrinde.nde.swri.edu/pub/png/src/</a>libpng-#.#.#.tar.gz<br> 2663ff48bf5SDavid du Colombier <a href="ftp://swrinde.nde.swri.edu/pub/png/src/" 2673ff48bf5SDavid du Colombierclass="offsite">ftp://swrinde.nde.swri.edu/pub/png/src/</a>lpng###.zip 2687dd7cddfSDavid du Colombier 2697dd7cddfSDavid du Colombier<tr> <td valign=top>zlib (latest) 2707dd7cddfSDavid du Colombier <td> 271*593dc095SDavid du Colombier <td> <a href="http://www.gzip.org/zlib/zlib-1.2.1.tar.gz" 272*593dc095SDavid du Colombierclass="offsite">http://www.gzip.org/zlib/zlib-1.2.1.tar.gz</a><br> 273*593dc095SDavid du Colombier <a href="http://www.gzip.org/zlib/zlib121.zip" 274*593dc095SDavid du Colombierclass="offsite">http://www.gzip.org/zlib/zlib121.zip</a><br> 275*593dc095SDavid du Colombier See the <a href="http://www.gzip.org/zlib/">official website</a> 276*593dc095SDavid du Colombierfor a list of mirrors. 277*593dc095SDavid du Colombier<tr> <td valign=top>jbig2dec 278*593dc095SDavid du Colombier <td> 279*593dc095SDavid du Colombier <td> <a href="http://sourceforge.net/project/showfiles.php?group_id=28301" 280*593dc095SDavid du Colombierclass="offsite">http://sourceforge.net/project/showfiles.php?group_id=28301</a><br> 2817dd7cddfSDavid du Colombier</table></blockquote> 2827dd7cddfSDavid du Colombier 2837dd7cddfSDavid du Colombier<p> 2847dd7cddfSDavid du ColombierOn DOS or MS Windows one ordinarily uses the zip file kits, in other 2857dd7cddfSDavid du Colombierenvironments the compressed tar files, but this is simply a matter of 2867dd7cddfSDavid du Colombierconvenience, since for the same version of the software the compressed tar 2877dd7cddfSDavid du Colombierfile has the same contents as the zip file. Note that each of these 2887dd7cddfSDavid du Colombierlibraries has <b><em>its own version number</em></b> that has 2897dd7cddfSDavid du Colombier<b><em>nothing to do with Ghostscript's version number</em></b>; you should 2907dd7cddfSDavid du Colombierget the highest numbered version. (If you encounter difficulties in the 2917dd7cddfSDavid du Colombierbuild process you might have to use a lower-numbered version, but don't 2927dd7cddfSDavid du Colombierworry about this yet.) If you're running Linux, you might check whether 2937dd7cddfSDavid du Colombierthese libraries are already available in source form on your system, since 2947dd7cddfSDavid du Colombiermany Linux distributors include them; but we advise you to get the highest 2957dd7cddfSDavid du Colombierversion from the Net if you can. 2967dd7cddfSDavid du Colombier 2977dd7cddfSDavid du Colombier<hr> 2987dd7cddfSDavid du Colombier 2993ff48bf5SDavid du Colombier<h2><a name="Unpack"></a>How to unpack the source code</h2> 3007dd7cddfSDavid du Colombier 3017dd7cddfSDavid du Colombier<p> 3027dd7cddfSDavid du ColombierUnfortunately there are no generally accepted standards for how to package 3037dd7cddfSDavid du Colombiersource code into archives, so the instructions for unpacking Ghostscript are 3047dd7cddfSDavid du Colombierlonger than they should be. We begin with a brief explanation of how to 3057dd7cddfSDavid du Colombierextract the two kinds of archive files. 3067dd7cddfSDavid du Colombier 3073ff48bf5SDavid du Colombier<h3><a name="Tarfiles"></a>How to unpack compressed tar files generally</h3> 3087dd7cddfSDavid du Colombier 3097dd7cddfSDavid du Colombier<p> 3107dd7cddfSDavid du ColombierTar (<b><tt>.tar</tt></b>) files are the <em>de facto</em> standard for 3117dd7cddfSDavid du Colombierarchiving files on Unix (every Unix system has the <b><tt>tar</tt></b> 3127dd7cddfSDavid du Colombierprogram), and programs to extract their contents are also widely available 3137dd7cddfSDavid du Colombierfor DOS, MS Windows, and VMS. To economize on space and downloading time, 3147dd7cddfSDavid du ColombierGhostscript's tar files are compressed with GNU <b><tt>gzip</tt></b>, which 3157dd7cddfSDavid du Colombieradds the suffix "<b><tt>.gz</tt></b>" to the file name, giving 3167dd7cddfSDavid du Colombier"<b><tt>.tar.gz</tt></b>". 3177dd7cddfSDavid du Colombier 3187dd7cddfSDavid du Colombier<p> 3197dd7cddfSDavid du ColombierTo unpack a compressed tar file <b><tt>MyArchive.tar.gz</tt></b> you 3207dd7cddfSDavid du Colombiermust both decompress it and extract the contents. You can do this in two 3217dd7cddfSDavid du Colombiersteps, one to decompress the file and another to unpack it: 3227dd7cddfSDavid du Colombier 3237dd7cddfSDavid du Colombier<blockquote> 3247dd7cddfSDavid du Colombier<b><tt>gzip -d MyArchive.tar.gz</tt></b> 3257dd7cddfSDavid du Colombier<br><b><tt>tar -xf MyArchive.tar</tt></b> 3267dd7cddfSDavid du Colombier</blockquote> 3277dd7cddfSDavid du Colombier 3287dd7cddfSDavid du Colombier<p> 3297dd7cddfSDavid du Colombieror in a pipeline: 3307dd7cddfSDavid du Colombier 3317dd7cddfSDavid du Colombier<blockquote> 3327dd7cddfSDavid du Colombier<b><tt>gzip -d -c MyArchive.tar.gz | tar -xf -</tt></b> 3337dd7cddfSDavid du Colombier</blockquote> 3347dd7cddfSDavid du Colombier 3357dd7cddfSDavid du Colombier<p> 3367dd7cddfSDavid du Colombieror, if you have a program like GNU <b><tt>tar</tt></b> that can handle 3377dd7cddfSDavid du Colombiercompressed tar files, with a single command: 3387dd7cddfSDavid du Colombier 3397dd7cddfSDavid du Colombier<blockquote> 3407dd7cddfSDavid du Colombier<b><tt>tar -zxf MyArchive.tar.gz</tt></b> 3417dd7cddfSDavid du Colombier</blockquote> 3427dd7cddfSDavid du Colombier 3437dd7cddfSDavid du Colombier<p> 3447dd7cddfSDavid du ColombierThe <b><tt>tar</tt></b> program automatically preserves directory structure 3457dd7cddfSDavid du Colombierin extracting files. The Ghostscript source archive puts all files under a 3467dd7cddfSDavid du Colombierdirectory <b><tt>gs</tt></b>#.##, so using <b><tt>tar</tt></b> to unpack a 3477dd7cddfSDavid du Colombiercompressed archive should always properly create that directory, which we 3487dd7cddfSDavid du Colombierwill call the "gs directory". Make sure you're positioned in the 3497dd7cddfSDavid du Colombier<b><em>parent</em></b> of the gs directory <b><em>before</em></b> unpacking 3507dd7cddfSDavid du Colombierthe files. If a subdirectory doesn't already exist, <b><tt>tar</tt></b> 3517dd7cddfSDavid du Colombiercreates it. 3527dd7cddfSDavid du Colombier 3537dd7cddfSDavid du Colombier<p> 3547dd7cddfSDavid du ColombierSome other programs -- under MS Windows, for instance -- can also unpack 3557dd7cddfSDavid du Colombiercompressed tar files, but they may not automatically preserve directory 3567dd7cddfSDavid du Colombierstructure nor even extract files into the current directory. If you use 3577dd7cddfSDavid du Colombierone of these, you must 3587dd7cddfSDavid du Colombier 3597dd7cddfSDavid du Colombier<ul> 3607dd7cddfSDavid du Colombier<li>set the program's options to "Use folder names" or the equivalent, and 3617dd7cddfSDavid du Colombier<li>check that it is extracting files into the right place. 3627dd7cddfSDavid du Colombier</ul> 3637dd7cddfSDavid du Colombier 3643ff48bf5SDavid du Colombier<h3><a name="Zipfiles"></a>How to unpack zip files generally</h3> 3657dd7cddfSDavid du Colombier 3667dd7cddfSDavid du Colombier<p> 3677dd7cddfSDavid du ColombierZip files are the <em>de facto</em> standard for archiving files on DOS and 3687dd7cddfSDavid du ColombierMS Windows, and programs to extract their contents are widely available for 3697dd7cddfSDavid du ColombierDOS, MS Windows, Unix, VMS, and other platforms. Zip files are at once an 3707dd7cddfSDavid du Colombierarchive format and a compressed format, so an unzipping program 3717dd7cddfSDavid du Colombierdecompresses and extracts archived files as a single step. 3727dd7cddfSDavid du Colombier 3737dd7cddfSDavid du Colombier<p> 3747dd7cddfSDavid du ColombierOne common 16-bit DOS program is <b><tt>pkunzip</tt></b>, which comes in 3757dd7cddfSDavid du Colombierthe <b><tt>pkzip</tt></b> package. If you use this, you should ensure that 3767dd7cddfSDavid du Colombieryou have at least version 2.04g, because with its <b><tt>-d</tt></b> 3777dd7cddfSDavid du Colombierswitch, that version of <b><tt>pkunzip</tt></b> preserves the directory 3787dd7cddfSDavid du Colombierstructure of archived files when extracting them; see below. Another 3797dd7cddfSDavid du Colombierpopular free program to unpack zip archives, available for DOS and MS 3807dd7cddfSDavid du ColombierWindows (16-bit and 32-bit), Unix, VMS, and other platforms, is InfoZIP 3817dd7cddfSDavid du Colombier<b><tt>unzip</tt></b>: 3827dd7cddfSDavid du Colombier 3837dd7cddfSDavid du Colombier<blockquote> 3843ff48bf5SDavid du Colombier<a href="http://www.info-zip.org/pub/infozip/UnZip.html" 3853ff48bf5SDavid du Colombierclass="offsite">http://www.info-zip.org/pub/infozip/UnZip.html</a> 3867dd7cddfSDavid du Colombier</blockquote> 3877dd7cddfSDavid du Colombier 3887dd7cddfSDavid du Colombier<p> 3897dd7cddfSDavid du ColombierUnlike <b><tt>pkunzip</tt></b>, InfoZIP <b><tt>unzip</tt></b> automatically 3907dd7cddfSDavid du Colombierpreserves the directory structure of extracted files. So if you have a zip 3917dd7cddfSDavid du Colombierarchive <b><tt>MyArchive.zip</tt></b>: 3927dd7cddfSDavid du Colombier 3937dd7cddfSDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0> 3947dd7cddfSDavid du Colombier<tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Extracting zipped files</font><hr> 3957dd7cddfSDavid du Colombier<tr valign=bottom> 3967dd7cddfSDavid du Colombier <th align=left>Command 3977dd7cddfSDavid du Colombier <td> 3987dd7cddfSDavid du Colombier <th align=left>Preserves directory structure 3997dd7cddfSDavid du Colombier<tr> <td colspan=3><hr> 4007dd7cddfSDavid du Colombier<tr valign=top> <td><b><tt>pkunzip MyArchive.zip</tt></b> 4017dd7cddfSDavid du Colombier <td> 4027dd7cddfSDavid du Colombier <td>Does <b><em>NOT</em></b> 4037dd7cddfSDavid du Colombier<tr valign=top> <td><b><tt>pkunzip -d MyArchive.zip</tt></b> 4047dd7cddfSDavid du Colombier <td> 4057dd7cddfSDavid du Colombier <td><b><em>DOES</em></b> (note the <b><tt>-d</tt></b> switch) 4067dd7cddfSDavid du Colombier<tr valign=top> <td><b><tt>unzip MyArchive.zip</tt></b> 4077dd7cddfSDavid du Colombier <td> 4087dd7cddfSDavid du Colombier <td><b><em>DOES</em></b> 4097dd7cddfSDavid du Colombier</table></blockquote> 4107dd7cddfSDavid du Colombier 4117dd7cddfSDavid du Colombier<p> 4127dd7cddfSDavid du ColombierAs with the compressed tar files, make sure you're positioned in the 4137dd7cddfSDavid du Colombier<b><em>parent</em></b> of the gs directory <b><em>before</em></b> unpacking 4147dd7cddfSDavid du Colombierthe files. If a subdirectory doesn't already exist, <b><tt>zip</tt></b> or 4157dd7cddfSDavid du Colombier<b><tt>pkunzip -d</tt></b> creates it. 4167dd7cddfSDavid du Colombier 4173ff48bf5SDavid du Colombier<h3><a name="Unpack_Ghostscript"></a>How to unpack Ghostscript itself</h3> 4187dd7cddfSDavid du Colombier 4197dd7cddfSDavid du Colombier<p> 4207dd7cddfSDavid du ColombierAt this point you have <a href="#Acquiring">acquired all the source code</a> 4217dd7cddfSDavid du Colombierand are ready to unpack it according to the preceding guidelines for <a 4227dd7cddfSDavid du Colombierhref="#Tarfiles">tar files</a> or <a href="#Zipfiles">zip files</a>. To 4237dd7cddfSDavid du Colombierunpack the Ghostscript source, make the <b><em>parent</em></b> of the (new) 4247dd7cddfSDavid du Colombiergs directory the current directory. 4257dd7cddfSDavid du Colombier 4267dd7cddfSDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0> 4277dd7cddfSDavid du Colombier<tr> <th align=left valign=top>2-step: 4287dd7cddfSDavid du Colombier <td> 4297dd7cddfSDavid du Colombier <td><b><tt>gzip -d ghostscript-</tt></b>#.##<b><tt>.tar.gz</tt></b><br><b><tt>tar -xf ghostscript-</tt></b>#.##<b><tt>.tar</tt></b> 4307dd7cddfSDavid du Colombier<tr><td> 4317dd7cddfSDavid du Colombier<tr> <th align=left valign=top>Pipe: 4327dd7cddfSDavid du Colombier <td> 4337dd7cddfSDavid du Colombier <td><b><tt>gzip -d -c ghostscript-</tt></b>#.##<b><tt>.tar.gz | tar -xf -</tt></b> 4347dd7cddfSDavid du Colombier<tr><td> 4357dd7cddfSDavid du Colombier<tr> <th align=left valign=top>GNU <b><tt>tar</tt></b>: 4367dd7cddfSDavid du Colombier <td> 4377dd7cddfSDavid du Colombier <td><b><tt>tar -zxf ghostscript-</tt></b>#.##<b><tt>.tar.gz</tt></b> 4387dd7cddfSDavid du Colombier<tr><td> 4397dd7cddfSDavid du Colombier<tr> <th align=left valign=top><b><tt>pkunzip</tt></b>: 4407dd7cddfSDavid du Colombier <td> 4417dd7cddfSDavid du Colombier <td><b><tt>pkunzip -d gs</tt></b>###<b><tt>sr1.zip</tt></b><br><b><tt>pkunzip -d gs</tt></b>###<b><tt>sr2.zip</tt></b><br>... 4427dd7cddfSDavid du Colombier<tr><td> 4437dd7cddfSDavid du Colombier<tr> <th align=left valign=top><tt>unzip</tt>: 4447dd7cddfSDavid du Colombier <td> 445*593dc095SDavid du Colombier <td><b><tt>unzip gs</tt></b>###<b><tt>src.zip</tt></b> 4467dd7cddfSDavid du Colombier</table></blockquote> 4477dd7cddfSDavid du Colombier 4487dd7cddfSDavid du Colombier<p> 4497dd7cddfSDavid du ColombierAll the Ghostscript source files are now in subdirectories of the gs 4507dd7cddfSDavid du Colombierdirectory. 4517dd7cddfSDavid du Colombier 4527dd7cddfSDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0> 4537dd7cddfSDavid du Colombier<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">Source subdirectories</font><hr> 4547dd7cddfSDavid du Colombier<tr> <th valign=bottom align=left>Subdirectory 4557dd7cddfSDavid du Colombier <td> 4567dd7cddfSDavid du Colombier <th valign=bottom align=left>Contents 4577dd7cddfSDavid du Colombier<tr> <td colspan=5><hr> 4587dd7cddfSDavid du Colombier<tr> <td><b><tt>src/</tt></b> 4597dd7cddfSDavid du Colombier <td> 4607dd7cddfSDavid du Colombier <td>C source code and makefiles 4617dd7cddfSDavid du Colombier<tr> <td><b><tt>lib/</tt></b> 4627dd7cddfSDavid du Colombier <td> 4637dd7cddfSDavid du Colombier <td>PostScript files and scripts used when running Ghostscript 4647dd7cddfSDavid du Colombier<tr> <td><b><tt>doc/</tt></b> 4657dd7cddfSDavid du Colombier <td> 4667dd7cddfSDavid du Colombier <td>Documentation 4677dd7cddfSDavid du Colombier<tr> <td><b><tt>man/</tt></b> 4687dd7cddfSDavid du Colombier <td> 4697dd7cddfSDavid du Colombier <td>Unix <b><tt>man</tt></b> pages 4707dd7cddfSDavid du Colombier<tr> <td><b><tt>examples/</tt></b> 4717dd7cddfSDavid du Colombier <td> 4727dd7cddfSDavid du Colombier <td>Sample PostScript files 4737dd7cddfSDavid du Colombier</table></blockquote> 4747dd7cddfSDavid du Colombier 4753ff48bf5SDavid du Colombier<h3><a name="Unpack_libraries"></a>How to unpack the third-party libraries</h3> 4767dd7cddfSDavid du Colombier 4777dd7cddfSDavid du Colombier<p> 4787dd7cddfSDavid du ColombierThe Ghostscript makefiles expect to find the JPEG, PNG, and zlib source code 4797dd7cddfSDavid du Colombierin specific subdirectories of the <b><tt>gs</tt></b> directory, and this 4807dd7cddfSDavid du Colombiermeans you must pay careful attention to unpacking the source code for these 4817dd7cddfSDavid du Colombierpackages. Use the same method for all of them, no matter how they're 4827dd7cddfSDavid du Colombierpackaged: 4837dd7cddfSDavid du Colombier 4847dd7cddfSDavid du Colombier<ol> 4857dd7cddfSDavid du Colombier<li>Make the gs directory current. 4867dd7cddfSDavid du Colombier<li>Unpack the archive file, creating a subdirectory (which will include a 4877dd7cddfSDavid du Colombierversion number). 4887dd7cddfSDavid du Colombier<li>Whatever the subdirectory's original name, rename it to the versionless 4897dd7cddfSDavid du Colombiername shown just below. 4907dd7cddfSDavid du Colombier</ol> 4917dd7cddfSDavid du Colombier 4927dd7cddfSDavid du Colombier<p> 4937dd7cddfSDavid du ColombierIf you're uncertain how to unpack an archive, review the sections on <a 4947dd7cddfSDavid du Colombierhref="#Tarfiles">compressed tar files</a> and <a href="#Zipfiles">zip 4957dd7cddfSDavid du Colombierfiles</a>. 4967dd7cddfSDavid du Colombier 4977dd7cddfSDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0> 4987dd7cddfSDavid du Colombier<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">3d-party software subdirectories</font><hr> 4997dd7cddfSDavid du Colombier<tr> <th valign=bottom align=left>Package 5007dd7cddfSDavid du Colombier <td> 5017dd7cddfSDavid du Colombier <th valign=bottom align=left>Possible<br>original name 5027dd7cddfSDavid du Colombier <td> 5037dd7cddfSDavid du Colombier <th valign=bottom align=left>Rename to 5047dd7cddfSDavid du Colombier<tr> <td colspan=5><hr> 5057dd7cddfSDavid du Colombier<tr> <td>JPEG 5067dd7cddfSDavid du Colombier <td> 5077dd7cddfSDavid du Colombier <td><b><tt>./jpeg-6b</tt></b> 5087dd7cddfSDavid du Colombier <td> 5097dd7cddfSDavid du Colombier <td><b><tt>./jpeg</tt></b> 5107dd7cddfSDavid du Colombier<tr> <td>PNG 5117dd7cddfSDavid du Colombier <td> 5127dd7cddfSDavid du Colombier <td><b><tt>./libpng-</tt></b>#.## 5137dd7cddfSDavid du Colombier <td> 5147dd7cddfSDavid du Colombier <td><b><tt>./libpng</tt></b> 5157dd7cddfSDavid du Colombier<tr> <td>zlib 5167dd7cddfSDavid du Colombier <td> 5177dd7cddfSDavid du Colombier <td><b><tt>./zlib-</tt></b>#.#.# 5187dd7cddfSDavid du Colombier <td> 5197dd7cddfSDavid du Colombier <td><b><tt>./zlib</tt></b> 5207dd7cddfSDavid du Colombier</table></blockquote> 5217dd7cddfSDavid du Colombier 5227dd7cddfSDavid du Colombier<hr> 5237dd7cddfSDavid du Colombier 5243ff48bf5SDavid du Colombier<h2><a name="Bug_check"></a>How to check for post-release bug fixes</h2> 5257dd7cddfSDavid du Colombier 5267dd7cddfSDavid du Colombier<p> 527*593dc095SDavid du ColombierBug information and fixes are tracked on Ghostscript Bugzilla. 5283ff48bf5SDavid du ColombierFor more information, please visit 5297dd7cddfSDavid du Colombier 5307dd7cddfSDavid du Colombier<blockquote> 531*593dc095SDavid du Colombier<a href="http://bugs.ghostscript.com"> 532*593dc095SDavid du Colombierhttp://bugs.ghostscript.com</a> 5337dd7cddfSDavid du Colombier</blockquote> 5347dd7cddfSDavid du Colombier 5357dd7cddfSDavid du Colombier<hr> 5367dd7cddfSDavid du Colombier 5373ff48bf5SDavid du Colombier<h2><a name="Makefile_overview"></a>How to prepare the makefiles</h2> 5387dd7cddfSDavid du Colombier 5397dd7cddfSDavid du Colombier<p> 5407dd7cddfSDavid du ColombierThe Ghostscript makefiles are very large and complex in order to deal with 5417dd7cddfSDavid du Colombierthe diverse requirements of all the different systems where they may be 5423ff48bf5SDavid du Colombierused. 5433ff48bf5SDavid du Colombier 5443ff48bf5SDavid du Colombier<p> 545*593dc095SDavid du ColombierGhostscript has an automatic configuration script. If you're on unix or 546*593dc095SDavid du Colombiera system that supports unix shell scripts, this is the easiest option to use. 5473ff48bf5SDavid du ColombierSimply type: 5483ff48bf5SDavid du Colombier 549*593dc095SDavid du Colombier<blockquote><pre> 550*593dc095SDavid du Colombier./configure 5513ff48bf5SDavid du Colombier</blockquote> 5523ff48bf5SDavid du Colombier 5533ff48bf5SDavid du Colombierfrom the top level of the ghostscript source directory. It should configure 5543ff48bf5SDavid du Colombieritself based on what's available on your system, warn you of any missing 5553ff48bf5SDavid du Colombierdependencies, and generate a Makefile. At this point you can skip to the 556*593dc095SDavid du Colombiersection <a href="#Invoke_make">invoking make</a> below. Also, many common 557*593dc095SDavid du Colombierconfiguration options (like install location) can be set through options 558*593dc095SDavid du Colombierto the configure script. Type '<tt>./configure --help</tt>' for a complete 559*593dc095SDavid du Colombierlisting. Note that the configuration option is only available with the 560*593dc095SDavid du Colombierunix .tar distributions of the source. 561*593dc095SDavid du Colombier 562*593dc095SDavid du Colombier<p> 563*593dc095SDavid du ColombierNote that if you're building Ghostscript from development source out of 564*593dc095SDavid du Colombiera repository instead of from a released source package, you should run 565*593dc095SDavid du Colombier'<tt>./autogen.sh</tt>' instead of <tt>./configure.</tt> This script 566*593dc095SDavid du Colombiertakes all the same options that configure does. 5673ff48bf5SDavid du Colombier 5683ff48bf5SDavid du Colombier<p> 5693ff48bf5SDavid du ColombierIf your system doesn't support the configure script or you don't wish to 5703ff48bf5SDavid du Colombieruse it, you can use the traditional ghostscript makefile system, editing 5713ff48bf5SDavid du Colombierthe options by hand to match your system as described below. 5723ff48bf5SDavid du ColombierFortunately, the only makefiles you're likely to want to change are 5737dd7cddfSDavid du Colombierrelatively small ones containing platform-specific information. 5747dd7cddfSDavid du Colombier 5757dd7cddfSDavid du Colombier<blockquote><a name="Platform-specific_makefiles"></a><table cellpadding=0 cellspacing=0> 5767dd7cddfSDavid du Colombier<tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Platform-specific makefiles</font><hr> 5777dd7cddfSDavid du Colombier<tr> <th align=left>Makefile 5787dd7cddfSDavid du Colombier <td> 5797dd7cddfSDavid du Colombier <th align=left>Used for 5807dd7cddfSDavid du Colombier<tr> <td colspan=3><hr> 581*593dc095SDavid du Colombier<tr> <td><b><tt>Makefile.in</tt></b> 582*593dc095SDavid du Colombier <td> 583*593dc095SDavid du Colombier <td>Template makefile for the autoconf build 5847dd7cddfSDavid du Colombier<tr> <td><b><tt>bcwin32.mak</tt></b> 5857dd7cddfSDavid du Colombier <td> 5867dd7cddfSDavid du Colombier <td>MS Windows with Borland/Inprise compilers 5877dd7cddfSDavid du Colombier<tr> <td><b><tt>msvc32.mak</tt></b> 5887dd7cddfSDavid du Colombier <td> 589*593dc095SDavid du Colombier <td>MS Windows with Microsoft Visual C++ version 4 to 7. 5907dd7cddfSDavid du Colombier<tr> <td><b><tt>openvms.mak</tt></b> 5917dd7cddfSDavid du Colombier <td> 5927dd7cddfSDavid du Colombier <td>OpenVMS 5937dd7cddfSDavid du Colombier<tr> <td><b><tt>os2.mak</tt></b> 5947dd7cddfSDavid du Colombier <td> 5957dd7cddfSDavid du Colombier <td>OS/2 with the gcc/emx compiler 5967dd7cddfSDavid du Colombier<tr> <td><b><tt>unix-gcc.mak</tt></b> 5977dd7cddfSDavid du Colombier <td> 5987dd7cddfSDavid du Colombier <td>Unix with gcc 5997dd7cddfSDavid du Colombier<tr> <td><b><tt>unixansi.mak</tt></b> 6007dd7cddfSDavid du Colombier <td> 6017dd7cddfSDavid du Colombier <td>Unix with ANSI C compilers other than gcc 6027dd7cddfSDavid du Colombier<tr> <td><b><tt>watcw32.mak</tt></b> 6037dd7cddfSDavid du Colombier <td> 6047dd7cddfSDavid du Colombier <td>MS Windows with Watcom compilers 6057dd7cddfSDavid du Colombier<tr> <td> 6067dd7cddfSDavid du Colombier<tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Platform-independent makefiles</font><hr> 6077dd7cddfSDavid du Colombier<tr> <td><b><tt>contrib.mak</tt></b> 6087dd7cddfSDavid du Colombier <td> 6097dd7cddfSDavid du Colombier <td>Contributed device drivers 6107dd7cddfSDavid du Colombier<tr> <td><b><tt>devs.mak</tt></b> 6117dd7cddfSDavid du Colombier <td> 6123ff48bf5SDavid du Colombier <td>Maintained device drivers 6137dd7cddfSDavid du Colombier<tr> <td><b><tt>gs.mak</tt></b> 6147dd7cddfSDavid du Colombier <td> 6157dd7cddfSDavid du Colombier <td>Documentation and miscellany 616*593dc095SDavid du Colombier<tr> <td><b><tt>icclib.mak</tt></b> 617*593dc095SDavid du Colombier <td> 618*593dc095SDavid du Colombier <td>ICC color correction library 619*593dc095SDavid du Colombier<tr> <td><b><tt>ijs.mak</tt></b> 620*593dc095SDavid du Colombier <td> 621*593dc095SDavid du Colombier <td>IJS raster driver library 6227dd7cddfSDavid du Colombier<tr> <td><b><tt>int.mak</tt></b> 6237dd7cddfSDavid du Colombier <td> 6247dd7cddfSDavid du Colombier <td>Main makefile for the PostScript & PDF interpreter 6257dd7cddfSDavid du Colombier<tr> <td><b><tt>jpeg.mak</tt></b> 6267dd7cddfSDavid du Colombier <td> 6277dd7cddfSDavid du Colombier <td>JPEG library 6287dd7cddfSDavid du Colombier<tr> <td><b><tt>lib.mak</tt></b> 6297dd7cddfSDavid du Colombier <td> 6307dd7cddfSDavid du Colombier <td>Graphics engine 6317dd7cddfSDavid du Colombier<tr> <td><b><tt>libpng.mak</tt></b> 6327dd7cddfSDavid du Colombier <td> 6337dd7cddfSDavid du Colombier <td>PNG library 6347dd7cddfSDavid du Colombier<tr> <td><b><tt>version.mak</tt></b> 6357dd7cddfSDavid du Colombier <td> 6367dd7cddfSDavid du Colombier <td>Version and release date 6377dd7cddfSDavid du Colombier<tr> <td><b><tt>zlib.mak</tt></b> 6387dd7cddfSDavid du Colombier <td> 6397dd7cddfSDavid du Colombier <td>zlib library 6407dd7cddfSDavid du Colombier</table></blockquote> 6417dd7cddfSDavid du Colombier 6427dd7cddfSDavid du Colombier<p> 6437dd7cddfSDavid du ColombierSince these files change from one Ghostscript version to another, sometimes 6447dd7cddfSDavid du Colombiersubstantially, and since they all include documentation for the various 6457dd7cddfSDavid du Colombieroptions, here we don't duplicate most of that documentation: we recommend 6467dd7cddfSDavid du Colombierstrongly that you review the entire makefile specific for your operating 6477dd7cddfSDavid du Colombiersystem and compiler before building Ghostscript. 6487dd7cddfSDavid du Colombier 6493ff48bf5SDavid du Colombier<h3><a name="Preparing_makefiles"></a>Changes for your environment</h3> 6507dd7cddfSDavid du Colombier 6517dd7cddfSDavid du Colombier<p> 6527dd7cddfSDavid du ColombierYou must edit the platform-specific makefile to change any of these: 6537dd7cddfSDavid du Colombier 6547dd7cddfSDavid du Colombier<ul> 6557dd7cddfSDavid du Colombier<li>The name of the makefile itself (<b><tt>MAKEFILE</tt></b> macro) 6567dd7cddfSDavid du Colombier<li>The locations to install Ghostscript files (<b><tt>prefix</tt></b> etc.) 6577dd7cddfSDavid du Colombier<li>The default search paths for the initialization and font files 6587dd7cddfSDavid du Colombier(<b><tt>GS_LIB_DEFAULT</tt></b> macro) 6597dd7cddfSDavid du Colombier<li>The debugging options (<b><tt>DEBUG</tt></b> and <b><tt>TDEBUG</tt></b> 6607dd7cddfSDavid du Colombiermacros) 6617dd7cddfSDavid du Colombier<li>Which optional features to include (<b><tt>FEATURE_DEVS</tt></b>) 6627dd7cddfSDavid du Colombier<li>Which device drivers to include (<b><tt>DEVICE_DEVS</tt></b> and 6637dd7cddfSDavid du Colombier<b><tt>DEVICE_DEVS</tt></b>{<em>1--20</em>} macros) 6647dd7cddfSDavid du Colombier<li>Default resolution parameters for some printer drivers 6657dd7cddfSDavid du Colombier(<b><tt>devs.mak</tt></b> or <b><tt>contrib.mak</tt></b>, whichever defines 6667dd7cddfSDavid du Colombierthe driver) 6677dd7cddfSDavid du Colombier 6687dd7cddfSDavid du Colombier</ul> 6697dd7cddfSDavid du Colombier 6707dd7cddfSDavid du Colombier<p> 6717dd7cddfSDavid du ColombierThe <a href="#Platform-specific_makefiles">platform-specific makefiles</a> 6727dd7cddfSDavid du Colombierinclude comments describing all these except the 6737dd7cddfSDavid du Colombier<b><tt>DEVICE_DEVS</tt></b> options. These are described in 6747dd7cddfSDavid du Colombier<b><tt>devs.mak</tt></b> and <b><tt>contrib.mak</tt></b>, even though the 6757dd7cddfSDavid du Colombierfile that must be edited to select them is the <a 676*593dc095SDavid du Colombierhref="#Platform-specific_makefiles">platform-specific makefile</a>. Check 677*593dc095SDavid du Colombieralso the <b><tt>JVERSION</tt></b> and <b><tt>PVERSION</tt></b> macros in 678*593dc095SDavid du Colombierthe platform-specific makefile, and adjust them if they don't match the 679*593dc095SDavid du ColombierJPEG and PNG library versions you're using: see <b><tt>jpeg.mak</tt></b> 680*593dc095SDavid du Colombierand <b><tt>libpng.mak</tt></b> for more information. 6817dd7cddfSDavid du Colombier 6827dd7cddfSDavid du Colombier<p> 6837dd7cddfSDavid du ColombierSome platform-specific options are described in the sections for individual 6847dd7cddfSDavid du Colombierplatforms. See the "Options" section near the beginning of the relevant 6857dd7cddfSDavid du Colombiermakefile for more information. 6867dd7cddfSDavid du Colombier 6873ff48bf5SDavid du Colombier<h3><a name="Features_and_devices"></a>Selecting features and devices</h3> 6887dd7cddfSDavid du Colombier 6897dd7cddfSDavid du Colombier<p> 6907dd7cddfSDavid du ColombierYou may build Ghostscript with any of a variety of features and with any 6917dd7cddfSDavid du Colombiersubset of the available device drivers. The complete list of features is 6927dd7cddfSDavid du Colombierin a comment at the beginning of <b><tt>gs.mak</tt></b>, and the complete 6937dd7cddfSDavid du Colombierlist of drivers in comments at the beginning of <b><tt>devs.mak</tt></b> 6947dd7cddfSDavid du Colombierand <b><tt>contrib.mak</tt></b>. To find what devices a platform-specific 6957dd7cddfSDavid du Colombiermakefile selects to include in the executable, look in it for all lines of 6967dd7cddfSDavid du Colombierthe form 6977dd7cddfSDavid du Colombier 6987dd7cddfSDavid du Colombier<blockquote> 6997dd7cddfSDavid du Colombier<b><tt>FEATURE_DEVS=</tt></b><em>{list of features}</em><br> 7007dd7cddfSDavid du Colombier<b><tt>DEVICE_DEVS</tt></b>*<b><tt>=</tt></b><em>{list of devices}</em> 7017dd7cddfSDavid du Colombier</blockquote> 7027dd7cddfSDavid du Colombier 7037dd7cddfSDavid du Colombier<p> 7047dd7cddfSDavid du ColombierFor example, if the makefile has 7057dd7cddfSDavid du Colombier 7067dd7cddfSDavid du Colombier<blockquote><b><tt> 7077dd7cddfSDavid du ColombierFEATURE_DEVS=$(PSD)level2.dev 7087dd7cddfSDavid du Colombier</tt></b></blockquote> 7097dd7cddfSDavid du Colombier 7107dd7cddfSDavid du Colombier<p> 7117dd7cddfSDavid du Colombierindicating that only the PostScript Level 2 facilities should be included, 7127dd7cddfSDavid du Colombieryou might make it 7137dd7cddfSDavid du Colombier 7147dd7cddfSDavid du Colombier<blockquote><b><tt> 7157dd7cddfSDavid du ColombierFEATURE_DEVS=$(PSD)level2.dev $(PSD)pdf.dev 7167dd7cddfSDavid du Colombier</tt></b></blockquote> 7177dd7cddfSDavid du Colombier 7187dd7cddfSDavid du Colombier<p> 7197dd7cddfSDavid du Colombierto add the ability to interpret PDF files. (In fact, 7207dd7cddfSDavid du Colombier<b><tt>FEATURE_DEVS</tt></b> in the current Unix makefiles already includes 7217dd7cddfSDavid du Colombier<b><tt>$(PSD)pdf.dev</tt></b>.) The Unix makefile also defines 7227dd7cddfSDavid du Colombier 7237dd7cddfSDavid du Colombier<blockquote><b><tt> 7247dd7cddfSDavid du ColombierDEVICE_DEVS=$(DD)x11.dev 7257dd7cddfSDavid du Colombier</tt></b></blockquote> 7267dd7cddfSDavid du Colombier 7277dd7cddfSDavid du Colombier<p> 7287dd7cddfSDavid du Colombierindicating that the X Windows driver should be included, but since 7297dd7cddfSDavid du Colombierplatform-specific makefiles as distributed normally include many of the 7307dd7cddfSDavid du Colombierpossible features and drivers, you will probably rather remove from the 7317dd7cddfSDavid du Colombiermakefile the features and drivers you don't want. It does no harm to 7327dd7cddfSDavid du Colombierinclude unneeded features and devices, but the resulting executable will be 7337dd7cddfSDavid du Colombierlarger than needed. 7347dd7cddfSDavid du Colombier 7357dd7cddfSDavid du Colombier<p> 7367dd7cddfSDavid du ColombierYou may edit the <b><tt>FEATURE_DEVS</tt></b> line to select or omit any of 7377dd7cddfSDavid du Colombierthe features listed near the beginning of <b><tt>gs.mak</tt></b>, and the 7387dd7cddfSDavid du Colombier<b><tt>DEVICE_DEVS</tt></b>* lines to select or omit any of the device 7397dd7cddfSDavid du Colombierdrivers listed near the beginning of <b><tt>devs.mak</tt></b> and 7407dd7cddfSDavid du Colombier<b><tt>contrib.mak</tt></b>. The first device listed in the definition of 7417dd7cddfSDavid du Colombier<b><tt>DEVICE_DEVS</tt></b> becomes the default device for this executable; 7427dd7cddfSDavid du Colombiersee the usage documentation for <a href="Use.htm#Output_device">how to 7437dd7cddfSDavid du Colombierselect an output device</a> at run time using the 7447dd7cddfSDavid du Colombier<a href="Use.htm#DEVICE_switch"><b><tt>-sDEVICE=</tt></b></a> switch. If 7457dd7cddfSDavid du Colombieryou can't fit all the devices on a single line, you may add lines defining 7467dd7cddfSDavid du Colombier 7477dd7cddfSDavid du Colombier<blockquote> 7487dd7cddfSDavid du Colombier<b><tt>DEVICE_DEVS1=$(DD)</tt></b><em>{dev11}</em><b><tt>.dev</tt></b> ... <b><tt>$(DD)</tt></b><em>{dev1n}</em><b><tt>.dev</tt></b> 7497dd7cddfSDavid du Colombier<br><b><tt>DEVICE_DEVS2=$(DD)</tt></b><em>{dev21}</em><b><tt>.dev</tt></b> ... <b><tt>$(DD)</tt></b><em>{dev2n}</em><b><tt>.dev</tt></b> 7507dd7cddfSDavid du Colombier</blockquote> 7517dd7cddfSDavid du Colombier 7527dd7cddfSDavid du Colombier<p> 7537dd7cddfSDavid du Colombieretc., up to <b><tt>DEVICE_DEVS15</tt></b>. Don't use continuation lines -- 7547dd7cddfSDavid du Colombieron some platforms they don't work. 7557dd7cddfSDavid du Colombier 7567dd7cddfSDavid du Colombier<p> 7577dd7cddfSDavid du ColombierNote that if you want to include a driver named <em>xxx</em>, you must put 7587dd7cddfSDavid du Colombier<b><tt>$(DD)</tt></b><em>xxx</em><b><tt>.dev</tt></b> in 7597dd7cddfSDavid du Colombier<b><tt>DEVICE_DEVS</tt></b>*. Similarly, if you want to include a feature 7607dd7cddfSDavid du Colombierrelated to the PostScript or PDF language interpreters (PostScript level 7617dd7cddfSDavid du Colombier1 .. 3, or other language features such as the ability to read EPSF files or 7627dd7cddfSDavid du ColombierTrueType font files), you must represent it as 7637dd7cddfSDavid du Colombier<b><tt>$(PSD)</tt></b><em>xxx</em><b><tt>.dev</tt></b>. If you are linking 7647dd7cddfSDavid du Colombieronly the graphics library -- not the language interpreter(s) -- with an 7657dd7cddfSDavid du Colombierapplication and want to include optional graphics library features such as 7667dd7cddfSDavid du ColombierCIE color, you represent them as 7677dd7cddfSDavid du Colombier<b><tt>$(GLD)</tt></b><em>xxx</em><b><tt>.dev</tt></b>. 7687dd7cddfSDavid du Colombier 7693ff48bf5SDavid du Colombier<h4><a name="Precompiled_data"></a>Precompiled run-time data</h4> 7707dd7cddfSDavid du Colombier 7717dd7cddfSDavid du Colombier<p> 7727dd7cddfSDavid du ColombierGhostscript normally reads a number of external data files at run time: 7737dd7cddfSDavid du Colombierinitialization files containing PostScript code, fonts, and other resources 7747dd7cddfSDavid du Colombiersuch as halftones. By changing options in the top-level makefile for the 7757dd7cddfSDavid du Colombierplatform, you can cause some of these files to be compiled into the 7767dd7cddfSDavid du Colombierexecutable: this simplifies installation, improves security, may reduce 7777dd7cddfSDavid du Colombiermemory requirements, and may be essential if you are planning on putting 7787dd7cddfSDavid du ColombierGhostscript into ROM. 7797dd7cddfSDavid du Colombier 7807dd7cddfSDavid du Colombier<p> 7817dd7cddfSDavid du ColombierTo compile the initialization files (<b><tt>lib/gs_init.ps</tt></b>, etc.) 7827dd7cddfSDavid du Colombierinto the executable, change the <b><tt>0</tt></b> to a <b><tt>1</tt></b> in 7837dd7cddfSDavid du Colombierthe line 7847dd7cddfSDavid du Colombier 7857dd7cddfSDavid du Colombier<blockquote><b><tt> 7867dd7cddfSDavid du ColombierCOMPILE_INITS=0 7877dd7cddfSDavid du Colombier</tt></b></blockquote> 7887dd7cddfSDavid du Colombier 7897dd7cddfSDavid du Colombier<p> 790*593dc095SDavid du ColombierCompiled initialization includes the default font map. 791*593dc095SDavid du ColombierIt is used only if Ghostscript cannot find or open the default font 792*593dc095SDavid du Colombiermap file at run time. 793*593dc095SDavid du Colombier 794*593dc095SDavid du Colombier<p> 7957dd7cddfSDavid du ColombierTo compile fonts into the executable, see <a 7967dd7cddfSDavid du Colombierhref="Fonts.htm#Precompiling">Precompiling fonts</a>. 7977dd7cddfSDavid du Colombier 7987dd7cddfSDavid du Colombier<p> 7997dd7cddfSDavid du ColombierTo compile threshold-array halftones into the executable, see the "Compiled 8007dd7cddfSDavid du Colombierhalftone" section of <b><tt>int.mak</tt></b> for a sample makefile fragment, 8017dd7cddfSDavid du Colombier<b><tt>genht.c</tt></b> for the syntax of halftone data files, and 8027dd7cddfSDavid du Colombier<b><tt>lib/ht_ccsto.ps</tt></b> for a sample data file. Note that even 8037dd7cddfSDavid du Colombierthough the data files use PostScript syntax, compiled halftones do not 8047dd7cddfSDavid du Colombierrequire the PostScript interpreter and may be used with the graphics library 8057dd7cddfSDavid du Colombieralone. 8067dd7cddfSDavid du Colombier 8073ff48bf5SDavid du Colombier<h4><a name="GNU_readline"></a>GNU readline</h4> 8087dd7cddfSDavid du Colombier 8097dd7cddfSDavid du Colombier<p> 8103ff48bf5SDavid du ColombierAFPL Ghostscript does not include an interface to GNU readline. A user 8117dd7cddfSDavid du Colombiercontributed code for this purpose, which we spent significant time debugging 8127dd7cddfSDavid du Colombierand then updating to track internal architectural changes in Ghostscript. 8133ff48bf5SDavid du ColombierThe contributor was willing to assign the copyright to Aladdin Enterprises 8143ff48bf5SDavid du Colombier(the copyright holder of Ghostscript at the time), and to allow the code to 8153ff48bf5SDavid du Colombierbe distributed with the Aladdin Free Public License (AFPL) as well as the 8163ff48bf5SDavid du ColombierGNU License (GPL). However, even though the GPL allows linking GPLed code 8173ff48bf5SDavid du Colombier(such as the GNU readline library package) with non-GPLed code (such as all 8183ff48bf5SDavid du Colombierthe rest of AFPL Ghostscript) if one doesn't distribute the result, the Free 8193ff48bf5SDavid du ColombierSoftware Foundation, creators of the GPL, have told us that in their 8203ff48bf5SDavid du Colombieropinion, the GPL forbids distributing non-GPLed code that is merely 8213ff48bf5SDavid du Colombier<em>intended</em> to be linked with GPLed code. We understand that FSF 8223ff48bf5SDavid du Colombiertakes this position in order to prevent the construction of software that is 8233ff48bf5SDavid du Colombierpartly GPLed and partly not GPLed, even though the text of the GPL does not 8243ff48bf5SDavid du Colombieractually forbid this (it only forbids <em>distribution</em> of such 8253ff48bf5SDavid du Colombiersoftware). We think that FSF's position is legally questionable and not in 8263ff48bf5SDavid du Colombierthe best interest of users, but we do not have the resources to challenge 8273ff48bf5SDavid du Colombierit, especially since FSF's attorney apparently supports it. Therefore, even 8283ff48bf5SDavid du Colombierthough we added the user-contributed interface to GNU readline in internal 8293ff48bf5SDavid du ColombierAladdin Ghostscript version 5.71 and had it working in version 5.93 (one of 8303ff48bf5SDavid du Colombierthe last beta versions before the 6.0 release), we removed it from the 8313ff48bf5SDavid du ColombierAladdin Ghostscript 6.0 distribution. 8327dd7cddfSDavid du Colombier 8337dd7cddfSDavid du Colombier<p> 834*593dc095SDavid du ColombierGPL Ghostscript distributions will include support for GNU readline. As 835*593dc095SDavid du Colombierwith other GPL Ghostscript components that are not included in AFPL 8363ff48bf5SDavid du ColombierGhostscript, the maintainers of Ghostscript will not attempt to run, link, 8373ff48bf5SDavid du Colombieror even compile this code, or keep it current across changes in the rest of 8383ff48bf5SDavid du ColombierGhostscript. We will, however, welcome bug fixes or updates, and distribute 839*593dc095SDavid du Colombierthem with subsequent releases of GPL Ghostscript. 8407dd7cddfSDavid du Colombier 8417dd7cddfSDavid du Colombier<p> 842*593dc095SDavid du ColombierThe first Ghostscript distribution to include GPL readline 843*593dc095SDavid du Colombiersupport was GNU Ghostscript 6.0. Support has unfortunately 844*593dc095SDavid du Colombierbeen spotty since then. 8457dd7cddfSDavid du Colombier 8467dd7cddfSDavid du Colombier<p> 8477dd7cddfSDavid du ColombierWe put considerable work into making it possible for Ghostscript to use GNU 8487dd7cddfSDavid du Colombierreadline, including the creation and adjustment of internal software 8497dd7cddfSDavid du Colombierinterfaces specifically to serve this purpose. In principle, we should have 8503ff48bf5SDavid du Colombierundone this work in AFPL Ghostscript, lest FSF object to it too as 8513ff48bf5SDavid du Colombierintended to facilitate linking AFPL Ghostscript with GNU readline (as the 8527dd7cddfSDavid du ColombierU.S. government has been said to do for code that merely provides APIs where 8537dd7cddfSDavid du Colombierencryption may be added). However, we are willing to take this risk rather 8547dd7cddfSDavid du Colombierthan spend the time to undo the interface changes. 8557dd7cddfSDavid du Colombier 8567dd7cddfSDavid du Colombier<p> 8577dd7cddfSDavid du ColombierIf you have comments or questions about this situation, please feel free to 8587dd7cddfSDavid du Colombiercontact the Free Software Foundation, authors of the GPL and copyright 8599a747e4fSDavid du Colombierholders of GNU readline, at <a href="mailto:gnu@gnu.org">gnu@gnu.org</a>, 8603ff48bf5SDavid du Colombierand/or artofcode LLC, copyright holder of Ghostscript, at <a 8613ff48bf5SDavid du Colombierhref="mailto:raph@artofcode.com">raph@artofcode.com</a>. 8627dd7cddfSDavid du Colombier 8633ff48bf5SDavid du Colombier<h3><a name="Makefile_setup"></a>Setting up "makefile"</h3> 8647dd7cddfSDavid du Colombier 8657dd7cddfSDavid du Colombier<p> 8663ff48bf5SDavid du ColombierAfter going through the steps just described to <a href="#Unpack">unpack 8673ff48bf5SDavid du Colombierthe 868*593dc095SDavid du Colombiersources</a>, configure the build and make any desired 869*593dc095SDavid du Colombier<a href="#Preparing_makefiles">changes to the 8707dd7cddfSDavid du Colombiermakefiles</a>, and unpack or create links to the <a 8717dd7cddfSDavid du Colombierhref="#Unpack_libraries">third party libraries</a>, as the final step in 8727dd7cddfSDavid du Colombierpreparing to build Ghostscript you must usually associate the name 8737dd7cddfSDavid du Colombier"<b><tt>makefile</tt></b>" with the correct makefile for your environment so 8747dd7cddfSDavid du Colombierthe <b><tt>make</tt></b> command can find it. See the section on your 8757dd7cddfSDavid du Colombierparticular platform for how to do that if necessary. 8767dd7cddfSDavid du Colombier 8773ff48bf5SDavid du Colombier<h3><a name="Invoke_make"></a>Invoking "make"</h3> 8787dd7cddfSDavid du Colombier 8797dd7cddfSDavid du Colombier<dl> 8807dd7cddfSDavid du Colombier<dt><b><tt>make</tt></b> 8817dd7cddfSDavid du Colombier<dd>Builds Ghostscript without debugging options. 8827dd7cddfSDavid du Colombier</dl> 8837dd7cddfSDavid du Colombier 8847dd7cddfSDavid du Colombier<dl> 8857dd7cddfSDavid du Colombier<dt><a name="Debugging"></a><b><tt>make debug</tt></b> 8867dd7cddfSDavid du Colombier<dd>Builds Ghostscript with debugging options and additional internal error 8877dd7cddfSDavid du Colombierchecks. The program will be somewhat larger and slower, but it will behave 8887dd7cddfSDavid du Colombierno differently unless you actually turn on debugging options at execution 8897dd7cddfSDavid du Colombiertime with the <b><tt>-DDEBUG</tt></b> or 8907dd7cddfSDavid du Colombier<a href="Use.htm#Debugging"><b><tt>-Z</tt></b> command line switches</a> 8917dd7cddfSDavid du Colombierdescribed in the usage documentation. 8927dd7cddfSDavid du Colombier</dl> 8937dd7cddfSDavid du Colombier 8947dd7cddfSDavid du Colombier<dl> 8957dd7cddfSDavid du Colombier<dt><b><tt>make pg</tt></b> 8967dd7cddfSDavid du Colombier<dd>On Unix platforms, builds with the <b><tt>-pg</tt></b> compiler 8977dd7cddfSDavid du Colombierswitch, creating an executable for time profiling. 8987dd7cddfSDavid du Colombier</dl> 8997dd7cddfSDavid du Colombier 9007dd7cddfSDavid du Colombier<dl> 9017dd7cddfSDavid du Colombier<dt><b><tt>make begin</tt></b> 9027dd7cddfSDavid du Colombier<dd>On PC platforms, attempts a quick and dirty compilation of all the 9037dd7cddfSDavid du Colombier<b><tt>.c</tt></b> files in the current directory. See the 9047dd7cddfSDavid du Colombier<a href="#Make_begin">more detailed explanation</a>. 9057dd7cddfSDavid du Colombier</dl> 9067dd7cddfSDavid du Colombier 9077dd7cddfSDavid du Colombier<dl> 9087dd7cddfSDavid du Colombier<dt><b><tt>make install</tt></b> 9097dd7cddfSDavid du Colombier<dd>After building, installs the Ghostscript executables, support files, 9107dd7cddfSDavid du Colombierand documentation, but does <b><em>not</em></b> install fonts. See the 9117dd7cddfSDavid du Colombier<a href="Install.htm">installation documentation</a>. 9127dd7cddfSDavid du Colombier</dl> 9137dd7cddfSDavid du Colombier 9147dd7cddfSDavid du Colombier<dl> 9157dd7cddfSDavid du Colombier<dt><b><tt>make clean</tt></b> 9167dd7cddfSDavid du Colombier<dd>Deletes all the files created by the build process (relocatables, 9177dd7cddfSDavid du Colombierexecutables, and miscellaneous temporary files). If you've built an 9187dd7cddfSDavid du Colombierexecutable and want to save it, move it first to another place, because 9197dd7cddfSDavid du Colombier"<b><tt>make clean</tt></b>" deletes it. 9207dd7cddfSDavid du Colombier</dl> 9217dd7cddfSDavid du Colombier 9227dd7cddfSDavid du Colombier<p> 9237dd7cddfSDavid du Colombier<b><em>Note:</em></b> on most platforms some of these simple instructions don't 9247dd7cddfSDavid du Colombierquite work in one way or another. Read the section on your specific 9257dd7cddfSDavid du Colombierplatform. 9267dd7cddfSDavid du Colombier 9273ff48bf5SDavid du Colombier<h3><a name="Cross-compiling"></a>Cross-compiling</h3> 9287dd7cddfSDavid du Colombier 9297dd7cddfSDavid du Colombier<p> 9307dd7cddfSDavid du ColombierIf you are compiling Ghostscript on machines <b>X1</b> ... <b>X</b><em>n</em> with 9317dd7cddfSDavid du Colombiercross-compilers that generate code for machine <b>Y</b>, you must first 9327dd7cddfSDavid du Colombierperform several extra steps on some machine <b>Z</b> (not necessarily of the 9337dd7cddfSDavid du Colombiersame type as either <b>X</b><em>i</em> or <b>Y</b>). First of all, choose a makefile 9347dd7cddfSDavid du Colombierappropriate for <b>Z</b> and edit it to reflect the run-time options you 9357dd7cddfSDavid du Colombierwish to include (<b><tt>FEATURE_DEVS</tt></b>, <b><tt>DEVICE_DEVS*</tt></b>, 9367dd7cddfSDavid du Colombierand any other relevant options), just as for non-cross-compilation. 9377dd7cddfSDavid du Colombier 9387dd7cddfSDavid du Colombier<p> 9397dd7cddfSDavid du ColombierIf <b>Z</b> runs Unix, perform the following steps: 9407dd7cddfSDavid du Colombier<ol> 9417dd7cddfSDavid du Colombier<li>On <b>Z</b>, 9427dd7cddfSDavid du Colombier<blockquote> 9437dd7cddfSDavid du Colombier<b><tt>make clean</tt></b><br> 9447dd7cddfSDavid du Colombier<b><tt>make obj/arch.h obj/genconf obj/echogs</tt></b> 9457dd7cddfSDavid du Colombier</blockquote> 9467dd7cddfSDavid du Colombier 9477dd7cddfSDavid du Colombier<li>Edit <b><tt>obj/arch.h</tt></b> to reflect the architecture of <b>Y</b>. 9487dd7cddfSDavid du Colombier 9497dd7cddfSDavid du Colombier<li>On <b>Z</b>, 9507dd7cddfSDavid du Colombier<blockquote> 9517dd7cddfSDavid du Colombier<b><tt>make CC=: CCLD=:</tt></b> 9527dd7cddfSDavid du Colombier</blockquote> 9537dd7cddfSDavid du Colombier 9547dd7cddfSDavid du Colombier<li>Copy the files <b><tt>obj/*.h</tt></b> from <b>Z</B> to the directory on 9557dd7cddfSDavid du Colombiereach <b>X</b><em>i</em> that will be used for compilation. 9567dd7cddfSDavid du Colombier 9577dd7cddfSDavid du Colombier<li>Extract from the file <b><tt>obj/ldt.tr</tt></b> (on <b>Z</b>) the list 9587dd7cddfSDavid du Colombierof <b><tt>.o</tt></b> files that will be linked: this gives the list of 9597dd7cddfSDavid du Colombiersource files that must be compiled. 9607dd7cddfSDavid du Colombier 9617dd7cddfSDavid du Colombier<li>Do the compilations on <b>X</b><em>i</em>. 9627dd7cddfSDavid du Colombier</ol> 9637dd7cddfSDavid du Colombier 9647dd7cddfSDavid du Colombier<p> 9657dd7cddfSDavid du ColombierIf <b>Z</b> runs some version of Microsoft Windows with Microsoft Visual 9667dd7cddfSDavid du ColombierC++, use the following steps. <em>NOTE: We have not actually tested 9677dd7cddfSDavid du Colombierthis.</em> 9687dd7cddfSDavid du Colombier 9697dd7cddfSDavid du Colombier<ol> 9707dd7cddfSDavid du Colombier<li>On <b>Z</b>, 9717dd7cddfSDavid du Colombier<blockquote> 9727dd7cddfSDavid du Colombier<b><tt>nmake clean</tt></b><br> 9737dd7cddfSDavid du Colombier<b><tt>nmake obj\arch.h obj\genconf.exe obj\echogs.exe</tt></b> 9747dd7cddfSDavid du Colombier</blockquote> 9757dd7cddfSDavid du Colombier 9767dd7cddfSDavid du Colombier<li>Edit <b><tt>obj\arch.h</tt></b> to reflect the architecture of <b>Y</b>. 9777dd7cddfSDavid du Colombier 9787dd7cddfSDavid du Colombier<li>On <b>Z</b>, 9797dd7cddfSDavid du Colombier<blockquote> 9807dd7cddfSDavid du Colombier<b><tt>nmake CC=rem LINK=rem</tt></b> 9817dd7cddfSDavid du Colombier</blockquote> 9827dd7cddfSDavid du Colombier 9837dd7cddfSDavid du Colombier<li>Copy the files <b><tt>obj\*.h</tt></b> from <b>Z</B> to the directory on 9847dd7cddfSDavid du Colombiereach <b>X</b><em>i</em> that will be used for compilation. 9857dd7cddfSDavid du Colombier 9867dd7cddfSDavid du Colombier<li>Extract from the file <b><tt>obj\ldt.tr</tt></b> (on <b>Z</b>) the list 9877dd7cddfSDavid du Colombierof <b><tt>.obj</tt></b> files that will be linked: this gives the list of 9887dd7cddfSDavid du Colombiersource files that must be compiled. 9897dd7cddfSDavid du Colombier 9907dd7cddfSDavid du Colombier<li>Do the compilations on <b>X</b><em>i</em>. 9917dd7cddfSDavid du Colombier</ol> 9927dd7cddfSDavid du Colombier 9937dd7cddfSDavid du Colombier<hr> 9947dd7cddfSDavid du Colombier 9953ff48bf5SDavid du Colombier<h2><a name="PC_build"></a>How to build Ghostscript from source (PC version)</h2> 9967dd7cddfSDavid du Colombier 9977dd7cddfSDavid du Colombier<p> 9987dd7cddfSDavid du ColombierAll Ghostscript builds in PC (DOS and MS Windows) environments are 32- or 9997dd7cddfSDavid du Colombier64-bit: 16-bit builds are not supported. The relevant makefiles are 10007dd7cddfSDavid du Colombier 10017dd7cddfSDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0> 10027dd7cddfSDavid du Colombier<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">PC makefiles</font><hr> 10037dd7cddfSDavid du Colombier<tr> <th align=left>Makefile 10047dd7cddfSDavid du Colombier <td> 10057dd7cddfSDavid du Colombier <th align=left>Construction tools 10067dd7cddfSDavid du Colombier <td> 10077dd7cddfSDavid du Colombier <th align=left>For environment 10087dd7cddfSDavid du Colombier<tr> <td colspan=5><hr> 10097dd7cddfSDavid du Colombier<tr> <td valign=top><b><tt>bcwin32.mak</tt></b> 10107dd7cddfSDavid du Colombier <td> 10117dd7cddfSDavid du Colombier <td valign=top><a href="#Borland_build">Borland/Inprise C++ 4.x</a> 10127dd7cddfSDavid du Colombier <td> 10137dd7cddfSDavid du Colombier <td valign=top>32-bit MS Windows 3.1 + Win32s, 95, 98, NT 10147dd7cddfSDavid du Colombier<tr> <td valign=top><b><tt>msvc32.mak</tt></b> 10157dd7cddfSDavid du Colombier <td> 1016*593dc095SDavid du Colombier <td valign=top><a href="#Microsoft_build">Microsoft Visual C++ 4 to 8</a> 10177dd7cddfSDavid du Colombier <td> 10187dd7cddfSDavid du Colombier <td valign=top>MS Windows 32-bit 10197dd7cddfSDavid du Colombier<tr> <td valign=top><b><tt>watcw32.mak</tt></b> 10207dd7cddfSDavid du Colombier <td> 10217dd7cddfSDavid du Colombier <td valign=top><a href="#Watcom_build">Watcom C/386 or C++</a> 10227dd7cddfSDavid du Colombier <td> 10237dd7cddfSDavid du Colombier <td valign=top>MS Windows 32-bit 10247dd7cddfSDavid du Colombier<tr> <td valign=top><b><tt>unix-gcc.mak</tt></b> 10257dd7cddfSDavid du Colombier <td> 10267dd7cddfSDavid du Colombier <td valign=top><a href="#Cygwin32_build">Cygnus gcc</a> 10277dd7cddfSDavid du Colombier <td> 10287dd7cddfSDavid du Colombier <td valign=top><a href="http://sourceware.cygnus.com/cygwin/">Cygnus gnu-win32</a> 10297dd7cddfSDavid du Colombier</table></blockquote> 10307dd7cddfSDavid du Colombier 10317dd7cddfSDavid du Colombier<p> 10327dd7cddfSDavid du ColombierTo build Ghostscript you need MS-DOS version 3.3 or later and 10337dd7cddfSDavid du ColombierBorland/Inprise C/C++ (4.0 or later); Microsoft Visual C++ (version 4.0 or 10347dd7cddfSDavid du Colombierlater); Watcom C/386 (version 8.5 or later) or C++ (any version); or the 10357dd7cddfSDavid du Colombierfree djgpp + go32 development system. The options in the makefiles are 10367dd7cddfSDavid du Colombierchosen to strike a balance between RAM consumption and likely usefulness. 10377dd7cddfSDavid du ColombierIf you run <b><tt>make</tt></b> in directory <em>{dir}</em>, the default 10387dd7cddfSDavid du Colombierconfiguration generates an executable that assumes the Ghostscript 10397dd7cddfSDavid du Colombierinitialization and font files are in directory 10407dd7cddfSDavid du Colombier<em>{dir}</em><b><tt>\lib</tt></b>. 10417dd7cddfSDavid du Colombier 10427dd7cddfSDavid du Colombier<p> 10437dd7cddfSDavid du ColombierNote that the <b><tt>make</tt></b> program supplied with each PC compiler 10447dd7cddfSDavid du Colombierhas a different name. We refer to this program generically as 10457dd7cddfSDavid du Colombier<b><tt>make</tt></b> everywhere else in this document, but you will find the 10467dd7cddfSDavid du Colombiercorrect name for each compiler in the relevant section below that discusses 10477dd7cddfSDavid du Colombierthat compiler. 10487dd7cddfSDavid du Colombier 10497dd7cddfSDavid du Colombier<p> 10507dd7cddfSDavid du ColombierYou must have <b><tt>COMMAND.COM</tt></b> in your path to build Ghostscript. 10517dd7cddfSDavid du ColombierAfter making the changes needed to choose features and devices to build into 10527dd7cddfSDavid du Colombierthe executable, you must create the directory where the compiler will do its 10537dd7cddfSDavid du Colombierwork (normally the <b><tt>obj</tt></b> subdirectory of the current 10547dd7cddfSDavid du Colombierdirectory) and the directory where the compiled code will be placed 10557dd7cddfSDavid du Colombier(normally the <b><tt>bin</tt></b> subdirectory). Then to build the 10567dd7cddfSDavid du ColombierGhostscript executable all you need do is give the <b><tt>make</tt></b> 10577dd7cddfSDavid du Colombiercommand. 10587dd7cddfSDavid du Colombier 10597dd7cddfSDavid du Colombier<p><a name="Make_begin"></a> 10607dd7cddfSDavid du ColombierA special make target "<b><tt>begin</tt></b>" attempts to compile all the 10617dd7cddfSDavid du Colombier<b><tt>.c</tt></b> files in the current directory. Some of these 10627dd7cddfSDavid du Colombiercompilations will fail, but the ones that succeed will go considerably 10637dd7cddfSDavid du Colombierfaster because they don't individually pay the overhead of starting up the 10647dd7cddfSDavid du Colombiercompiler. So a good strategy for building the executable for the first 10657dd7cddfSDavid du Colombiertime, or after changing a widely used <b><tt>.h</tt></b> file, is to do the 10667dd7cddfSDavid du Colombierfast compilation of everything possible, then the controlled compilation of 10677dd7cddfSDavid du Colombiereverything that failed in the first step: 10687dd7cddfSDavid du Colombier 10697dd7cddfSDavid du Colombier<blockquote><b><tt> 10707dd7cddfSDavid du Colombiermake begin<br> 10717dd7cddfSDavid du Colombiermake 10727dd7cddfSDavid du Colombier</tt></b></blockquote> 10737dd7cddfSDavid du Colombier 10747dd7cddfSDavid du Colombier<p> 10757dd7cddfSDavid du Colombier<b><em>Note:</em></b> if you unpack the Ghostscript sources on a DOS or MS Windows 10767dd7cddfSDavid du Colombiersystem from a Unix tar file, the unpacked files have linefeed alone as the 10777dd7cddfSDavid du Colombierline terminator (the Unix convention) instead of carriage return + linefeed 10787dd7cddfSDavid du Colombier(the Microsoft convention), which may make the C compiler unhappy. One 10797dd7cddfSDavid du Colombiersimple way to fix this, if you have the InfoZIP <b><tt>zip</tt></b> and 10807dd7cddfSDavid du Colombier<b><tt>unzip</tt></b> programs, is 10817dd7cddfSDavid du Colombier 10827dd7cddfSDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0> 1083*593dc095SDavid du Colombier<tr> <td><b><tt>zip -l CVTEMP.zip *.bat *.c *.h *.def *.rc</tt></b> 10847dd7cddfSDavid du Colombier <td> 10857dd7cddfSDavid du Colombier <td>(Letter "l", not the digit "1") 10867dd7cddfSDavid du Colombier<tr> <td><b><tt>unzip -o CVTEMP.zip</tt></b> 10877dd7cddfSDavid du Colombier <td> 10887dd7cddfSDavid du Colombier <td>(Rewrite all the same files correctly) 10897dd7cddfSDavid du Colombier<tr> <td><b><tt>del CVTEMP.zip</tt></b> 10907dd7cddfSDavid du Colombier <td> 10917dd7cddfSDavid du Colombier <td>(Delete the temporary zip file) 10927dd7cddfSDavid du Colombier</table></blockquote> 10937dd7cddfSDavid du Colombier 10943ff48bf5SDavid du Colombier<h3><a name="Borland_build"></a>Borland/Inprise environment</h3> 10957dd7cddfSDavid du Colombier 10967dd7cddfSDavid du Colombier<p> 10977dd7cddfSDavid du ColombierTo compile Ghostscript with the Borland/Inprise environment (hereafter 10987dd7cddfSDavid du Colombierreferred to as just "Borland"), you need Borland C++ (version 4.0 or later); 10997dd7cddfSDavid du Colombierspecifically the compiler, <b><tt>make</tt></b> utility, and linker. You 11007dd7cddfSDavid du Colombieralso need either the Borland assembler (version 1.0 or later) or the 11017dd7cddfSDavid du ColombierMicrosoft assembler (version 4.0 or later). 11027dd7cddfSDavid du Colombier 11037dd7cddfSDavid du Colombier<p> 11047dd7cddfSDavid du ColombierTo create "<b><tt>makefile</tt></b>", give the command 11057dd7cddfSDavid du Colombier 11067dd7cddfSDavid du Colombier<blockquote><b><tt> 11077dd7cddfSDavid du Colombierecho !include "src\bcwin32.mak" >makefile 11087dd7cddfSDavid du Colombier</tt></b></blockquote> 11097dd7cddfSDavid du Colombier 11107dd7cddfSDavid du Colombier<p> 11117dd7cddfSDavid du ColombierTo run the <b><tt>make</tt></b> program, give the commmand 11127dd7cddfSDavid du Colombier 11137dd7cddfSDavid du Colombier<blockquote><b><tt> 11147dd7cddfSDavid du Colombiermake 11157dd7cddfSDavid du Colombier</tt></b></blockquote> 11167dd7cddfSDavid du Colombier 11177dd7cddfSDavid du Colombier<p> 11187dd7cddfSDavid du ColombierBesides the source files and the makefiles, you need: 11197dd7cddfSDavid du Colombier 11207dd7cddfSDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0> 11217dd7cddfSDavid du Colombier<tr valign=top> <td>*<b><tt>.bat</tt></b> 11227dd7cddfSDavid du Colombier <td> 11237dd7cddfSDavid du Colombier <td>(a variety of batch files used in the build process) 11247dd7cddfSDavid du Colombier</table></blockquote> 11257dd7cddfSDavid du Colombier 11267dd7cddfSDavid du Colombier<p> 11277dd7cddfSDavid du ColombierComments in the makefiles describe the configuration parameters. If your 11287dd7cddfSDavid du Colombierconfiguration is different from the following, you should definitely read 11297dd7cddfSDavid du Colombierthose comments and see if you want or need to change any of this: 11307dd7cddfSDavid du Colombier<ul> 11317dd7cddfSDavid du Colombier<li>The compiler files are in <b><tt>C:\BC</tt></b> and its subdirectories. 11327dd7cddfSDavid du Colombier<li>You are using the Borland assembler <b><tt>tasm</tt></b>. 11337dd7cddfSDavid du Colombier<li>You want an executable that will run on any 32-bit PC-compatible, 11347dd7cddfSDavid du Colombierregardless of processor type (80386, 80486, Pentium, or compatible) and 11357dd7cddfSDavid du Colombierregardless of whether a math coprocessor (80x87) is present -- an issue only 11367dd7cddfSDavid du Colombierwith 80386 processors. 11377dd7cddfSDavid du Colombier</ul> 11387dd7cddfSDavid du Colombier 11397dd7cddfSDavid du Colombier<p> 11407dd7cddfSDavid du Colombier<b>Notes</b> 11417dd7cddfSDavid du Colombier 11427dd7cddfSDavid du Colombier<ul> 11437dd7cddfSDavid du Colombier<li>A user reports that the Borland C++ 4.00 with patch 1-6 doesn't 11447dd7cddfSDavid du Colombierproduce a working executable of Ghostscript 5.03. We can't test this, 11457dd7cddfSDavid du Colombiersince we no longer have this compiler. 11467dd7cddfSDavid du Colombier 11477dd7cddfSDavid du Colombier<li>Borland C++ 4.5 has a bug or bugs that cause(s) the 32-bit Windows 11487dd7cddfSDavid du Colombierexecutable to crash if you give any @-files on the command line. Among 11497dd7cddfSDavid du Colombierother things, this makes the uniprint driver unusable, because it references 11507dd7cddfSDavid du Colombierthe .upp configuration files this way. This problem may possibly be fixed 11517dd7cddfSDavid du Colombierby one or more of the patch files on 11527dd7cddfSDavid du Colombier 11537dd7cddfSDavid du Colombier<blockquote> 11543ff48bf5SDavid du Colombier<a href="ftp://ftp.borland.com/pub/borlandcpp/devsupport/patches/bc4_5/" 11553ff48bf5SDavid du Colombierclass="offsite">ftp://ftp.borland.com/pub/borlandcpp/devsupport/patches/bc4_5/</a> 11567dd7cddfSDavid du Colombier</blockquote> 11577dd7cddfSDavid du Colombier 11587dd7cddfSDavid du Colombier<li>Borland C++ 4.52 has a bug that causes the 32-bit Windows executable to 1159*593dc095SDavid du Colombierfail during startup. Borland provides a patch for this bug in 11607dd7cddfSDavid du Colombier 11617dd7cddfSDavid du Colombier<blockquote> 11623ff48bf5SDavid du Colombier<a 11633ff48bf5SDavid du Colombierhref="ftp://ftp.borland.com/pub/borlandcpp/devsupport/patches/bc4_5/bc45xp1.zip" 11643ff48bf5SDavid du Colombierclass="offsite">ftp://ftp.borland.com/pub/borlandcpp/devsupport/patches/bc4_5/bc45xp1.zip</a> 11657dd7cddfSDavid du Colombier</blockquote> 11667dd7cddfSDavid du Colombier 11677dd7cddfSDavid du Colombier<li>Borland C++ 5.0 and 5.01 have a code generator bug that generates 11687dd7cddfSDavid du Colombierincorrect code for the construct <b><tt>!file_is_valid()</tt></b>. Do not 11697dd7cddfSDavid du Colombierattempt to compile Ghostscript with these compilers. If you want to report 11707dd7cddfSDavid du Colombierthis bug to Borland, send them the result of compiling 11717dd7cddfSDavid du Colombier<b><tt>ziodev.c</tt></b> and tell them to look at the code generated for 11727dd7cddfSDavid du Colombier<b><tt>file_is_valid()</tt></b> and <b><tt>!file_is_valid()</tt></b>. We 1173*593dc095SDavid du Colombierdon't know whether Borland C++ 5.02 still has this problem. The problem 1174*593dc095SDavid du Colombierdoes not appear to exist in Borland C++Builder 4 or 5.</li> 11757dd7cddfSDavid du Colombier 11767dd7cddfSDavid du Colombier<li>When building for the MS Windows Win32s environment, the make 11777dd7cddfSDavid du Colombierprocess will stop after it has created <b><tt>genarch.exe</tt></b>. 11787dd7cddfSDavid du ColombierYou should then run "<b><tt>_genarch.bat</tt></b>", wait until 11797dd7cddfSDavid du Colombier<b><tt>genarch</tt></b> has finished and then exit MS Windows. Then type 11807dd7cddfSDavid du Colombier"<b><tt>make</tt></b>" again to restart the make process. 11817dd7cddfSDavid du Colombier 1182*593dc095SDavid du Colombier<li>Borland C++Builder 5 and above require <strong><tt>BUILDER_VERSION</tt></strong> 1183*593dc095SDavid du Colombierto be set explicitly to 5 in the make file because the version of MAKE which ships 1184*593dc095SDavid du Colombierwith this product (Version 5.2) is the same as that shipped with Version 4.5. Therefore, 1185*593dc095SDavid du Colombierthere is no way to automatically establish the compiler version that is in use. Note that 1186*593dc095SDavid du Colombierbecause a 16 bit compile does not ship with Version 5.5, conditionals have been added to 1187*593dc095SDavid du Colombierprevent attempts to compile 16 bit code when <tt><strong>BUILDER_VERSION = 5</strong></tt></li> 1188*593dc095SDavid du Colombier<li>Note that under Borland C++Builder 5, MAKE 1189*593dc095SDavid du Colombierdoes not stop when <tt><strong>_genarch.bat</strong></tt> should be run as described 1190*593dc095SDavid du Colombierabove. It is necessary for the user to Abort the make by pressing Control-C. You should 1191*593dc095SDavid du Colombierthen run "<b><tt>_genarch.bat</tt></b>", wait until <b><tt>genarch</tt></b> has 1192*593dc095SDavid du Colombierfinished and then exit MS Windows. Then type "<b><tt>make</tt></b>" again to 1193*593dc095SDavid du Colombierrestart the make process. All targets are built succesfully if this step is ignored. <tt><strong>I 1194*593dc095SDavid du Colombierdon't know if the targets are correct although they seem to run OK.</strong></tt></li> 1195*593dc095SDavid du Colombier<li>To prevent the compiler terminating because too 1196*593dc095SDavid du Colombiermany warning messages have been generated, copy the file file <tt><strong>bcc32.cfg </strong></tt>to 1197*593dc095SDavid du Colombierthe top level directory using the following command:</li> 1198*593dc095SDavid du Colombier 11997dd7cddfSDavid du Colombier</ul> 12007dd7cddfSDavid du Colombier 12013ff48bf5SDavid du Colombier<h3><a name="Microsoft_build"></a>Microsoft Environment</h3> 12027dd7cddfSDavid du Colombier 12033ff48bf5SDavid du Colombier<p> NOTE: We have received reports that the Microsoft Visual C++ 5.0 and 6.0 compilers 12043ff48bf5SDavid du Colombier produce incorrect code for Ghostscript version 6.0 and later, from the same 12053ff48bf5SDavid du Colombier source code that compiles and runs correctly with other compilers. In spite 12063ff48bf5SDavid du Colombier of these reports, several members of the Artifex staff use version 6.0 of the 12073ff48bf5SDavid du Colombier MSVC compiler on a regular basis and we have not found any problems. You may 12083ff48bf5SDavid du Colombier also want to try out the <a href="#IntelWin32_build">Intel C/C++ compiler</a>, 12093ff48bf5SDavid du Colombier which can be integrated into the Microsoft Visual C++ environment. 12103ff48bf5SDavid du Colombier<p>To compile Ghostscript using the Microsoft environment, you need Microsoft 12117dd7cddfSDavid du Colombier Visual C++ 4.0 or later with its associated "<b><tt>nmake</tt></b>" utility 12123ff48bf5SDavid du Colombier and linker. 12133ff48bf5SDavid du Colombier<h4><a name="Using_the_MS_Development_Environment"> </a>Using Microsoft Developer 12143ff48bf5SDavid du Colombier Studio</h4> 12153ff48bf5SDavid du Colombier<p>Microsoft Developer Studio is the Microsoft Visual C++ integrated development 12163ff48bf5SDavid du Colombier environment. To use it to build Ghostscript: it is first necessary to create 12173ff48bf5SDavid du Colombier a new workspace/project. To create the workspace/project, open Microsoft Developer 12183ff48bf5SDavid du Colombier Studio and select <b><tt>File/New</tt></b>. In the dialog window that is opened, 12193ff48bf5SDavid du Colombier select 'Makefile' as the type of project. Specify a name for the project. (Microsoft 12203ff48bf5SDavid du Colombier does not allow special characters such as ., *, ?, /, or \ as part of project 12213ff48bf5SDavid du Colombier names.) Also specify the location of the master directory for your Ghostscript 12223ff48bf5SDavid du Colombier files. Then select OK. 12233ff48bf5SDavid du Colombier<p> In the next dialog window, specify the build command line as <b><tt>nmake 12243ff48bf5SDavid du Colombier /f src/msvc32.mak DEVSTUDIO= </tt></b> Note the value for <b><tt>DEVSTUDIO</tt></b> 12253ff48bf5SDavid du Colombier is empty. Then select <b><tt>Finish</tt></b>. 12263ff48bf5SDavid du Colombier<p>At this point, it is now possible to build Ghostscript using Developer Studio. 12273ff48bf5SDavid du Colombier To build, press F7 or select the build icon. Note: multiple warnings will also 12283ff48bf5SDavid du Colombier given about things like double to float data conversions. Ignore them. We have 12293ff48bf5SDavid du Colombier not found a way to create a single set of sources that does not create warnings 12303ff48bf5SDavid du Colombier with the different compilers and operating systems supported by Ghostscript. 12313ff48bf5SDavid du Colombier We are working to reduce the number of the warning messages. 12323ff48bf5SDavid du Colombier<p>To run Ghostscript inside of Developer Studio, it is necessary to specify the 12333ff48bf5SDavid du Colombier name of the executable program . Select <b><tt>Project/Settings</tt></b>. Select 12343ff48bf5SDavid du Colombier the <b><tt>Debug</tt></b> tab. Then for <b><tt>Executable for debug session:</tt></b> 12353ff48bf5SDavid du Colombier specify <b><tt>bin/gswin32.exe</tt></b> 12363ff48bf5SDavid du Colombier<p>To use all of the features of Microsoft Developer Studio for debugging, and 12373ff48bf5SDavid du Colombier modifying Ghostscriptt, you need to finish the remaining steps. 12383ff48bf5SDavid du Colombier<p>To add the Ghostscript DLL to the project, select <b><tt>Project/Settings</tt></b>. 12393ff48bf5SDavid du Colombier Select the <b><tt>Debug</tt></b> tab. Change the <b><tt>Category</tt></b> to 12403ff48bf5SDavid du Colombier <b><tt>Additional DLLs</tt></b>. Then specify <b><tt>bin/gsdll32.dll</tt></b>. 12413ff48bf5SDavid du Colombier<p> To specify the Ghostscript program arguments, select <b><tt>Project/Settings</tt></b>. 12423ff48bf5SDavid du Colombier Select the <b><tt>Debug</tt></b> tab. Change the <b><tt>Category</tt></b> to 12433ff48bf5SDavid du Colombier <b><tt>General</tt></b>. Then specify the desired program arguments. For example, 1244*593dc095SDavid du Colombier specifying: <b><tt>examples/tiger.eps</tt></b> will result in the tiger example 12453ff48bf5SDavid du Colombier file being displayed when Ghostscript is executed. . 12463ff48bf5SDavid du Colombier<p> A final note: it is possible to create a command file (build.bat) to be used 12473ff48bf5SDavid du Colombier for the build command line. If many different workspaces/projects are created, 12483ff48bf5SDavid du Colombier it is simpler to use a build batch command file rather than retyping the build 12493ff48bf5SDavid du Colombier command line for each new project. Here is an example used by one of Artifex's 12503ff48bf5SDavid du Colombier staff members. This file is one line: 1251*593dc095SDavid du Colombier<blockquote><b><tt> nmake -f src/msvc32.mak DEVSTUDIO= DEBUG=1 TDEBUG=1 GS_LIB_DEFAULT="./lib/;./font;$(GSROOTDIR)/lib;$(AROOTDIR)/fonts" 12523ff48bf5SDavid du Colombier </tt></b></blockquote> 1253*593dc095SDavid du Colombier<p>Please note the double quotes around the value for <b><tt>GS_LIB_DEFAULT</tt></b> 12543ff48bf5SDavid du Colombier and the addition of <b><tt>./lib;./fonts;</tt></b> to its definition. This uses 12553ff48bf5SDavid du Colombier the local (within the project) copy of the <b><tt>lib</tt></b> and <b><tt>fonts</tt></b> 12563ff48bf5SDavid du Colombier directories. This is convenient if any changes need to be made in these directories. 1257*593dc095SDavid du Colombier 1258*593dc095SDavid du Colombier<p> Setting <b><tt>DEBUG=1</tt></b> includes debugging features in the build: 1259*593dc095SDavid du Colombier<ul> 1260*593dc095SDavid du Colombier<li> It defines the C preprocessor symbol <b><tt>DEBUG</tt></b>. The latter includes 1261*593dc095SDavid du Colombier tracing and self-validation code fragments into compilation. 1262*593dc095SDavid du Colombier Particularly it enables the <b><tt>-Z</tt></b> and <b><tt>-T</tt></b> 1263*593dc095SDavid du Colombier switches in Ghostscript. 1264*593dc095SDavid du Colombier<li> It compiles code fragments for the C stack overflow checks. 1265*593dc095SDavid du Colombier</ul> 1266*593dc095SDavid du Colombier Code produced with this option is somewhat larger and runs 1267*593dc095SDavid du Colombier somewhat slower. 1268*593dc095SDavid du Colombier 1269*593dc095SDavid du Colombier<p>Setting <b><tt>TDEBUG=1</tt></b> disables code optimization in the C compiler and 1270*593dc095SDavid du Colombierincludes symbol table information for the debugger. 1271*593dc095SDavid du ColombierCode becomes substantially slower and larger. 1272*593dc095SDavid du Colombier 1273*593dc095SDavid du Colombier<p> An optional setting <b><tt>DEBUGSYM=1</tt></b> is only useful with <b><tt>TDEBUG=0</tt></b> 1274*593dc095SDavid du Colombierfor advanced developers. It includes symbol table information for the debugger 1275*593dc095SDavid du Colombierin an optimized (release) build. 1276*593dc095SDavid du Colombier<em> 1277*593dc095SDavid du ColombierNOTE: The debug information generated for the optimized code may be 1278*593dc095SDavid du Colombiersignificantly misleading. For general MSVC users we recommend TDEBUG=1. 1279*593dc095SDavid du Colombier</em> 1280*593dc095SDavid du Colombier 12813ff48bf5SDavid du Colombier<h4><a name="Using_the_command_line"></a>Using the command line</h4> 12823ff48bf5SDavid du Colombier<p>Ghostscript can be made using either the DOS shell or one one of the various 12833ff48bf5SDavid du Colombier command line shells made for Windows. 12843ff48bf5SDavid du Colombier<p>In order for the makefiles to work properly, two items may have to be changed. 1285*593dc095SDavid du Colombier An attempt is made to select the correct version of Microsoft Visual C++ 1286*593dc095SDavid du Colombier based on the version of nmake. If this doesn't work it will default 1287*593dc095SDavid du Colombier to version 6.x. 1288*593dc095SDavid du Colombier If you are not using version 6.x then before building, in <b><tt>src\msvc32.mak</tt></b> 1289*593dc095SDavid du Colombier find the line "<b><tt>#MSVC_VERSION=6</tt></b>" and change it to "<b><tt>MSVC_VERSION=4</tt></b>", 1290*593dc095SDavid du Colombier "<b><tt>MSVC_VERSION=5</tt></b>", "<b><tt>MSVC_VERSION=7</tt></b>" 1291*593dc095SDavid du Colombier or "<b><tt>MSVC_VERSION=8</tt></b>". . 12923ff48bf5SDavid du Colombier<p>In some cases the location of the Microsoft Developer Studio, needs to be changed. 12933ff48bf5SDavid du Colombier The location of Microsoft Developer Studio is defined by the value of <b><tt>DEVSTUDIO</tt></b>. 1294*593dc095SDavid du Colombier There are several different definitions of <b><tt>DEVSTUDIO</tt></b> in src\msvc32.mak. 12953ff48bf5SDavid du Colombier There is one for each of the currently supported versions of Microsoft Visual 1296*593dc095SDavid du Colombier C++ (4, 5, 6, 7, 7.1 and 8). 12973ff48bf5SDavid du Colombier<p>The normal installation process for Microsoft Visual C++ includes setting the 12983ff48bf5SDavid du Colombier location of the Microsoft Visual C++ executables (cl.exe, link.exe, nmake.exe, 12993ff48bf5SDavid du Colombier rc.exe) in your PATH definition and the LIB and INCLUDE environment variables 13003ff48bf5SDavid du Colombier are set to point to the Microsoft Visual C++ directories. If this is true then 13013ff48bf5SDavid du Colombier the value for <b><tt>DEVSTUDIO</tt></b> can be changed to empty. I.e. <b><tt>DEVSTUDIO=</tt></b> 13023ff48bf5SDavid du Colombier<p> If PATH, LIB, and INCLUDE are not correctly set then the value for <b><tt>DEVSTUDIO</tt></b> 13033ff48bf5SDavid du Colombier needs to be defined. For example, for version 6.0, the default definition for 13043ff48bf5SDavid du Colombier the location for the Microsoft Developer Studio is: <b><tt>DEVSTUDIO=C:\Program 13053ff48bf5SDavid du Colombier Files\Microsoft Visual Studio </tt></b> If the path to Microsoft Developer Studio 13063ff48bf5SDavid du Colombier on your system differs from the default then change the appropriate definition 13073ff48bf5SDavid du Colombier of <b><tt>DEVSTUDIO</tt></b>. (Remember that there is a separate definition 13083ff48bf5SDavid du Colombier of <b><tt>DEVSTUDIO</tt></b> for each version of MSVC, so be sure to change 13093ff48bf5SDavid du Colombier the correct definition.) 13103ff48bf5SDavid du Colombier<p>To run the <b><tt>make</tt></b> program, give the command 13117dd7cddfSDavid du Colombier<blockquote><b><tt> 13123ff48bf5SDavid du Colombiernmake -f src\msvc32.mak 13137dd7cddfSDavid du Colombier</tt></b></blockquote> 13147dd7cddfSDavid du Colombier 13157dd7cddfSDavid du Colombier<p> 13163ff48bf5SDavid du ColombierRather than changing src/msvc32.mak, these values can be specified on the make 13173ff48bf5SDavid du Colombiercommand line, I.e. 13187dd7cddfSDavid du Colombier 1319*593dc095SDavid du Colombier<blockquote><b><tt> nmake -f src\msvc32.mak MSVC_VERSION=6 DEVSTUDIO="C:\Program Files\Microsoft Visual Studio" <br> 1320*593dc095SDavid du Colombiernmake -f src\msvc32.mak MSVC_VERSION=7 DEVSTUDIO="C:\Program Files\Microsoft Visual Studio .NET" 1321*593dc095SDavid du Colombier </tt></b></blockquote> 13227dd7cddfSDavid du Colombier 13233ff48bf5SDavid du Colombier<p> Note that double quotes have been added around the path for <b><tt>DEVSTUDIO</tt></b> 13243ff48bf5SDavid du Colombier due to the spaces in the path value. 13257dd7cddfSDavid du Colombier<p> 13263ff48bf5SDavid du ColombierThis command line can also be put into a batch file. 13277dd7cddfSDavid du Colombier 13283ff48bf5SDavid du Colombier<p> You may get warning messages during compilation about <b><tt>/QI0f</tt></b> 13293ff48bf5SDavid du Colombier being an undefined switch, or the message "dwmain32.def: EXETYPE not supported 13303ff48bf5SDavid du Colombier for platform; ignored" during linking. Multiple warnings will also given about 13313ff48bf5SDavid du Colombier things like double to float data conversions. Ignore them. We have not found 13323ff48bf5SDavid du Colombier a way to create a single set of sources that does not create warnings with the 13333ff48bf5SDavid du Colombier different compilers and operating systems supported by Ghostscript. 13347dd7cddfSDavid du Colombier<p> 13357dd7cddfSDavid du ColombierThe Microsoft VC++ 5.0 compiler locks up when compiling 13367dd7cddfSDavid du Colombier<b><tt>gxi12bit.c</tt></b> with <b><tt>/O2</tt></b>. Compile this file 13377dd7cddfSDavid du Colombierwithout <b><tt>/O2</tt></b>. 13387dd7cddfSDavid du Colombier 13393ff48bf5SDavid du Colombier<p> The Microsoft VC++ 5.0 compiler produces a non-working executable if compiling 13403ff48bf5SDavid du Colombier without stack checking. Don't change the setting <b><tt>TDEBUG=1</tt></b> in 13413ff48bf5SDavid du Colombier <b><tt>msvc32.mak</tt></b>. 13427dd7cddfSDavid du Colombier 1343*593dc095SDavid du Colombier<h3><a name="Microsoft_build_64"></a>Microsoft Environment for 64-bit</h3> 1344*593dc095SDavid du Colombier 1345*593dc095SDavid du ColombierBuilding Ghostscript for 64-bit Windows (AMD64 processor) requires 1346*593dc095SDavid du ColombierMicrosoft Visual Studio .NET 2005 beta on 64-bit Windows, 1347*593dc095SDavid du Colombieror Microsoft Visual Studio .NET 2003 and Windows Server 2003 DDK 1348*593dc095SDavid du Colombieron 32-bit Windows (cross-compile). 1349*593dc095SDavid du Colombier<p> 1350*593dc095SDavid du ColombierCompiling for 64-bit is similar to the 1351*593dc095SDavid du Colombier<a href="#Microsoft_build">Microsoft Environment</a> instructions above, 1352*593dc095SDavid du Colombierbut with the addition of a WIN64 define. 1353*593dc095SDavid du Colombier 1354*593dc095SDavid du Colombier<h4><a name="Microsoft_64on32"></a>Cross compile on 32-bit Windows XP</h4> 1355*593dc095SDavid du ColombierMicrosoft Visual Studio .NET 2003 is used for 32-bit compilation 1356*593dc095SDavid du Colombierof auxiliary programs used by the compile process, 1357*593dc095SDavid du Colombierwhile Windows Server 2003 Device Driver Kit (DDK) 1358*593dc095SDavid du Colombieris used for 64-bit compilation. 1359*593dc095SDavid du ColombierThe DDK cross compilers for the IA64 and AMD64 processors, 1360*593dc095SDavid du Colombierhowever only AMD64 is supported by the makefile. 1361*593dc095SDavid du ColombierThe DDK is not installed correctly by the setup program. 1362*593dc095SDavid du ColombierYou need to copy <b><tt>msobj10.dll</tt></b> to the compiler 1363*593dc095SDavid du Colombierdirectory from a nearby directory. 1364*593dc095SDavid du Colombier<p> 1365*593dc095SDavid du ColombierTo make ghostscript use 1366*593dc095SDavid du Colombier<blockquote><b><tt> 1367*593dc095SDavid du Colombier nmake -f src/msvc32.mak WIN64= 1368*593dc095SDavid du Colombier</tt></b></blockquote> 1369*593dc095SDavid du ColombierThis will fail when it tries to run genconf.exe. 1370*593dc095SDavid du ColombierMove <b><tt>./obj/genconf.exe</tt></b> to 64-bit Windows, then run it 1371*593dc095SDavid du Colombier<blockquote><b><tt> 1372*593dc095SDavid du Colombier genconf arch.h 1373*593dc095SDavid du Colombier</tt></b></blockquote> 1374*593dc095SDavid du ColombierMove <b><tt>arch.h</tt></b> back to <b><tt>./obj/arch.h</tt></b>. 1375*593dc095SDavid du Colombier(Alternatively, use arch.h created by a 32-bit build and change 1376*593dc095SDavid du ColombierARCH_ALIGN_PTR_MOD to 8, 1377*593dc095SDavid du ColombierARCH_ALIGN_STRUCT_MOD to 16, 1378*593dc095SDavid du ColombierARCH_SIZEOF_PTR to 8, 1379*593dc095SDavid du Colombierand ARCH_CACHE1_SIZE to 4194304). 1380*593dc095SDavid du ColombierThen restart the build 1381*593dc095SDavid du Colombier<blockquote><b><tt> 1382*593dc095SDavid du Colombier nmake -f src/msvc32.mak WIN64= 1383*593dc095SDavid du Colombier</tt></b></blockquote> 1384*593dc095SDavid du Colombier 1385*593dc095SDavid du Colombier<p> 1386*593dc095SDavid du ColombierYou can also use Microsoft Visual Studio .NET 2005 beta 1387*593dc095SDavid du Colombierto do a similar cross compile, but you will need to 1388*593dc095SDavid du Colombierchange the DEVSTUDIO path. 1389*593dc095SDavid du Colombier 1390*593dc095SDavid du Colombier<h4><a name="Microsoft_64on64"></a>Compile on 64-bit Windows XP</h4> 1391*593dc095SDavid du ColombierTo make ghostscript use 1392*593dc095SDavid du Colombier<blockquote><b><tt> 1393*593dc095SDavid du Colombier nmake -f src/msvc32.mak WIN64= 1394*593dc095SDavid du Colombier</tt></b></blockquote> 1395*593dc095SDavid du ColombierThe Microsoft Visual Studio .NET 2005 beta does not have 1396*593dc095SDavid du Colombiera "go live" licence. You are not permitted to distribute 1397*593dc095SDavid du Colombierexecutables created by this compiler. 1398*593dc095SDavid du Colombier<p> 1399*593dc095SDavid du ColombierThe makefile currently uses the cross compiler (x86_amd64) 1400*593dc095SDavid du Colombierrather than the native compiler (amd64). 1401*593dc095SDavid du Colombier<p> 1402*593dc095SDavid du ColombierYou can install Microsoft Visual Studio .NET 2003 on 1403*593dc095SDavid du Colombier64-bit Windows, but you can't install Windows Server 2003 DDK. 1404*593dc095SDavid du ColombierYou may be able to copy the DDK directory <b><tt>c:\winddk</tt></b> 1405*593dc095SDavid du Colombierfrom a 32-bit system to a 64-bit system and compile GS. 14063ff48bf5SDavid du Colombier 14073ff48bf5SDavid du Colombier<h4><a name="Self-extracting_executables"></a>Making self-extracting executables</h4> 14087dd7cddfSDavid du Colombier 14097dd7cddfSDavid du Colombier<p> 14107dd7cddfSDavid du ColombierYou can build self-extracting Windows executables of Ghostscript. (This is 14117dd7cddfSDavid du Colombiernot needed to use Ghostscript.) Currently this requires both the 14127dd7cddfSDavid du ColombierBorland/Inprise and the Microsoft compilers, and also two pieces of 14137dd7cddfSDavid du Colombierthird-party software: 14147dd7cddfSDavid du Colombier 14157dd7cddfSDavid du Colombier<ul> 14167dd7cddfSDavid du Colombier<li><b><tt>WinZipSE</tt></b>, available from <a 14173ff48bf5SDavid du Colombierhref="http://www.winzip.com/winzipse.html" 14183ff48bf5SDavid du Colombierclass="offsite">http://www.winzip.com/winzipse.html</a>. 14197dd7cddfSDavid du ColombierThis is not free. 14207dd7cddfSDavid du Colombier<li><b><tt>zip</tt></b>, available from <a 14213ff48bf5SDavid du Colombierhref="http://www.info-zip.org/pub/infozip/Zip.html" class="offsite"> 14223ff48bf5SDavid du Colombierhttp://www.info-zip.org/pub/infozip/Zip.html</a>. This is free. 14237dd7cddfSDavid du Colombier</ul> 14247dd7cddfSDavid du Colombier 14257dd7cddfSDavid du Colombier<p> 14267dd7cddfSDavid du ColombierYou will have to edit <b><tt>src/winint.mak</tt></b> to define 14277dd7cddfSDavid du Colombier<b><tt>WINZIPSE_XE</tt></b> and <b><tt>ZIP_XE</tt></b> respectively as the 14287dd7cddfSDavid du Colombierpath names of these programs. See <a href="Release.htm">Release.htm</a> for 14297dd7cddfSDavid du Colombierthe detailed procedure. 14307dd7cddfSDavid du Colombier 14313ff48bf5SDavid du Colombier<h3><a name="Watcom_build"></a>Watcom environment</h3> 14327dd7cddfSDavid du Colombier 14337dd7cddfSDavid du Colombier<p> 14347dd7cddfSDavid du ColombierTo use the Watcom compiler, add to <b><tt>AUTOEXEC.BAT</tt></b> the line 14357dd7cddfSDavid du Colombier"<b><tt>set DOS4G=quiet</tt></b>". Check that 14367dd7cddfSDavid du Colombier<b><tt>AUTOEXEC.BAT</tt></b> also contains a line of the form 14377dd7cddfSDavid du Colombier"<b><tt>set WATCOM=</tt></b><em>{wcdir}</em>" where <em>{wcdir}</em> is 14387dd7cddfSDavid du Colombierthe directory where you installed the Watcom tools, and that the setting of 14397dd7cddfSDavid du Colombier<b><tt>PATH</tt></b> includes <em>{wcdir}</em><b><tt>\binnt</tt></b> (or 14407dd7cddfSDavid du Colombier<b><tt>%WATCOM%\binnt</tt></b>) before <em>{wcdir}</em><b><tt>\binw</tt></b> 14417dd7cddfSDavid du Colombier(or <b><tt>%WATCOM%\binw</tt></b>). Then to create 14427dd7cddfSDavid du Colombier"<b><tt>makefile</tt></b>": 14437dd7cddfSDavid du Colombier 14447dd7cddfSDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0> 14457dd7cddfSDavid du Colombier<tr> <th align=left>For 14467dd7cddfSDavid du Colombier <td> 14477dd7cddfSDavid du Colombier <th align=left>Give the command 14487dd7cddfSDavid du Colombier<tr> <td colspan=3><hr> 14497dd7cddfSDavid du Colombier<tr> <td>MS Windows 14507dd7cddfSDavid du Colombier <td> 14517dd7cddfSDavid du Colombier <td nowrap><b><tt>echo !include src\watcw32.mak >makefile</tt></b> 14527dd7cddfSDavid du Colombier</table></blockquote> 14537dd7cddfSDavid du Colombier 14547dd7cddfSDavid du Colombier<p> 14557dd7cddfSDavid du ColombierBefore compiling, change the definition of the <b><tt>WCVERSION</tt></b> 1456*593dc095SDavid du Colombiermacro in the makefile (<b><tt>watcw32.mak</tt></b>) to the version of the Watcom compiler you are 14577dd7cddfSDavid du Colombierusing. This is necessary to handle some minor incompatibilities between 14587dd7cddfSDavid du Colombierversions. 14597dd7cddfSDavid du Colombier 14607dd7cddfSDavid du Colombier<p> 14617dd7cddfSDavid du ColombierTo run the <b><tt>make</tt></b> program, give the commmand 14627dd7cddfSDavid du Colombier 14637dd7cddfSDavid du Colombier<blockquote> 14647dd7cddfSDavid du Colombier<b><tt>wmake -u</tt></b> 14657dd7cddfSDavid du Colombier</blockquote> 14667dd7cddfSDavid du Colombier 14673ff48bf5SDavid du Colombier<h3><a name="Cygwin32_build"></a>Cygwin32 gcc</h3> 14687dd7cddfSDavid du Colombier 14697dd7cddfSDavid du Colombier<p> 14707dd7cddfSDavid du ColombierA user reports that it is possible to compile Ghostscript for MS Windows NT 14717dd7cddfSDavid du Colombierusing the Cygwin32 gcc compiler, GNU <b><tt>make</tt></b>, and the 14727dd7cddfSDavid du Colombier<b><tt>unix-gcc.mak</tt></b> makefile, with only two small source code 14737dd7cddfSDavid du Colombierchanges: 14747dd7cddfSDavid du Colombier 14757dd7cddfSDavid du Colombier<ul> 14767dd7cddfSDavid du Colombier<li>Add "<b><tt>b</tt></b>" to the call to <b><tt>fopen</tt></b> in <b><tt>gp_open_scratch</tt></b> 1477*593dc095SDavid du Colombier<li>Mirror the <b><tt>gp_ntfs</tt></b> logic for <b><tt>gp_pathstring_not_bare</tt></b> 14787dd7cddfSDavid du Colombier</ul> 14797dd7cddfSDavid du Colombier 14807dd7cddfSDavid du Colombier<p> 14817dd7cddfSDavid du ColombierInformation about this compiler and environment is at the Cygnus site: 14827dd7cddfSDavid du Colombier 14837dd7cddfSDavid du Colombier<blockquote> 14843ff48bf5SDavid du Colombier<a href="http://sources.redhat.com/cygwin/">http://sources.redhat.com/cygwin/</a> 14857dd7cddfSDavid du Colombier</blockquote> 14867dd7cddfSDavid du Colombier 14877dd7cddfSDavid du Colombier<p> 14887dd7cddfSDavid du ColombierPlease note that Cygnus's licensing terms aren't quite as liberal about 14897dd7cddfSDavid du Colombierredistribution as either the GNU 14907dd7cddfSDavid du Colombier<a href="http://www.gnu.org/copyleft/gpl.html">General Public License</a> 14917dd7cddfSDavid du Colombieror the Aladdin <a href="Public.htm">Free Public License</a>, so read their 14927dd7cddfSDavid du Colombierlicense carefully if you want to redistribute the results of using their 14937dd7cddfSDavid du Colombiercompiler. 14947dd7cddfSDavid du Colombier 14953ff48bf5SDavid du Colombier<h3><a name="IntelWin32_build"></a>Intel C/C++ environment</h3> 14967dd7cddfSDavid du Colombier 14977dd7cddfSDavid du Colombier<p> 14987dd7cddfSDavid du ColombierIntel provides a C/C++ compiler that is compatible with the <a 14997dd7cddfSDavid du Colombierhref="#Microsoft_build">Microsoft Visual C++ environment</a>. The main 15007dd7cddfSDavid du Colombieradvantage of this compiler over MSVC 5.0 and 6.0 is that it produces 15017dd7cddfSDavid du Colombierworking code even when all optimizations are enabled and when stack checking 15027dd7cddfSDavid du Colombieris disabled. 15037dd7cddfSDavid du Colombier 15047dd7cddfSDavid du Colombier<p> 15057dd7cddfSDavid du ColombierTo build Ghostscript using the Intel C/C++ compiler, you have to make the 15067dd7cddfSDavid du Colombierfollowing small changes in the makefiles: 15077dd7cddfSDavid du Colombier 15087dd7cddfSDavid du Colombier<ul> 15097dd7cddfSDavid du Colombier<li>Find and change the second occurrence of 15107dd7cddfSDavid du Colombier"<b><tt>COMPILE_FULL_OPTIMIZED</tt></b>" to "<b><tt>/O2</tt></b>" in file 15117dd7cddfSDavid du Colombier<b><tt>msvccmd.mak</tt></b>. <li>Override "<b><tt>TDEBUG</tt></b>", 15127dd7cddfSDavid du Colombier"<b><tt>COMP</tt></b>", and "<b><tt>COMPAUX</tt></b>" when invoking 15137dd7cddfSDavid du Colombier<b><tt>nmake</tt></b>. 15147dd7cddfSDavid du Colombier</ul> 15157dd7cddfSDavid du Colombier 15167dd7cddfSDavid du Colombier<p> 15177dd7cddfSDavid du ColombierMore specifically, use "<b><tt>TDEBUG=0</tt></b>" and set both 15187dd7cddfSDavid du Colombier"<b><tt>COMP</tt></b>" and "<b><tt>COMPAUX</tt></b>" to the full path of 15197dd7cddfSDavid du Colombier<b><tt>icl</tt></b> (for example 15207dd7cddfSDavid du Colombier"<b><tt>COMP=C:\intel\compiler45\bin\icl</tt></b>" if the Intel C/C++ 15217dd7cddfSDavid du Colombiercompiler V4.5 was installed to <b><tt>C:\intel</tt></b>). It is suggested 15227dd7cddfSDavid du Colombierthat you use a batch file to launch <b><tt>nmake</tt></b>, since the command 15237dd7cddfSDavid du Colombierline processes the "<b><tt>=</tt></b>" on its own. Also, you may need to 15247dd7cddfSDavid du Colombierexecute <b><tt>vcvars32.bat</tt></b> and <b><tt>iccvars.bat</tt></b> to 15257dd7cddfSDavid du Colombierregister the proper paths for the compiler, its include files and its 15267dd7cddfSDavid du Colombierlibraries. 15277dd7cddfSDavid du Colombier 15287dd7cddfSDavid du Colombier<p> 15297dd7cddfSDavid du ColombierYou can buy or download a 30-day evaluation version of the Intel C/C++ 15307dd7cddfSDavid du Colombiercompiler from Intel's Software Performance Tools web site: 15317dd7cddfSDavid du Colombier 15327dd7cddfSDavid du Colombier<blockquote> 15337dd7cddfSDavid du Colombier<a href="http://www.intel.com/vtune/">http://www.intel.com/vtune/</a> 15347dd7cddfSDavid du Colombier</blockquote> 15357dd7cddfSDavid du Colombier 15367dd7cddfSDavid du Colombier<hr> 15377dd7cddfSDavid du Colombier 15383ff48bf5SDavid du Colombier<h2><a name="Mac_build"></a>How to build Ghostscript from source (MacOS version)</h2> 15397dd7cddfSDavid du Colombier 15403ff48bf5SDavid du Colombier<h3><a name="MacOS"></a>Traditional MacOS</h3> 15417dd7cddfSDavid du Colombier 15427dd7cddfSDavid du Colombier<p> 15433ff48bf5SDavid du ColombierThe Macintosh version of Ghostscript requires the <a href="http://www.metrowerks.com/" 15443ff48bf5SDavid du Colombierclass="offsite">Metrowerks Codewarrior</a> development suite. Download the 15453ff48bf5SDavid du Colombier<tt>macgs-7xx-src.sit</tt> source archive from the location listed 15463ff48bf5SDavid du Colombierbelow. This includes a Codewarrior .mcp project file than can be used to build both 15473ff48bf5SDavid du ColombierCarbon and CFM versions of the ghostscript shared library component. 15487dd7cddfSDavid du Colombier 15493ff48bf5SDavid du Colombier<blockquote> 1550*593dc095SDavid du Colombier<a href="ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/currenti/" 15513ff48bf5SDavid du Colombier class="offsite">ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/current/</a> 15523ff48bf5SDavid du Colombier</blockquote> 15537dd7cddfSDavid du Colombier 15547dd7cddfSDavid du Colombier<p> 15553ff48bf5SDavid du ColombierIf your system doesn't automatically unpack the source archive, you can 15563ff48bf5SDavid du Colombierdownload the free <a href="http://stuffit.com/download.html" 15573ff48bf5SDavid du Colombierclass="offsite">Stuffit Expander</a> to open it. 15587dd7cddfSDavid du Colombier 15597dd7cddfSDavid du Colombier<p> 15603ff48bf5SDavid du ColombierThis archive includes appropriate versions of the jpeg, zlib and libpng 3rd party 15613ff48bf5SDavid du Colombierlibrary source for convenience. You must still download the fonts and place them in an 15623ff48bf5SDavid du Colombierappropriate location, along with the contents of the <tt>lib</tt> directory from the source 15633ff48bf5SDavid du Colombierarchive. 15647dd7cddfSDavid du Colombier 15657dd7cddfSDavid du Colombier<p> 15663ff48bf5SDavid du ColombierNote that since this is just a library component, you will need a front-end application, such as 15673ff48bf5SDavid du ColombierMacGSView, to actually view or convert postscript and pdf documents. 15683ff48bf5SDavid du Colombier 15693ff48bf5SDavid du Colombier 15703ff48bf5SDavid du Colombier<h3><a name="MacOSX"></a>MacOS X</h3> 15717dd7cddfSDavid du Colombier 15727dd7cddfSDavid du Colombier<p> 15733ff48bf5SDavid du ColombierThe unix source distribution (.tar.gz) builds fine on Darwin/MacOS X, 15743ff48bf5SDavid du Colombieralbeit without a display device. You can generally just use the <tt>Makefile</tt> 1575*593dc095SDavid du Colombiergenerated by ./configure or <tt>macosx.mak</tt> 1576*593dc095SDavid du Colombieras your top-level makefile and get a reasonable default build. This will 1577*593dc095SDavid du Colombierallow you to use Ghostscript from the command line as a BSD-layer tool 1578*593dc095SDavid du Colombierto rasterize postscript and pdf to image files, and convert between the 1579*593dc095SDavid du Colombierhigh-level formats supported by Ghostscript. See the instructions for the 1580*593dc095SDavid du Colombierunix build below for details of how to customize this build. 15817dd7cddfSDavid du Colombier 15827dd7cddfSDavid du Colombier<p> 15833ff48bf5SDavid du ColombierThere is also a support for building Ghostscript as a framework. This is 15843ff48bf5SDavid du Colombiera special encapsulated shared library format specific to MacOS X. To build 15853ff48bf5SDavid du Colombierthe framework, copy <tt>macosx.mak</tt> to the top-level directory, rename it to 15863ff48bf5SDavid du Colombier<tt>makefile</tt> and issue 'make framework' from Terminal.app. This will result 15873ff48bf5SDavid du Colombierin a <tt>Ghostscript.framework</tt> in the <tt>sobin</tt> directory. It must be 15883ff48bf5SDavid du Colombiermanually copied to /Library/Frameworks/ before applications 15893ff48bf5SDavid du Colombiercan use it. You may need to create the Frameworks/ directory on some systems. 15903ff48bf5SDavid du Colombier 15913ff48bf5SDavid du Colombier<p> 15923ff48bf5SDavid du ColombierFinally, there is a <tt>macos-mcp.mak</tt> makefile that can be 15933ff48bf5SDavid du Colombierused to set up the Codewarrior shared library component build described 15943ff48bf5SDavid du Colombierin the section on <a href="#MacOS">Classic MacOS</a> above. Currently 15953ff48bf5SDavid du Colombierthis makefile is distributed only with the MacOS-specific <tt>.sit</tt> 15963ff48bf5SDavid du Colombiersource archive, but with be included generally in future releases. 15973ff48bf5SDavid du Colombier 15983ff48bf5SDavid du Colombier<p> 15993ff48bf5SDavid du ColombierTo set up the shlib build, download and uncompress the Ghostscript source. 16003ff48bf5SDavid du ColombierIf the archive doesn't contain the 3rd party jpeg, png, and zlib source, 16013ff48bf5SDavid du Colombieryou must download them as described at the beginning of this document and 16023ff48bf5SDavid du Colombierunpack them under the macgs-###-src directory under the specific names 16033ff48bf5SDavid du Colombier<tt>jpeg</tt>, <tt>zlib</tt> and <tt>libpng</tt>. You cannot use symlinks as 16043ff48bf5SDavid du ColombierCodewarrior will not be able to follow them for some of the needed header 16053ff48bf5SDavid du Colombierfiles. 16063ff48bf5SDavid du Colombier 16073ff48bf5SDavid du Colombier<p> 16083ff48bf5SDavid du ColombierCopy <tt>src/macos-mcp.mak</tt> to the top-level directory and rename 16093ff48bf5SDavid du Colombierit <tt>makefile</tt>. Then run 'make' in that directory, either from 16103ff48bf5SDavid du Colombierwithin Terminal.app or through Project Builder. This will set up the 16113ff48bf5SDavid du Colombiergenerated code required for the build and run a shell script to generate 16123ff48bf5SDavid du Colombier<tt>ghostscript.mcp.xml</tt>. Launch Metrowerks Codewarrior, and select 16133ff48bf5SDavid du Colombier'Import Project...' from the File menu, and open the xml project file. 16143ff48bf5SDavid du ColombierWhen asked, save the results as <tt>ghostscript.mcp</tt> in the same 16153ff48bf5SDavid du Colombierdirectory and you should be ready to build the shared library component. 16163ff48bf5SDavid du Colombier 16173ff48bf5SDavid du Colombier</p> 16183ff48bf5SDavid du ColombierTradtional ('PPC') applications based on the Code Fragment Manager 16193ff48bf5SDavid du Colombierwill not be able to open the shlib linked with CarbonLib, so two 16203ff48bf5SDavid du Colombiertargets are provided, one with carbon and one without. 16217dd7cddfSDavid du Colombier 16227dd7cddfSDavid du Colombier<hr> 16237dd7cddfSDavid du Colombier 16243ff48bf5SDavid du Colombier<h2><a name="Unix_build"></a>How to build Ghostscript from source (Unix version)</h2> 16257dd7cddfSDavid du Colombier 16267dd7cddfSDavid du Colombier<p> 1627*593dc095SDavid du ColombierGhostscript now ships with a build system for unix-like operating systems 1628*593dc095SDavid du Colombierbased on GNU Autoconf. In general the following should work to configure 1629*593dc095SDavid du Colombierand build Ghostscript: 1630*593dc095SDavid du Colombier 1631*593dc095SDavid du Colombier<blockquote><pre> 1632*593dc095SDavid du Colombier./configure 1633*593dc095SDavid du Colombiermake 1634*593dc095SDavid du Colombier</pre></blockquote> 1635*593dc095SDavid du Colombier 1636*593dc095SDavid du ColombierPlease report any problems with this method on your system as a bug. 1637*593dc095SDavid du Colombier 1638*593dc095SDavid du Colombier<p> 1639*593dc095SDavid du ColombierFor the convenience of those already familiar with Ghostscript, the old method 1640*593dc095SDavid du Colombierbased on hand-edited makefiles is still supported. It may also be helpful in 1641*593dc095SDavid du Colombiergetting Ghostscript to build on very old platforms. This section deals exclusively 1642*593dc095SDavid du Colombierwith that older method and includes numerous pointers regarding legacy systems. 1643*593dc095SDavid du Colombier 1644*593dc095SDavid du Colombier<p> 16457dd7cddfSDavid du ColombierBefore issuing the <b><tt>make</tt></b> command to build Ghostscript, you 16467dd7cddfSDavid du Colombierhave to make some choices, for instance 16477dd7cddfSDavid du Colombier<ul> 16487dd7cddfSDavid du Colombier<li>which compiler to use; 16497dd7cddfSDavid du Colombier<li>what features and devices to include; 16507dd7cddfSDavid du Colombier<li>whether to use system libraries for PNG and zlib; 16517dd7cddfSDavid du Colombier<li>and how to handle issues for your particular platform. 16527dd7cddfSDavid du Colombier</ul> 16537dd7cddfSDavid du Colombier 16547dd7cddfSDavid du Colombier<p> 16557dd7cddfSDavid du ColombierBe sure to check the sections on <a 16567dd7cddfSDavid du Colombierhref="#Tool_specific_issues">tool-</a>, <a 16577dd7cddfSDavid du Colombierhref="#OS_specific_issues">OS-</a>, and <a 16587dd7cddfSDavid du Colombierhref="#Hardware_specific_issues">hardware-</a>specific issues for notes 16597dd7cddfSDavid du Colombieron your particular platform and compiler. In fact, that is the 16607dd7cddfSDavid du Colombier<b><em>first</em></b> place to check if you build Ghostscript and it crashes 16617dd7cddfSDavid du Colombieror produces obviously incorrect results. 16627dd7cddfSDavid du Colombier 16633ff48bf5SDavid du Colombier<h3><a name="Multi_architecture_makefile"></a>The multi-architecture makefile</h3> 16647dd7cddfSDavid du Colombier 16657dd7cddfSDavid du Colombier<p> 16667dd7cddfSDavid du ColombierEspecially if you are working in a Unix environment with multiple CPU types, 16677dd7cddfSDavid du Colombieroperating systems, and/or C compilers, you may find the file 16687dd7cddfSDavid du Colombier<b><tt>all-arch.mak</tt></b> useful. This user-contributed file includes 16697dd7cddfSDavid du Colombier"wrappers" for the Unix makefiles for many different common environments. 16707dd7cddfSDavid du ColombierThe author of this file notes: 16717dd7cddfSDavid du Colombier 16727dd7cddfSDavid du Colombier<blockquote> 16737dd7cddfSDavid du Colombier 16747dd7cddfSDavid du Colombier<p> 16757dd7cddfSDavid du ColombierThis makefile allows you to execute 16767dd7cddfSDavid du Colombier 16777dd7cddfSDavid du Colombier<pre> 16787dd7cddfSDavid du Colombier make `hostname` 16797dd7cddfSDavid du Colombier</pre> 16807dd7cddfSDavid du Colombier 16817dd7cddfSDavid du Colombier<p> 16827dd7cddfSDavid du Colombieron any machine on a network, without having to examine the Makefile for a 16837dd7cddfSDavid du Colombierspecific target name. Also, some of the targets in the Makefile incorporate 16847dd7cddfSDavid du Colombierspecial changes in compiler options for certain files, to work around 16857dd7cddfSDavid du Colombiercompiler bugs that Ghostscript has been so good at exposing. Having that 16867dd7cddfSDavid du Colombierspecial handling written down in a Makefile proves very convenient. 16877dd7cddfSDavid du Colombier 16887dd7cddfSDavid du Colombier<p> 16897dd7cddfSDavid du ColombierI don't do "make install" until I've done 16907dd7cddfSDavid du Colombier 16917dd7cddfSDavid du Colombier<pre> 16927dd7cddfSDavid du Colombier cd ...build-directory.../gs-x.yz 16937dd7cddfSDavid du Colombier cd lib 1694*593dc095SDavid du Colombier ../bin/gs ../examples/tiger.eps 16957dd7cddfSDavid du Colombier</pre> 16967dd7cddfSDavid du Colombier 16977dd7cddfSDavid du Colombier<p> 16987dd7cddfSDavid du Colombierand verified that the famous tiger can be correctly displayed. Also, the 16997dd7cddfSDavid du Colombier"make install" step is careful to first remove any existing 17007dd7cddfSDavid du Colombier<b><tt>$(BINDIR)/gs</tt></b>, then install a new gs there with a hard link 17017dd7cddfSDavid du Colombierto gs-x.yz. 17027dd7cddfSDavid du Colombier 17037dd7cddfSDavid du Colombier<p> 17047dd7cddfSDavid du ColombierThat way, each installation makes gs a synonym for the latest release, 17057dd7cddfSDavid du Colombierbut earlier ones remain in place in case backtracking is needed, which 17067dd7cddfSDavid du ColombierI've fairly often wanted to do when investigating changed behavior, or 17077dd7cddfSDavid du Colombiera suspected bug. 17087dd7cddfSDavid du Colombier 17097dd7cddfSDavid du Colombier<p> 17107dd7cddfSDavid du ColombierWhen I've been experimenting with a new feature, such as GNU readline 17117dd7cddfSDavid du Colombiersupport, I change the setting of GS from gs to ngs (new gs), so as not 17127dd7cddfSDavid du Colombierto break any existing programs by the installation of an experimental 17137dd7cddfSDavid du Colombierversion. 17147dd7cddfSDavid du Colombier 17157dd7cddfSDavid du Colombier</blockquote> 17167dd7cddfSDavid du Colombier 17173ff48bf5SDavid du Colombier<h3><a name="UNIX_makefile"></a>Setting up "makefile"</h3> 17187dd7cddfSDavid du Colombier 17197dd7cddfSDavid du Colombier<p> 17207dd7cddfSDavid du ColombierThe files <b><tt>src/unix</tt></b>*<b><tt>.mak</tt></b> are the makefiles for 17217dd7cddfSDavid du ColombierUnix platforms, and you choose one based on what compiler you use. To 17227dd7cddfSDavid du Colombierbuild Ghostscript, however, you must use the simple command 17237dd7cddfSDavid du Colombier"<b><tt>make</tt></b>", which must find the file "<b><tt>makefile</tt></b>" 17247dd7cddfSDavid du Colombier(or "<b><tt>Makefile</tt></b>"). If your system supports symbolic links, 17257dd7cddfSDavid du Colombierset up "<b><tt>makefile</tt></b>" like this. 17267dd7cddfSDavid du Colombier 17277dd7cddfSDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0> 17287dd7cddfSDavid du Colombier<tr> <td>GNU gcc: 17297dd7cddfSDavid du Colombier <td> 17307dd7cddfSDavid du Colombier <td nowrap><b><tt>ln -s src/unix-gcc.mak makefile</tt></b> 17317dd7cddfSDavid du Colombier<tr> <td>Non-gcc ANSI C compiler: 17327dd7cddfSDavid du Colombier <td> 17337dd7cddfSDavid du Colombier <td nowrap><b><tt>ln -s src/unixansi.mak makefile</tt></b> 17347dd7cddfSDavid du Colombier</table></blockquote> 17357dd7cddfSDavid du Colombier 17367dd7cddfSDavid du Colombier<p> 17377dd7cddfSDavid du ColombierIf your system doesn't support symbolic links, first finish all changes to 17387dd7cddfSDavid du Colombierthe compiler-specific makefile, then make a hard link, omitting the 17397dd7cddfSDavid du Colombier<b><tt>-s</tt></b> switch. 17407dd7cddfSDavid du Colombier 17417dd7cddfSDavid du Colombier<p> 17427dd7cddfSDavid du ColombierThe makefile distributed with Ghostscript selects the following devices 17437dd7cddfSDavid du Colombierto include in the build: 17447dd7cddfSDavid du Colombier 17457dd7cddfSDavid du Colombier<blockquote><table cellpadding=0 cellspacing=0> 17467dd7cddfSDavid du Colombier<tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Devices included as distributed</font><hr> 17477dd7cddfSDavid du Colombier<tr valign=bottom> 17487dd7cddfSDavid du Colombier <th align=left>Type 17497dd7cddfSDavid du Colombier <td> 17507dd7cddfSDavid du Colombier <th align=left>Devices 17517dd7cddfSDavid du Colombier<tr> <td colspan=3><hr> 17527dd7cddfSDavid du Colombier<tr valign=top> <td>Display 17537dd7cddfSDavid du Colombier <td> 17547dd7cddfSDavid du Colombier <td>X Windows 17557dd7cddfSDavid du Colombier<tr valign=top> <td>Printers 17567dd7cddfSDavid du Colombier <td> 17577dd7cddfSDavid du Colombier <td>H-P DeskJets, LaserJets, and color DeskJets and PaintJets; Canon BubbleJets 17587dd7cddfSDavid du Colombier<tr valign=top> <td>File formats 17597dd7cddfSDavid du Colombier <td> 17607dd7cddfSDavid du Colombier <td>Group 3 & Group 4 fax; JPEG; PCX; PBM, PGM, PKM, & PPM; TIFF; PostScript images; PNG; distilled PDF, PostScript, and EPS; PCL XL ("PCL 6") 17617dd7cddfSDavid du Colombier</table></blockquote> 17627dd7cddfSDavid du Colombier 17637dd7cddfSDavid du Colombier<p> 17647dd7cddfSDavid du ColombierThe <b><tt>unix</tt></b>*<b><tt>.mak</tt></b> files explicitly compile and 17657dd7cddfSDavid du Colombierlink the JPEG, PNG, and zlib libraries into the executable. If your Unix 17667dd7cddfSDavid du Colombiersystem already includes the PNG and zlib libraries -- probably in 17677dd7cddfSDavid du Colombier<b><tt>/usr/lib/libpng.</tt></b>{<b><tt>a</tt></b>,<b><tt>so</tt></b>} and 17687dd7cddfSDavid du Colombier<b><tt>/usr/lib/libz.</tt></b>{<b><tt>a</tt></b>,<b><tt>so</tt></b>} -- and 17697dd7cddfSDavid du Colombieryou would rather use those copies, change the definition of 17707dd7cddfSDavid du Colombier<b><tt>SHARE_LIBPNG</tt></b> and <b><tt>SHARE_ZLIB</tt></b> from 0 to 1 in 17717dd7cddfSDavid du Colombierthe relevant <b><tt>unix</tt></b>*<b><tt>.mak</tt></b> file before 17727dd7cddfSDavid du Colombiercompiling. Note that if you do this, you will get non-debug versions of 17737dd7cddfSDavid du Colombierthese libraries even if you selected <b><tt>DEBUG</tt></b> in the makefile. 17747dd7cddfSDavid du ColombierAt the insistence of some users, we have also provided the ability to do 17757dd7cddfSDavid du Colombierthis with the JPEG library (<b><tt>SHARE_JPEG</tt></b>), but should not use 17767dd7cddfSDavid du Colombierit: in order to be compatible with Adobe interpreters (which do not follow 17777dd7cddfSDavid du Colombierthe JPEG standard exactly), Ghostscript has to compile the IJG code with 17787dd7cddfSDavid du Colombierthe non-standard definition 17797dd7cddfSDavid du Colombier 17807dd7cddfSDavid du Colombier<blockquote><b><tt> 17817dd7cddfSDavid du Colombier#define D_MAX_BLOCKS_IN_MCU 64 17827dd7cddfSDavid du Colombier</tt></b></blockquote> 17837dd7cddfSDavid du Colombier 17847dd7cddfSDavid du Colombier<p> 17857dd7cddfSDavid du Colombierand since shared versions of this library will not have been compiled this 17863ff48bf5SDavid du Colombierway, you will get errors on some valid PostScript and PDF input files. Note 17873ff48bf5SDavid du Colombieralso that because not all the JPEG library header files that Ghostscript 17883ff48bf5SDavid du Colombieruses are normally installed in <b><tt>/usr/include</tt></b>, you must have 17893ff48bf5SDavid du Colombierthe source code for this library available even if you set 17903ff48bf5SDavid du Colombier<b><tt>SHARE_JPEG</tt></b> to 1. 17917dd7cddfSDavid du Colombier 17927dd7cddfSDavid du Colombier<p> 17937dd7cddfSDavid du ColombierIf the X11 client header files are located in some directory which your 17947dd7cddfSDavid du Colombiercompiler does not automatically search, you must change the 17957dd7cddfSDavid du Colombier<b><tt>XINCLUDE</tt></b> macro in the makefile to include a specific 17967dd7cddfSDavid du Colombier<b><tt>-I</tt></b> switch. See the comment preceding 17977dd7cddfSDavid du Colombier<b><tt>XINCLUDE</tt></b> in the makefile. 17987dd7cddfSDavid du Colombier 17997dd7cddfSDavid du Colombier<p> 18007dd7cddfSDavid du ColombierCurrently Ghostscript is set up to compile and link in a generic Unix 18017dd7cddfSDavid du Colombierenvironment. Some Unix environments may require changing the 18027dd7cddfSDavid du Colombier<b><tt>LDFLAGS</tt></b> macro in the makefile; be sure to check the <a 18037dd7cddfSDavid du Colombierhref="#Unix_build">Unix section</a> for your specific tools, operating 18047dd7cddfSDavid du Colombiersystem, and hardware. 18057dd7cddfSDavid du Colombier 18063ff48bf5SDavid du Colombier<h3><a name="Shared_object"></a>Shared object</h3> 18073ff48bf5SDavid du ColombierTo build Ghostscript as a shared object with gcc 18083ff48bf5SDavid du Colombier(instead of as a single large executable) use: 18093ff48bf5SDavid du Colombier<pre> 18103ff48bf5SDavid du Colombier ln -s src/unix-gcc.mak makefile 18113ff48bf5SDavid du Colombier make so 18123ff48bf5SDavid du Colombier</pre> 18133ff48bf5SDavid du Colombier<p> 18143ff48bf5SDavid du ColombierThis will build <b><tt>libgs.so</tt></b> and two programs which use the 18153ff48bf5SDavid du Colombiershared object, <b><tt>gsx</tt></b> which uses Gtk+ and <b><tt>gsc</tt></b> 18163ff48bf5SDavid du Colombierwhich does not. 18177dd7cddfSDavid du Colombier 18183ff48bf5SDavid du Colombier<p> 18193ff48bf5SDavid du ColombierDo not use <tt>make -f src/unix-gcc.mak</tt> because this will 18203ff48bf5SDavid du Colombierbreak the recursive make used in building the shared object. 18213ff48bf5SDavid du Colombier<p> 18223ff48bf5SDavid du ColombierTo install the shared object and these two programs: 18233ff48bf5SDavid du Colombier<pre> 18243ff48bf5SDavid du Colombier make soinstall 18253ff48bf5SDavid du Colombier</pre> 18263ff48bf5SDavid du ColombierTo delete files created by the build process: 18273ff48bf5SDavid du Colombier<pre> 18283ff48bf5SDavid du Colombier make soclean 18293ff48bf5SDavid du Colombier</pre> 18303ff48bf5SDavid du Colombier<p> 18313ff48bf5SDavid du ColombierFor more details see <a href="../src/unix-dll.mak">unix-dll.mak</a>. 18323ff48bf5SDavid du Colombier 18333ff48bf5SDavid du Colombier<h3><a name="Tool_specific_issues"></a>Tool-specific issues</h3> 18343ff48bf5SDavid du Colombier 18353ff48bf5SDavid du Colombier<h4><a name="gcc_27x"></a>gcc 2.7.*</h4> 18367dd7cddfSDavid du Colombier 18377dd7cddfSDavid du Colombier<p> 18387dd7cddfSDavid du ColombierSome of the issues in using gcc are very specific to the particular 18397dd7cddfSDavid du Colombiercomputer, the particular version of the operating system, and the 18407dd7cddfSDavid du Colombierparticular version of gcc available to you. You can check the version of 18417dd7cddfSDavid du Colombiergcc with the <b><tt>gcc --version</tt></b> command. 18427dd7cddfSDavid du Colombier 18437dd7cddfSDavid du Colombier<p> 18447dd7cddfSDavid du ColombierAn optimizer bug in gcc versions 2.7.0, 2.7.1, and 2.7.2 causes the 18457dd7cddfSDavid du Colombiercompiler to generate incorrect code. The makefile works around this, but 18467dd7cddfSDavid du Colombierwe recommend that if possible you use either an earlier or a later version 18477dd7cddfSDavid du Colombierof gcc; for instance, gcc 2.5.8, gcc 2.6.3, 2.7.2.1 or later which don't 18487dd7cddfSDavid du Colombierhave this bug. Note, however, that gcc has other problems on some 18497dd7cddfSDavid du Colombierplatforms, so please read the section for your specific platform. 18507dd7cddfSDavid du Colombier 18513ff48bf5SDavid du Colombier<h4><a name="GNU_make"></a>GNU make</h4> 18527dd7cddfSDavid du Colombier 18537dd7cddfSDavid du Colombier<p> 18547dd7cddfSDavid du ColombierCurrent versions of GNU <b><tt>make</tt></b> have no problems, but GNU 18557dd7cddfSDavid du Colombier<b><tt>make</tt></b> 3.59 can't handle the final linking step in some 18567dd7cddfSDavid du Colombiercases; if this happens, use the platform's standard <b><tt>make</tt></b>, 18577dd7cddfSDavid du Colombiertypically <b><tt>/bin/make</tt></b>. 18587dd7cddfSDavid du Colombier 18593ff48bf5SDavid du Colombier<h3><a name="OS_specific_issues"></a>OS-specific issues</h3> 18607dd7cddfSDavid du Colombier 18613ff48bf5SDavid du Colombier<h4><a name="386_Unix"></a>386 Unix</h4> 18627dd7cddfSDavid du Colombier 18637dd7cddfSDavid du Colombier<ul> 18647dd7cddfSDavid du Colombier<li>gcc versions older than 1.38 on Intel 80386 systems do not compile 18657dd7cddfSDavid du ColombierGhostscript correctly with the <b><tt>-O</tt></b> option. 18667dd7cddfSDavid du Colombier 18677dd7cddfSDavid du Colombier<li>gcc 1.39 under <b><tt>386BSD</tt></b> has a bug that causes 18687dd7cddfSDavid du Colombierfloat-to-integer conversions to compile incorrectly, rendering the 18697dd7cddfSDavid du Colombierexecutable unusable. 18707dd7cddfSDavid du Colombier 18717dd7cddfSDavid du Colombier<li>X11R5 may need "<b><tt>#include <stddef.h></tt></b>" in <b><tt>x_.h</tt></b>. 18727dd7cddfSDavid du Colombier 18737dd7cddfSDavid du Colombier<li>Also see regarding <a href="#System_V">System V</a> platforms. 18747dd7cddfSDavid du Colombier</ul> 18757dd7cddfSDavid du Colombier 18763ff48bf5SDavid du Colombier<h4><a name="BSDI"></a>BSDI</h4> 18777dd7cddfSDavid du Colombier 18787dd7cddfSDavid du Colombier<ul> 18797dd7cddfSDavid du Colombier 18807dd7cddfSDavid du Colombier<li>Use <b><tt>unix-gcc.mak</tt></b> and set<blockquote><b><tt> 18817dd7cddfSDavid du ColombierSTDLIBS=-lm<br> 18827dd7cddfSDavid du ColombierXINCLUDE=-I/usr/X11R6/include<br> 18837dd7cddfSDavid du ColombierXLIBDIRS=-L/usr/X11R6/lib<br> 18847dd7cddfSDavid du ColombierXLIBS=Xt SM ICE Xext X11<br></tt></b></blockquote> 18857dd7cddfSDavid du Colombier 18867dd7cddfSDavid du Colombier<li>If you want to use the shared versions of the PNG and zlib libraries, set 18877dd7cddfSDavid du Colombier<b><tt>SHARE_LIBPNG=1</tt></b> and <b><tt>SHARE_ZLIB=1</tt></b> 18887dd7cddfSDavid du Colombieras discussed <a href="#UNIX_makefile">previously</a>. 18897dd7cddfSDavid du Colombier 18907dd7cddfSDavid du Colombier<li>BSD <b><tt>make</tt></b> uses a different syntax for its 18917dd7cddfSDavid du Colombier<b><tt>include</tt></b> directive than Ghostscript; 18927dd7cddfSDavid du Colombieruse <b><tt>gmake</tt></b> instead. 18937dd7cddfSDavid du Colombier</ul> 18947dd7cddfSDavid du Colombier 18953ff48bf5SDavid du Colombier<h4><a name="Digital_Unix"></a>Digital Unix (Alpha)</h4> 18967dd7cddfSDavid du Colombier 18977dd7cddfSDavid du Colombier<ul> 18987dd7cddfSDavid du Colombier 18997dd7cddfSDavid du Colombier<li>Use <b><tt>unixansi.mak</tt></b> for all Digital Unix compilers. 19007dd7cddfSDavid du Colombier 19017dd7cddfSDavid du Colombier<li>For versions of Digital Unix before 4.0, set 19027dd7cddfSDavid du Colombier 19037dd7cddfSDavid du Colombier<p> 19047dd7cddfSDavid du Colombier<b><tt>CFLAGS=-std -migrate -Olimit 1000 -g3 -O2 $(XCFLAGS)<br> 19057dd7cddfSDavid du ColombierLDFLAGS=-lots $(XLDFLAGS)</tt></b> 19067dd7cddfSDavid du Colombier 19077dd7cddfSDavid du Colombier<p> 19087dd7cddfSDavid du ColombierYou may be able to omit <b><tt>-g3</tt></b>. For later versions of Digital 19097dd7cddfSDavid du ColombierUnix, users have reported that the proper flags are 19107dd7cddfSDavid du Colombier 19117dd7cddfSDavid du Colombier<p> 19127dd7cddfSDavid du Colombier<b><tt>CFLAGS=-std1 -Olimit 1000 -g3 -O2 $(XCFLAGS)</tt></b> 19137dd7cddfSDavid du Colombier 19147dd7cddfSDavid du Colombier<p> 19157dd7cddfSDavid du Colombieragain, optionally omitting the <b><tt>-g3</tt></b>. 19163ff48bf5SDavid du Colombier 19173ff48bf5SDavid du Colombier<li>If you get compiler error messages about "ANSI aliasing rules", please 19183ff48bf5SDavid du Colombiersee the section about <a href="#VMS_build">building under OpenVMS</a> below. 19193ff48bf5SDavid du Colombier 19207dd7cddfSDavid du Colombier</ul> 19217dd7cddfSDavid du Colombier 19223ff48bf5SDavid du Colombier<h4><a name="Linux"></a>Linux</h4> 19237dd7cddfSDavid du Colombier 19247dd7cddfSDavid du Colombier<ul> 19257dd7cddfSDavid du Colombier<li>If you build on Linux with X11 R6 or later, you may get link-time error 19267dd7cddfSDavid du Colombiermessages about undefined references to various functions beginning with 19277dd7cddfSDavid du Colombier"SMC" and "ICE". If this happens, make sure that <b><tt>XLIBS</tt></b> in 19287dd7cddfSDavid du Colombierthe makefile is set to 19297dd7cddfSDavid du Colombier"<b><tt>Xt SM ICE Xext X11</tt></b>" rather than 19307dd7cddfSDavid du Colombier"<b><tt>Xt Xext X11</tt></b>". 19317dd7cddfSDavid du Colombier 1932*593dc095SDavid du Colombier<li>On very old systems (circa gcc version 2.6.3), you may encounter an incompatibility 1933*593dc095SDavid du Colombierin object formats (a.out vs. ELF) with the XFree86 library. 19347dd7cddfSDavid du ColombierTypically, <b><tt>ld</tt></b> complains that some X library is not found, 19357dd7cddfSDavid du Colombieror that many <b><tt>Xlib</tt></b> or <b><tt>Xt</tt></b> functions are not 19367dd7cddfSDavid du Colombierfound in the library (similar to the messages for omitting 19377dd7cddfSDavid du Colombier<b><tt>SM</tt></b> and <b><tt>ICE</tt></b> from <b><tt>XLIBS</tt></b>). Or 19387dd7cddfSDavid du Colombieryou get a message when you start Ghostscript that the program or the shared 19397dd7cddfSDavid du Colombierlibrary is an unrecognized format. 1940*593dc095SDavid du ColombierIf this happens, edit your top-level makefile to add the switches 19417dd7cddfSDavid du Colombier"<b><tt>-b i486-linuxaout</tt></b>" to both <b><tt>CFLAGS</tt></b> and 19427dd7cddfSDavid du Colombier<b><tt>LDFLAGS</tt></b>, then "<b><tt>make clean</tt></b>" followed by 19437dd7cddfSDavid du Colombier"<b><tt>make</tt></b>"). If this doesn't help, or if other strange things 19447dd7cddfSDavid du Colombierhappen, contact your Linux supplier or support resource. 19457dd7cddfSDavid du Colombier 1946*593dc095SDavid du Colombier<li>A few of Ghostscript's drivers are multi-threaded. None of them are 1947*593dc095SDavid du Colombierin the default build. Currently the only ones are the "bmpa" series. 1948*593dc095SDavid du ColombierThese drivers require <b><tt>libc</tt></b> 1949*593dc095SDavid du Colombierversion 6 or higher. Most distributions include this, but it may be 1950*593dc095SDavid du Colombieran issue on very old systems. 19517dd7cddfSDavid du Colombier</ul> 19527dd7cddfSDavid du Colombier 19537dd7cddfSDavid du Colombier 19543ff48bf5SDavid du Colombier<h4><a name="NeXTSTEP"></a>NeXTSTEP / OpenSTEP</h4> 19557dd7cddfSDavid du Colombier 19567dd7cddfSDavid du Colombier<ul> 19577dd7cddfSDavid du Colombier<li>If you are using a NeXTSTEP version before 3.3, please get a no-cost 19587dd7cddfSDavid du Colombierupgrade (along with Y2K patches) from Apple. 19597dd7cddfSDavid du Colombier 1960*593dc095SDavid du Colombier<li>If '<tt>./configure && make</tt>' fails, then for all NeXTSTEP systems, use 1961*593dc095SDavid du Colombier<b><tt>unix-gcc.mak</tt></b> and make the following changes: 19627dd7cddfSDavid du Colombier 19637dd7cddfSDavid du Colombier<ul> 19647dd7cddfSDavid du Colombier<li>In <b><tt>unix-aux.mak</tt></b> (and <b><tt>ugcclib.mak</tt></b>, if you 19657dd7cddfSDavid du Colombierare using only the library) change the definition of <b><tt>INCLUDE</tt></b> 19667dd7cddfSDavid du Colombierto "<b><tt>INCLUDE=/usr/include/bsd</tt></b>"; 19677dd7cddfSDavid du Colombier 19683ff48bf5SDavid du Colombier<li>in <b><tt>unix-gcc.mak</tt></b>: 19693ff48bf5SDavid du Colombier 19703ff48bf5SDavid du Colombier<ul> 19713ff48bf5SDavid du Colombier<li>change <b><tt>CC=gcc</tt></b> to <b><tt>CC=cc</tt></b>; 19723ff48bf5SDavid du Colombier 19733ff48bf5SDavid du Colombier<li>change the definition of <b><tt>STDLIBS</tt></b> to only 19743ff48bf5SDavid du Colombier<b><tt>-lm</tt></b>; 19753ff48bf5SDavid du Colombier 19763ff48bf5SDavid du Colombier<li>change <b><tt>SYNC=posync</tt></b> to <b><tt>SYNC=nosync</tt></b>; 19773ff48bf5SDavid du Colombier 19783ff48bf5SDavid du Colombier<li>add <b><tt>-D_POSIX_SOURCE</tt></b> to <b><tt>CFLAGS</tt></b> and remove 19793ff48bf5SDavid du Colombier<b><tt>-g</tt></b>; 19803ff48bf5SDavid du Colombier 19813ff48bf5SDavid du Colombier<li>remove <b><tt>-Wstrict-prototypes</tt></b> from <b><tt>GCFLAGS</tt></b>, 19823ff48bf5SDavid du Colombierand if you are using NeXTSTEP 3.3 (with gcc 2.5.8), also remove 19833ff48bf5SDavid du Colombier<b><tt>-Wmissing-declarations</tt></b>; 19843ff48bf5SDavid du Colombier</ul> 19857dd7cddfSDavid du Colombier 19867dd7cddfSDavid du Colombier<li>to the end of <b><tt>Fontmap.GS</tt></b> add the line 19877dd7cddfSDavid du Colombier"<b><tt>/Ohlfs /Courier ;</tt></b>". 19887dd7cddfSDavid du Colombier</ul> 19897dd7cddfSDavid du Colombier 19907dd7cddfSDavid du Colombier<li>If you are running the Pencom co-Xist X server (development version), 19917dd7cddfSDavid du Colombierthe X headers and libraries are in the default places, so change the 19927dd7cddfSDavid du Colombiermakefile definitions of <b><tt>XINCLUDE</tt></b> and 19937dd7cddfSDavid du Colombier<b><tt>XLIBDIRS</tt></b> to empty strings. 19947dd7cddfSDavid du Colombier</ul> 19957dd7cddfSDavid du Colombier 19963ff48bf5SDavid du Colombier<h4><a name="SCO"></a>SCO Unix/Xenix</h4> 19977dd7cddfSDavid du Colombier 19987dd7cddfSDavid du Colombier<ul> 19997dd7cddfSDavid du Colombier<li>See also "<a href="#386_Unix">386 Unix</a>" and 20003ff48bf5SDavid du Colombier"<a href="#System_V">System V Unix platforms</a>". 20017dd7cddfSDavid du Colombier 20027dd7cddfSDavid du Colombier<li>The standard cc compiler on SCO OpenServer v5 has optimizer bugs. 20037dd7cddfSDavid du ColombierCompile without -O. 20047dd7cddfSDavid du Colombier 20057dd7cddfSDavid du Colombier<li>The SCO Unix C compiler apparently can't handle the 20067dd7cddfSDavid du Colombier<b><tt>P</tt></b><em>n</em> macros in <b><tt>std.h</tt></b>. If you get 20077dd7cddfSDavid du Colombierstrange compilation errors on SCO Unix, ask SCO for a compiler fix. 20087dd7cddfSDavid du Colombier 20097dd7cddfSDavid du Colombier<li>Meanwhile, to use gcc with SCO ODT, see <b><tt>unix-gcc.mak</tt></b> 20107dd7cddfSDavid du Colombierfor the appropriate switch settings. 20117dd7cddfSDavid du Colombier 20127dd7cddfSDavid du Colombier<li>Because of a bug in SCO's floating point emulator, gcc 2.3.3 produces 20137dd7cddfSDavid du Colombiercode that causes crashes on machines without hardware floating point. Use 20147dd7cddfSDavid du Colombiera different compiler on these machines. 20157dd7cddfSDavid du Colombier 20167dd7cddfSDavid du Colombier<li>If you aren't using the X11 driver, you must add 20177dd7cddfSDavid du Colombier<b><tt>-lsocket</tt></b> to the value of <b><tt>EXTRALIBS</tt></b> to link 20187dd7cddfSDavid du Colombierthe date and time functions. 20197dd7cddfSDavid du Colombier 20207dd7cddfSDavid du Colombier<li>If you want to use direct frame buffer addressing instead of X Windows, 20217dd7cddfSDavid du Colombierinclude the relevant frame buffer devices (<b><tt>$(DD)ega.dev</tt></b>, 20227dd7cddfSDavid du Colombier<b><tt>$(DD)vga.dev</tt></b>, etc.) and change the definition of 20237dd7cddfSDavid du Colombier<b><tt>EGAVGA</tt></b> to <b><tt>$(EGAVGA_SCO)</tt></b> as indicated in 20247dd7cddfSDavid du Colombier<b><tt>devs.mak</tt></b>. <b>Note</b>: this works with SuperVGA displays 20257dd7cddfSDavid du Colombieronly for 800x600x16 mode. 20267dd7cddfSDavid du Colombier 20277dd7cddfSDavid du Colombier<li>If the display looks "smeared", try recompiling 20287dd7cddfSDavid du Colombier<b><tt>gdevpcfb.c</tt></b> with <b><tt>-O0</tt></b>. 20297dd7cddfSDavid du Colombier 20307dd7cddfSDavid du Colombier<li>If Ghostscript crashes, use the <b><tt>-q</tt></b> switch or redirect 20317dd7cddfSDavid du Colombierconsole output to a file. 20327dd7cddfSDavid du Colombier 20337dd7cddfSDavid du Colombier<li>If your compiler accepts both the <b><tt>-Xt</tt></b> and 20347dd7cddfSDavid du Colombier<b><tt>-Xa</tt></b> switches, use <b><tt>-Xt</tt></b>. Even though this 20357dd7cddfSDavid du Colombiercauses the compiler to use incorrect rules for computing the result types 20367dd7cddfSDavid du Colombierof "<b><tt><<</tt></b>" and "<b><tt>>></tt></b>", 20377dd7cddfSDavid du Colombier<b><tt>-Xa</tt></b> enables optimizations that produce incorrect code. 20387dd7cddfSDavid du Colombier 20397dd7cddfSDavid du Colombier<li>For SCO ODT 2.0, in addition to <b><tt>-D__SVR3</tt></b> and 20407dd7cddfSDavid du Colombier<b><tt>-DSYSV</tt></b>, you need to specify <b><tt>-Dsco</tt></b>, 20417dd7cddfSDavid du Colombier<b><tt>-DUSG</tt></b>, and <b><tt>-DMALLOC_0_RETURNS_NULL</tt></b>. For 20427dd7cddfSDavid du ColombierSCO ODT, you need 20437dd7cddfSDavid du Colombier"<b><tt>EXTRALIBS=-lX11 -lsocket -lmalloc</tt></b>", or maybe 20447dd7cddfSDavid du Colombieronly <b><tt>-lsocket</tt></b> depending on the version), and for SCO ODT 20457dd7cddfSDavid du Colombier2.0, you must also specify <b><tt>-lc_s</tt></b>. For SCO Xenix, you need 20467dd7cddfSDavid du Colombier"<b><tt>EXTRALIBS=-lmalloc</tt></b>". 20477dd7cddfSDavid du Colombier 20487dd7cddfSDavid du Colombier<li>For SCO OpenServer 5.0.5, add <b><tt>-L/usr/local/lib</tt></b> to 20497dd7cddfSDavid du Colombier<b><tt>LDFLAGS</tt></b>. 20507dd7cddfSDavid du Colombier 20517dd7cddfSDavid du Colombier<li>For all SCO systems, set "<b><tt>XINCLUDE=</tt></b>" and 20527dd7cddfSDavid du Colombier"<b><tt>XLIBDIRS=</tt></b>". 20537dd7cddfSDavid du Colombier</ul> 20547dd7cddfSDavid du Colombier 20553ff48bf5SDavid du Colombier<h4><a name="SVR4"></a>SVR4 Unix</h4> 20567dd7cddfSDavid du Colombier 20577dd7cddfSDavid du Colombier<ul> 20587dd7cddfSDavid du Colombier<li>You may need to set <b><tt>EXTRALIBS=-lnsl</tt></b>. 20597dd7cddfSDavid du Colombier 20607dd7cddfSDavid du Colombier<li>Do <b><em>not</em></b> change <b><tt>PLATFORM=unix_</tt></b> to <b><tt>PLATFORM=sysv_</tt></b>. 20617dd7cddfSDavid du Colombier 20627dd7cddfSDavid du Colombier<li>On SVR4 Unix platforms with dynamic linking, you may need to define 20637dd7cddfSDavid du Colombier<b><tt>XLIBDIR</tt></b> as the name of the directory that holds the X 20647dd7cddfSDavid du ColombierWindows libraries. Do <b><em>not</em></b> prefix the name with 20657dd7cddfSDavid du Colombier"<b><tt>-L</tt></b>". 20667dd7cddfSDavid du Colombier 20677dd7cddfSDavid du Colombier<li>For SVR4.0 systems, set <b><tt>-DSVR4</tt></b> and 20687dd7cddfSDavid du Colombier<b><tt>-DSVR4_0</tt></b> in the makefile; do <b><em>not</em></b> set 20697dd7cddfSDavid du Colombier<b><tt>-DSYSV</tt></b>. For SVR4.2 (or later) and Solaris 2.<em>n</em> 20707dd7cddfSDavid du Colombiersystems, set only <b><tt>-DSVR4</tt></b> (<b><em>not</em></b> 20717dd7cddfSDavid du Colombier<b><tt>-DSVR4_0</tt></b> nor <b><tt>-DSYSV</tt></b>). 20727dd7cddfSDavid du Colombier</ul> 20737dd7cddfSDavid du Colombier 20743ff48bf5SDavid du Colombier<h4><a name="System_V"></a>System V Unix platforms</h4> 20757dd7cddfSDavid du Colombier 20767dd7cddfSDavid du Colombier<ul> 20777dd7cddfSDavid du Colombier<li>If you are using a stock System V platform that lacks 20787dd7cddfSDavid du Colombier<b><tt>rename</tt></b> and <b><tt>gettimeofday</tt></b>, in the makefile 20797dd7cddfSDavid du Colombierchange "<b><tt>PLATFORM=unix_</tt></b>" to 20807dd7cddfSDavid du Colombier"<b><tt>PLATFORM=sysv_</tt></b>". 20817dd7cddfSDavid du Colombier 20827dd7cddfSDavid du Colombier<li>You will probably need to change the definition of 20837dd7cddfSDavid du Colombier<b><tt>INSTALL</tt></b> from "<b><tt>install</tt></b>" to 20847dd7cddfSDavid du Colombier"<b><tt>/usr/ucb/install</tt></b>". 20857dd7cddfSDavid du Colombier</ul> 20867dd7cddfSDavid du Colombier 20873ff48bf5SDavid du Colombier<h4><a name="Unixware"></a>Unixware</h4> 20887dd7cddfSDavid du Colombier 20897dd7cddfSDavid du Colombier<ul> 20907dd7cddfSDavid du Colombier<li>The standard cc compiler has optimizer bugs. Compile without 20917dd7cddfSDavid du Colombier<b><tt>-O</tt></b>. 20927dd7cddfSDavid du Colombier</ul> 20937dd7cddfSDavid du Colombier 20943ff48bf5SDavid du Colombier<h3><a name="Hardware_specific_issues"></a>Hardware-specific issues</h3> 20957dd7cddfSDavid du Colombier 20963ff48bf5SDavid du Colombier<h4><a name="Alpha_with_gcc"></a>Alpha with gcc</h4> 20977dd7cddfSDavid du Colombier 20987dd7cddfSDavid du Colombier<ul> 20997dd7cddfSDavid du Colombier<li>You don't have to use gcc on Alpha systems, because the bundled 21007dd7cddfSDavid du Colombiercompiler works. 21017dd7cddfSDavid du Colombier 21027dd7cddfSDavid du Colombier<li>The Alpha code generator in gcc 2.7.2.1 is broken. gcc 2.5.8 and 2.6.3 21037dd7cddfSDavid du Colombierare probably usable. Versions before 2.5.0 are believed not to work. We 21047dd7cddfSDavid du Colombiersuggest you use a recent version. 21057dd7cddfSDavid du Colombier</ul> 21067dd7cddfSDavid du Colombier 21073ff48bf5SDavid du Colombier<h4><a name="Apollo"></a>H-P Apollo</h4> 21087dd7cddfSDavid du Colombier 21097dd7cddfSDavid du Colombier<ul> 21107dd7cddfSDavid du Colombier 21117dd7cddfSDavid du Colombier<li>You must run the compiler in ANSI-compatible mode (that is, set <b><tt>AK=</tt></b>{null string} in the makefile); otherwise it gives incorrect error 21127dd7cddfSDavid du Colombiermessages for any function declared as returning a float value. 21137dd7cddfSDavid du Colombier 21147dd7cddfSDavid du Colombier<li>The H-P Apollo compiler may not compile Ghostscript correctly. If you 21157dd7cddfSDavid du Colombierget unexpected crashes at run time, use gcc. 21167dd7cddfSDavid du Colombier</ul> 21177dd7cddfSDavid du Colombier 21183ff48bf5SDavid du Colombier<h4><a name="ATT_7040"></a>AT&T 7040 R3</h4> 21197dd7cddfSDavid du Colombier 21207dd7cddfSDavid du Colombier<ul> 21217dd7cddfSDavid du Colombier<li>If Ghostscript crashes on startup, recompile with <b><tt>-O0</tt></b> 21227dd7cddfSDavid du Colombierto work around compiler bugs. 21237dd7cddfSDavid du Colombier</ul> 21247dd7cddfSDavid du Colombier 21253ff48bf5SDavid du Colombier<h4><a name="Convex"></a>Convex</h4> 21267dd7cddfSDavid du Colombier 21277dd7cddfSDavid du Colombier<ul> 21287dd7cddfSDavid du Colombier 21297dd7cddfSDavid du Colombier<li>Use <b><tt>unixansi.mak</tt></b>. Do not invoke optimization 21307dd7cddfSDavid du Colombier(<b><tt>-O1</tt></b>) because the compiler will produce incorrect code. 21317dd7cddfSDavid du Colombier 21327dd7cddfSDavid du Colombier<li>Set <b><tt>CFLAGS</tt></b> to 21337dd7cddfSDavid du Colombier"<b><tt>-no -fn -tm c1</tt></b>". 21347dd7cddfSDavid du Colombier</ul> 21357dd7cddfSDavid du Colombier 21363ff48bf5SDavid du Colombier<h4><a name="DECStations"></a>DECStations with Ultrix</h4> 21377dd7cddfSDavid du Colombier 21387dd7cddfSDavid du Colombier<ul> 21397dd7cddfSDavid du Colombier 21407dd7cddfSDavid du Colombier<li>If you get the compiler message "cfe: Fatal: _temp_19086.c: 21417dd7cddfSDavid du ColombierSegmentation violation" or a similar one, try compiling with the 21427dd7cddfSDavid du Colombier<b><tt>-oldc</tt></b> switch. 21437dd7cddfSDavid du Colombier 21447dd7cddfSDavid du Colombier<li>You may wish to set 21457dd7cddfSDavid du Colombier 21467dd7cddfSDavid du Colombier<p> 21477dd7cddfSDavid du Colombier<b><tt>GS_LIB_DEFAULT=$(gsdatadir):/usr/lib/DPS/outline/decwin:$(gsdatadir)/fonts</tt></b> 21487dd7cddfSDavid du Colombier 21497dd7cddfSDavid du Colombier<p> 21507dd7cddfSDavid du Colombierin the makefile to add the Display PostScript font directory to the font 21517dd7cddfSDavid du Colombiersearch path. 21527dd7cddfSDavid du Colombier 21537dd7cddfSDavid du Colombier<li>Set 21547dd7cddfSDavid du Colombier 21557dd7cddfSDavid du Colombier<p> 21567dd7cddfSDavid du Colombier<b><tt>CFLAGS="-Olimit 2500"</tt></b> 21577dd7cddfSDavid du Colombier 21587dd7cddfSDavid du Colombier<p> 21597dd7cddfSDavid du Colombierto make the optimizer allocate enough table space. 21607dd7cddfSDavid du Colombier 21617dd7cddfSDavid du Colombier<li>The Ultrix 4.4 C compiler compiles <b><tt>gdevm1.c</tt></b> 21627dd7cddfSDavid du Colombierincorrectly. Insert the following line in the makefile rule for 21637dd7cddfSDavid du Colombier"<b><tt>gdevm1.$(OBJ)</tt></b>" (the body of the rule is empty in the 21647dd7cddfSDavid du Colombierstandard distribution): 21657dd7cddfSDavid du Colombier 21667dd7cddfSDavid du Colombier<p> 21677dd7cddfSDavid du Colombier<b><tt>$(CCC) -oldc gdevm1.c</tt></b> 21687dd7cddfSDavid du Colombier</ul> 21697dd7cddfSDavid du Colombier 21703ff48bf5SDavid du Colombier<h4><a name="HP_RISC"></a>H-P RISC workstations</h4> 21717dd7cddfSDavid du Colombier 21727dd7cddfSDavid du Colombier<ul> 21737dd7cddfSDavid du Colombier 21747dd7cddfSDavid du Colombier<li>HP-UX versions before 11.0 do not support POSIX threads. Set 21757dd7cddfSDavid du Colombier<b><tt>SYNC=nosync</tt></b> in the makefile before building. 21767dd7cddfSDavid du Colombier 21777dd7cddfSDavid du Colombier<li>Ghostscript builds on H-P machines with either GNU gcc or H-P's 21787dd7cddfSDavid du ColombierANSI-capable <b><tt>cc</tt></b>. The minimal, non-ANSI-capable 2179*593dc095SDavid du Colombier<b><tt>cc</tt></b> that shiped with some basic HPUX system does <em>not</em> 21807dd7cddfSDavid du Colombierwork. If <b><tt>cc</tt></b> on your system doesn't accept the 21817dd7cddfSDavid du Colombier<b><tt>-Aa</tt></b> switch, then you need to get the full 21827dd7cddfSDavid du Colombier<b><tt>cc</tt></b> or gcc. 21837dd7cddfSDavid du Colombier 21847dd7cddfSDavid du Colombier<li>If you use H-P's compiler, be sure you have upgraded to a recent 21857dd7cddfSDavid du Colombierrelease. Many bizarre symptoms have been reported trying to build 21867dd7cddfSDavid du ColombierGhostscript with older, buggier compilers, for example: 21877dd7cddfSDavid du Colombier<ul> 21887dd7cddfSDavid du Colombier<li>The link step fails with a message about "<b><tt>max</tt></b>" not being defined. 21897dd7cddfSDavid du Colombier<li>The build succeeds, but the resulting executable fails to start up, 21907dd7cddfSDavid du Colombierwith an error message like "Initializing... Unrecoverable error: typecheck 21917dd7cddfSDavid du Colombierin .registerencoding". 21927dd7cddfSDavid du Colombier<li>The build succeeds, but the resulting executable produces a black 21937dd7cddfSDavid du Colombierbackground on the first page of output. 21947dd7cddfSDavid du Colombier</ul> 21957dd7cddfSDavid du Colombier 21967dd7cddfSDavid du Colombier<li>It is reported that On HPUX 9.* you need at least compiler patch 21977dd7cddfSDavid du ColombierPHSS_5723 and dld.sl patch PHSS_5734 to build Ghostscript. (As of late 21987dd7cddfSDavid du Colombier1997, those patches are long obsolete; the current patches are compiler 21997dd7cddfSDavid du ColombierPHSS_10357 and dld.sl PHSS_11246. It is unknown whether current 22007dd7cddfSDavid du ColombierGhostscript releases work with compiler/dld.sl versions older than these.) 22017dd7cddfSDavid du Colombier 22027dd7cddfSDavid du Colombier<li>On HPUX 10.*, we don't know what combinations of compiler version and 22037dd7cddfSDavid du Colombierswitches work. It is reported that On HPUX 10.20, setting 22047dd7cddfSDavid du Colombier"<b><tt>CC=c89</tt></b>" and "<b><tt>CFLAGS=+O3 $(XCFLAGS)</tt></b>" 22057dd7cddfSDavid du Colombierworks, contradicting the information in the next paragraph, but this may be 22067dd7cddfSDavid du Colombierdependent on the specific compiler version. 22077dd7cddfSDavid du Colombier 22087dd7cddfSDavid du Colombier<li>In either HPUX version, you need to set 22097dd7cddfSDavid du Colombier"<b><tt>CC=cc -Aa</tt></b>" (or use <b><tt>-Ae</tt></b> if you 22107dd7cddfSDavid du Colombierprefer), and set 22117dd7cddfSDavid du Colombier"<b><tt>CFLAGS=-D_HPUX_SOURCE -O $(XCFLAGS)</tt></b>". Higher 22127dd7cddfSDavid du Colombierlevels of optimization than <b><tt>-O</tt></b> may work depending on your 22137dd7cddfSDavid du Colombiercompiler revision; some users have reported success with 22147dd7cddfSDavid du Colombier<b><tt>+O3</tt></b>, some have not. 22157dd7cddfSDavid du Colombier 22167dd7cddfSDavid du Colombier<li>Some users have reported needing <b><tt>-DNOSYSTIME</tt></b> and 22177dd7cddfSDavid du Colombier<b><tt>-D_POSIX_SOURCE</tt></b> in <b><tt>CFLAGS</tt></b>, but recent tests 22187dd7cddfSDavid du Colombierdo not show these to be necessary. 22197dd7cddfSDavid du Colombier 2220*593dc095SDavid du Colombier<li>If you use gcc, it's a good idea to have a recent release -- at the 2221*593dc095SDavid du Colombiervery least 2.7.2.1 or later.You may be able to get a working 22227dd7cddfSDavid du Colombierexecutable with an older gcc by removing <b><tt>-O</tt></b> from 22237dd7cddfSDavid du Colombier<b><tt>CFLAGS</tt></b>. 22247dd7cddfSDavid du Colombier</ul> 22257dd7cddfSDavid du Colombier 22263ff48bf5SDavid du Colombier<h4><a name="Intergraph"></a>Intergraph Clipper</h4> 22277dd7cddfSDavid du Colombier 22287dd7cddfSDavid du Colombier<ul> 22297dd7cddfSDavid du Colombier<li>Recommended settings are: 22307dd7cddfSDavid du Colombier 22317dd7cddfSDavid du Colombier<p> 22327dd7cddfSDavid du Colombier<b><tt>XCFLAGS=-w -Q -DSYSV -D__SVR3<br> 22337dd7cddfSDavid du ColombierEXTRALIBS=-lbsd -lc_s<br> 22347dd7cddfSDavid du ColombierCC=acc -knr<br> 22357dd7cddfSDavid du ColombierPLATFORM=sysv_</tt></b><br> 22367dd7cddfSDavid du Colombier 22377dd7cddfSDavid du Colombier<li>You will probably need to change the value of <b><tt>XLIBS</tt></b> from 22387dd7cddfSDavid du Colombier"<b><tt>XLIBS=Xt X11 Xext</tt></b>" to "<b><tt>XLIBS=Xt_s X11_s Xext</tt></b>". 22397dd7cddfSDavid du Colombier</ul> 22407dd7cddfSDavid du Colombier 22413ff48bf5SDavid du Colombier<h4><a name="MIPS"></a>MIPS</h4> 22427dd7cddfSDavid du Colombier 22437dd7cddfSDavid du Colombier<ul> 22447dd7cddfSDavid du Colombier<li>There is apparently a bug in older versions of the MIPS C compiler 22457dd7cddfSDavid du Colombierwhich causes <b><tt>gxdither.c</tt></b> to compile incorrectly if 22467dd7cddfSDavid du Colombieroptimization is enabled (<b><tt>-O</tt></b>). However, this bug is 22477dd7cddfSDavid du Colombierdefinitely fixed in MipsPRO C version 6.00; with this version, compiling 22487dd7cddfSDavid du Colombierwith "<b><tt>-O2 -mips2</tt></b>" produces good output. 22497dd7cddfSDavid du Colombier</ul> 22507dd7cddfSDavid du Colombier 22513ff48bf5SDavid du Colombier<h4><a name="NCR_3550"></a>NCR 3550</h4> 22527dd7cddfSDavid du Colombier 22537dd7cddfSDavid du Colombier<ul> 22547dd7cddfSDavid du Colombier<li>With the NCR C Development Toolkit you must use <b><tt>-O0</tt></b>. 22557dd7cddfSDavid du Colombier</ul> 22567dd7cddfSDavid du Colombier 22573ff48bf5SDavid du Colombier<h4><a name="Pyramid"></a>Pyramid MIServer-S</h4> 22587dd7cddfSDavid du Colombier 22597dd7cddfSDavid du Colombier<p> 22607dd7cddfSDavid du ColombierSee "<a href="#ATT_7040">AT&T 7040 R3</a>". 22617dd7cddfSDavid du Colombier 22623ff48bf5SDavid du Colombier<h4><a name="RS6000"></a>IBM RS/6000 with AIX</h4> 22637dd7cddfSDavid du Colombier 22647dd7cddfSDavid du Colombier<ul> 22657dd7cddfSDavid du Colombier 22667dd7cddfSDavid du Colombier<li>Many versions of the AIX C compiler have bugs that have prevented 22677dd7cddfSDavid du ColombierGhostscript from compiling and linking properly. We believe that the 22687dd7cddfSDavid du Colombiercurrent Ghostscript release works around these bugs, and that 22697dd7cddfSDavid du Colombier<b><tt>unixansi.mak</tt></b> with <b><tt>CC=cc</tt></b> should work. 22707dd7cddfSDavid du Colombier 22717dd7cddfSDavid du Colombier<li>You must also edit the makefile (<b><tt>unixansi.mak</tt></b>) to change 22727dd7cddfSDavid du Colombier<b><tt>INSTALL</tt></b> to <b><tt>/usr/ucb/install</tt></b>. 22737dd7cddfSDavid du Colombier 22747dd7cddfSDavid du Colombier<li>AIX doesn't use a separate library for multi-thread support: set 22757dd7cddfSDavid du Colombier<b><tt>STDLIBS=-lm</tt></b> in the makefile. 22767dd7cddfSDavid du Colombier 22777dd7cddfSDavid du Colombier<li>If <b><tt>-DSYSV</tt></b> produces a complaint about the functions 22787dd7cddfSDavid du Colombier<b><tt>index</tt></b> and <b><tt>rindex</tt></b> not being defined, try 22797dd7cddfSDavid du Colombierremoving it. 22807dd7cddfSDavid du Colombier 22817dd7cddfSDavid du Colombier<li>If the xlc 1.2.1 optimizer runs out of memory, you may need to add 22827dd7cddfSDavid du Colombier<b><tt>-qmaxmem=4000</tt></b> to <b><tt>CFLAGS</tt></b>. 22837dd7cddfSDavid du Colombier 22847dd7cddfSDavid du Colombier<li>A user reports that the AIX C compiler shipped with AIX 3.2.5 compiles 22857dd7cddfSDavid du ColombierGhostscript only if invoked with "<b><tt>c89 -D_POSIX_SOURCE</tt></b>" 22867dd7cddfSDavid du Colombierand <b><em>without</em></b> <b><tt>-O</tt></b>. On the other hand, another 22877dd7cddfSDavid du Colombieruser reports successful compilation using <b><tt>unix-ansi.mak</tt></b> and 22887dd7cddfSDavid du Colombierthe command line 22897dd7cddfSDavid du Colombier 22907dd7cddfSDavid du Colombier<p> 22917dd7cddfSDavid du Colombier<b><tt>make CC=c89 XCFLAGS="-DOSY_AIX -D_ALL_SOURCE -qnoro -qmaxmem=3000 -bfl" $*</tt></b><br> 22927dd7cddfSDavid du Colombier 22937dd7cddfSDavid du Colombier<li>Apparently some (but not all) releases of the C library declare the 22947dd7cddfSDavid du Colombier<b><tt>hypot</tt></b> function: if the declaration in 22957dd7cddfSDavid du Colombier<b><tt>math_.h</tt></b> produces an error message, try removing it. 22967dd7cddfSDavid du Colombier 22977dd7cddfSDavid du Colombier<li>The IBM X11R3 server is known to be buggy: use the MIT X server if 22987dd7cddfSDavid du Colombierpossible. 22997dd7cddfSDavid du Colombier 23007dd7cddfSDavid du Colombier<li>The xlc 1.3.0.x compiler provided in AIX 3.2.5+ definitely will not 23017dd7cddfSDavid du Colombiercompile Ghostscript correctly if <b><tt>-O</tt></b> is used on all files. 23027dd7cddfSDavid du ColombierA user reports that compiling <b><tt>z</tt></b>*<b><tt>.c</tt></b>, 23037dd7cddfSDavid du Colombier<b><tt>gsmatrix.c</tt></b>, <b><tt>gxstroke.c</tt></b> without 23047dd7cddfSDavid du Colombier<b><tt>-O</tt></b> is sufficient to produce a working executable:. 23057dd7cddfSDavid du Colombier 23067dd7cddfSDavid du Colombier<li>Some installations of AIX 3.2.5 have what appears to be an incorrect or 23077dd7cddfSDavid du Colombierinconsistent version of <b><tt>libXt.a</tt></b> in 23087dd7cddfSDavid du Colombier<b><tt>/usr/lpp/X11/lib</tt></b>. If linking shows 23097dd7cddfSDavid du Colombier<b><tt>XtShellStrings</tt></b> and <b><tt>XtStrings</tt></b> as unresolved 23107dd7cddfSDavid du Colombierexternals, set 23117dd7cddfSDavid du Colombier"<b><tt>XLIBDIRS=-L/usr/lpp/X11/lib/R5 -L/usr/lpp/X11/lib</tt></b>" 23127dd7cddfSDavid du Colombierrather than just "<b><tt>XLIBDIRS=-L/usr/lpp/X11/lib</tt></b>". 23137dd7cddfSDavid du Colombier 23143ff48bf5SDavid du Colombier<li>Ghostscript has been successfully compiled and runs under AIX 4.3.3 and 23153ff48bf5SDavid du Colombierthe IBM C compiler version 5. The following changes were required in 23163ff48bf5SDavid du Colombierunixansi.mak: 23173ff48bf5SDavid du Colombier 23183ff48bf5SDavid du Colombier<p> 23193ff48bf5SDavid du Colombier<b><tt>CC=xlc</tt></b> 23203ff48bf5SDavid du Colombier<br> 23213ff48bf5SDavid du Colombier<b><tt>XCFLAGS=-qalign=natural</tt></b> 23223ff48bf5SDavid du Colombier 23237dd7cddfSDavid du Colombier</ul> 23247dd7cddfSDavid du Colombier 23253ff48bf5SDavid du Colombier<h4> 23263ff48bf5SDavid du Colombier<a NAME="Silicon_Graphics"></a>Silicon Graphics</h4> 23277dd7cddfSDavid du Colombier 23287dd7cddfSDavid du Colombier<p> 23297dd7cddfSDavid du ColombierUsers have had a lot of problems with the MIPSpro compilers on SGI systems. 23307dd7cddfSDavid du ColombierWe recommend using gcc. If you do choose to use the MIPSpro compiler, 23317dd7cddfSDavid du Colombierplease read the following carefully. 23327dd7cddfSDavid du Colombier 23337dd7cddfSDavid du Colombier<ul> 23347dd7cddfSDavid du Colombier<li> 23357dd7cddfSDavid du ColombierTo make the optimizer allocate enough table space, set 23367dd7cddfSDavid du Colombier 23377dd7cddfSDavid du Colombier<p><b><tt>CFLAGS="-Olimit 2500"</tt></b> (for older compilers) 23387dd7cddfSDavid du Colombier<br><b><tt>CFLAGS="-OPT:Olimit=2500"</tt></b> (for newer compilers) 23397dd7cddfSDavid du Colombier 23407dd7cddfSDavid du Colombier<p> 23417dd7cddfSDavid du ColombierMIPSpro compiler version 3.19 is "older", and 7.1 is "newer"; we aren't 23427dd7cddfSDavid du Colombiersure at what point in between the latter syntax was introduced. 23437dd7cddfSDavid du Colombier 23447dd7cddfSDavid du Colombier<li> 23457dd7cddfSDavid du ColombierWith the compiler shipped with Irix 5.2, use the <b><tt>-ansi</tt></b> 23467dd7cddfSDavid du Colombieroption. 23477dd7cddfSDavid du Colombier 23487dd7cddfSDavid du Colombier<li> 23497dd7cddfSDavid du ColombierThe SGI C compiler may produce warnings about "Undefined the ANSI standard 23507dd7cddfSDavid du Colombierlibrary defined macro stdin/stdout/stderr". To suppress these warnings, add 23517dd7cddfSDavid du Colombier"<b><tt>-woff 608</tt></b>" to the definition of <b><tt>CFLAGS</tt></b>. 23527dd7cddfSDavid du Colombier 23537dd7cddfSDavid du Colombier<li> 23547dd7cddfSDavid du ColombierThe SGI C compiler shipped with Irix 6.1 and 6.2 will not compile 23557dd7cddfSDavid du Colombier<b><tt>zlib/deflate.c</tt></b> properly with optimization. Compile this file 23567dd7cddfSDavid du Colombierseparately without <b><tt>-O</tt></b>. 23577dd7cddfSDavid du Colombier 23587dd7cddfSDavid du Colombier<li> 23597dd7cddfSDavid du ColombierWith IRIX 6.5.x and the MIPSpro 7.x compilers there have been reports about 23607dd7cddfSDavid du Colombierincorrect output and binaries that cause segmentation faults. Various 23617dd7cddfSDavid du Colombiersolutions have been suggested and you may want to try them in this order, 23627dd7cddfSDavid du Colombieruntil you get a working binary: 23637dd7cddfSDavid du Colombier 23647dd7cddfSDavid du Colombier<ul> 23657dd7cddfSDavid du Colombier<li> 23667dd7cddfSDavid du ColombierCompile <b><tt>idict.c</tt></b> and <b><tt>isave.c</tt></b> separately 23677dd7cddfSDavid du Colombierwithout optimization after doing a normal compile; then relink.e.g.: 23687dd7cddfSDavid du Colombier 23697dd7cddfSDavid du Colombier<p> 23707dd7cddfSDavid du Colombier<b><tt>cc -OPT:Olimit=2500 -I. -I./obj -o ./obj/idict.o -c ./idict.c</tt></b><br> 23717dd7cddfSDavid du Colombier<b><tt>cc -OPT:Olimit=2500 -I. -I./obj -o ./obj/isave.o -c ./isave.c</tt></b> 23727dd7cddfSDavid du Colombier 23737dd7cddfSDavid du Colombier<li> 23747dd7cddfSDavid du ColombierSet <b><tt>CFLAGS=</tt></b> (no optimization). 23757dd7cddfSDavid du Colombier 23767dd7cddfSDavid du Colombier<li> 23777dd7cddfSDavid du ColombierUse only <b><tt>-O2</tt></b>. Compiler produces incorrect output 23787dd7cddfSDavid du Colombierwith <b><tt>-O3</tt></b> or "<b><tt>-Ofast=ip32 -show</tt></b>". 23797dd7cddfSDavid du Colombier 23807dd7cddfSDavid du Colombier<li> 23817dd7cddfSDavid du ColombierIrix 6.5.1m with MIPSpro compiler 7.2.1.1m, Irix 6.5.3m with MIPSpro 23827dd7cddfSDavid du Colombiercompiler 7.2.1, and probably other 6.5x / 7.2x combinations require 23837dd7cddfSDavid du Colombiercompiling with the <b><tt>-o32</tt></b> option. Compiling with the (default) 23847dd7cddfSDavid du Colombier<b><tt>-n32</tt></b> option produces non-working executables. 23857dd7cddfSDavid du Colombier<b><tt>-O2</tt></b> is OK (possibly except for <b><tt>idict.c</tt></b>), but 23867dd7cddfSDavid du Colombiernot <b><tt>-O3</tt></b>. 23877dd7cddfSDavid du Colombier</ul> 23887dd7cddfSDavid du Colombier</ul> 23897dd7cddfSDavid du Colombier 23903ff48bf5SDavid du Colombier<h4><a name="Sun"></a>Sun</h4> 23917dd7cddfSDavid du Colombier 23927dd7cddfSDavid du Colombier<ul> 23937dd7cddfSDavid du Colombier<li>The Sun unbundled C compiler (SC1.0) doesn't compile Ghostscript 23947dd7cddfSDavid du Colombierproperly with the <b><tt>-fast</tt></b> option: Ghostscript core-dumps in 23957dd7cddfSDavid du Colombier<b><tt>build_gs_font</tt></b>. With that compiler use <b><tt>-g</tt></b>, 23967dd7cddfSDavid du Colombieror use gcc instead. 23977dd7cddfSDavid du Colombier 23987dd7cddfSDavid du Colombier<li>The Sun version of <b><tt>dbx</tt></b> often gives up with an error 23997dd7cddfSDavid du Colombiermessage when trying to load Ghostscript. If this happens, use GNU 24007dd7cddfSDavid du Colombier<b><tt>gdb</tt></b> instead. (<b><tt>gdb</tt></b> is more reliable than 24017dd7cddfSDavid du Colombier<b><tt>dbx</tt></b> in other ways as well.) 24027dd7cddfSDavid du Colombier 24037dd7cddfSDavid du Colombier<li>A bug in some versions of <b><tt>zlib</tt></b> results in an undefined 24047dd7cddfSDavid du Colombiersymbol <b><tt>zmemcmp</tt></b> when compiling with Sun cc. Use gcc 24057dd7cddfSDavid du Colombierinstead. 24067dd7cddfSDavid du Colombier</ul> 24077dd7cddfSDavid du Colombier 24087dd7cddfSDavid du Colombier<h4><a name="SunOS"></a>SunOS</h4> 24097dd7cddfSDavid du Colombier 24107dd7cddfSDavid du Colombier<ul> 24117dd7cddfSDavid du Colombier<li>The <tt><b>tar</b></tt> program provided with SunOS 4.1.3 may not be 24127dd7cddfSDavid du Colombierable to unpack the archives in the standard Ghostscript distribution. 24137dd7cddfSDavid du ColombierGet a more recent version of <tt><b>tar</b></tt>, such as GNU 24147dd7cddfSDavid du Colombier<tt><b>tar</b></tt>. 24157dd7cddfSDavid du Colombier 24167dd7cddfSDavid du Colombier<li>In SunOS 4.1.[23], you may get undefined symbols 24177dd7cddfSDavid du Colombier<b><tt>_get_wmShellWidgetClass</tt></b> and 24187dd7cddfSDavid du Colombier<b><tt>_get_applicationShellWidgetClass</tt></b> when linking. Compiling 24197dd7cddfSDavid du Colombier"<b><tt>-Bstatic -lXmu -Bdynamic</tt></b>" appears to work for 24207dd7cddfSDavid du ColombierSC1.0. For gcc, try adding <b><tt>-static</tt></b> to 24217dd7cddfSDavid du Colombier<b><tt>CFLAGS</tt></b>. To solve the problem if you are using OpenWindows 24227dd7cddfSDavid du Colombier3.0 (X11R4-based Xt), ask Sun for patches 100512-02 and 100573-03. 24237dd7cddfSDavid du Colombier</ul> 24247dd7cddfSDavid du Colombier 24257dd7cddfSDavid du Colombier<h4><a name="Solaris"></a>Solaris</h4> 24267dd7cddfSDavid du Colombier 24277dd7cddfSDavid du Colombier<ul> 24287dd7cddfSDavid du Colombier<li>Solaris 2.2 may require setting "<b><tt>EXTRALIBS=-lsocket</tt></b>". 24297dd7cddfSDavid du ColombierSolaris 2.3 and later seem to require "<b><tt>EXTRALIBS=-lnsl -lsocket -lposix4</tt></b>". 24307dd7cddfSDavid du Colombier 24317dd7cddfSDavid du Colombier<li>For Solaris 2.6 (and possibly some other versions), if you set 24327dd7cddfSDavid du Colombier<b><tt>SHARE_LIBPNG=1</tt></b>, <b><tt>SHARE_ZLIB=1</tt></b>, or 24337dd7cddfSDavid du Colombier<b><tt>SHARE_JPEG=1</tt></b>, you may need to set 24347dd7cddfSDavid du Colombier 24357dd7cddfSDavid du Colombier<p> 24367dd7cddfSDavid du Colombier<b><tt>XLDFLAGS=-R /usr/local/</tt></b>xxx<b><tt>/lib:/usr/local/lib</tt></b> 24377dd7cddfSDavid du Colombier 24387dd7cddfSDavid du Colombier<p> 24397dd7cddfSDavid du Colombierusing the full path names of the relevant directories. 24407dd7cddfSDavid du Colombier 24417dd7cddfSDavid du Colombier<li>Solaris 2.<em>n</em> uses <b><tt>/usr/openwin/share/include</tt></b> 24427dd7cddfSDavid du Colombierfor the X11 libraries rather than <b><tt>/usr/local/X/include</tt></b>. 24437dd7cddfSDavid du Colombier 24447dd7cddfSDavid du Colombier<li>Solaris 2.<em>n</em> typically has Type 1 fonts in 24457dd7cddfSDavid du Colombier<b><tt>/usr/openwin/lib/X11/fonts/Type1/outline</tt></b>. 24467dd7cddfSDavid du Colombier 24477dd7cddfSDavid du Colombier<li>For Solaris 2.<b><tt>n</tt></b> in the makefile you must change 24487dd7cddfSDavid du Colombierthe definition of <b><tt>INSTALL</tt></b> from "<b><tt>install -c</tt></b>" to 24497dd7cddfSDavid du Colombier"<b><tt>/usr/ucb/install -c</tt></b>". 24507dd7cddfSDavid du Colombier 24517dd7cddfSDavid du Colombier<li>You may need to set <b><tt>XLIBDIR</tt></b> to the directory that holds 24527dd7cddfSDavid du Colombierthe X11 libraries, as for other SVR4 systems. Set <b><tt>-DSVR4</tt></b> 24537dd7cddfSDavid du Colombierin <b><tt>CFLAGS</tt></b>. 24547dd7cddfSDavid du Colombier 24557dd7cddfSDavid du Colombier<li>If you are using the SunPRO C compiler, don't use optimization level 24567dd7cddfSDavid du Colombier<b><tt>-xO3</tt></b>. On SPARC platforms the compiler hangs; on Intel 24577dd7cddfSDavid du Colombierplatforms the generated code is incorrect. With this compiler on Intel, do 24587dd7cddfSDavid du Colombiernot use the <b><tt>-native</tt></b> flag: floating point computations 24597dd7cddfSDavid du Colombierbecome unacceptably inaccurate. You can use <b><tt>-xcg92</tt></b> (SPARC 24607dd7cddfSDavid du ColombierV8) and <b><tt>-dalign</tt></b> for better performance. 24617dd7cddfSDavid du Colombier</ul> 24627dd7cddfSDavid du Colombier 24633ff48bf5SDavid du Colombier<h4><a name="VAX_Ultrix"></a>VAX with Ultrix</h4> 24647dd7cddfSDavid du Colombier 24657dd7cddfSDavid du Colombier<ul> 24667dd7cddfSDavid du Colombier<li>You may wish to set 24677dd7cddfSDavid du Colombier 24687dd7cddfSDavid du Colombier<p> 24697dd7cddfSDavid du Colombier<b><tt>GS_LIB_DEFAULT=$(gsdatadir):/usr/lib/DPS/outline/decwin:$(gsdatadir)/fonts</tt></b> 24707dd7cddfSDavid du Colombier 24717dd7cddfSDavid du Colombier<p> 24727dd7cddfSDavid du Colombierin the makefile to add the Display PostScript font directory to the font 24737dd7cddfSDavid du Colombiersearch path. 24747dd7cddfSDavid du Colombier</ul> 24757dd7cddfSDavid du Colombier 24767dd7cddfSDavid du Colombier<hr> 24777dd7cddfSDavid du Colombier 24783ff48bf5SDavid du Colombier<h2><a name="OS2_build"></a>How to build Ghostscript from source (OS/2 version)</h2> 24797dd7cddfSDavid du Colombier 24807dd7cddfSDavid du Colombier<p> 24817dd7cddfSDavid du Colombier<em>Note: This section was contributed by a user: please e-mail Hermann 24827dd7cddfSDavid du ColombierUlrichsk�tter <<a 24837dd7cddfSDavid du Colombierhref="mailto:ulrichsk@t-online.de">ulrichsk@t-online.de</a>> if you have 24847dd7cddfSDavid du Colombierquestions or problems.</em> 24857dd7cddfSDavid du Colombier 24867dd7cddfSDavid du Colombier<p> 24877dd7cddfSDavid du ColombierThe following instructions are for building with emx 0.9d/Fix2. Be warned 24887dd7cddfSDavid du Colombierthat with this version of gcc/emx, compiler optimization flags '-O' or '-O1' 24897dd7cddfSDavid du Colombierwill produce non-working output. 24907dd7cddfSDavid du Colombier 24917dd7cddfSDavid du Colombier<ul> 24927dd7cddfSDavid du Colombier<li>The relevant makefile is <b><tt>os2.mak</tt></b> The gcc/emx 0.9b (or 24937dd7cddfSDavid du Colombierlater) compiler and IBM <b><tt>NMAKE.EXE</tt></b> are required. 24947dd7cddfSDavid du Colombier 24957dd7cddfSDavid du Colombier<li>For gcc/emx versions 0.9c and later, the <b><tt>LINK386</tt></b> 24967dd7cddfSDavid du Colombiercommand must <b><em>include</em></b> 24977dd7cddfSDavid du Colombier"<b><tt>$(COMPBASE)\lib\end.lib</tt></b>"; version 0.9b requires 24987dd7cddfSDavid du Colombier<b><em>omitting</em></b> it. The current <b><tt>os2.mak</tt></b> file does 24997dd7cddfSDavid du Colombierinclude this file in the <b><tt>LINK386</tt></b> command, so if you are 25007dd7cddfSDavid du Colombierusing 0.9b, delete this file reference before building. 25017dd7cddfSDavid du Colombier 25027dd7cddfSDavid du Colombier<li>Be sure you are using the standard OS/2 shell, <b><tt>CMD.EXE</tt></b>. 25037dd7cddfSDavid du ColombierSome other shells have bugs or differences that cause the makefile not to 25047dd7cddfSDavid du Colombierwork. 25057dd7cddfSDavid du Colombier 25067dd7cddfSDavid du Colombier<li>Make sure you followed the instructions in "How to unpack the source 25077dd7cddfSDavid du Colombiercode" and "How to unpack the third-party libraries". 25087dd7cddfSDavid du Colombier 2509*593dc095SDavid du Colombier<li>Use jpegsrc_v6b.tar.gz, zlib-1.2.x.tar.gz and libpng-1.2.x.tar.gz. 2510*593dc095SDavid du ColombierEarlier versions may not work. 25117dd7cddfSDavid du Colombier 25127dd7cddfSDavid du Colombier<li>If you wish to include support for XFree86, edit the makefile 25137dd7cddfSDavid du Colombierto change <b>BUILD_X11=0</b> to <b>BUILD_X11=1</b>. 25147dd7cddfSDavid du ColombierXFree86 for OS/2 can be obtained from 25157dd7cddfSDavid du Colombier<a href="http://borneo.gmd.de/~veit/os2/xf86os2.html"> 25167dd7cddfSDavid du Colombierhttp://borneo.gmd.de/~veit/os2/xf86os2.html</a> 25177dd7cddfSDavid du ColombierYou must use emx 0.9d. 25187dd7cddfSDavid du Colombier</ul> 25197dd7cddfSDavid du Colombier 25207dd7cddfSDavid du Colombier<p> 25217dd7cddfSDavid du ColombierBefore compiling or linking, execute <b><tt>md bin</tt></b> and <b><tt>md 25227dd7cddfSDavid du Colombierobj</tt></b> in the <b><tt>gs</tt></b> directory to create the directories 25237dd7cddfSDavid du Colombierfor the binaries. 25247dd7cddfSDavid du Colombier 25257dd7cddfSDavid du Colombier<p> 25267dd7cddfSDavid du ColombierFirst, build the standard configuration: 25277dd7cddfSDavid du Colombier 25287dd7cddfSDavid du Colombier<ul> 25297dd7cddfSDavid du Colombier<li>Edit gs/src/os2.mak: find line with 'CO=-O' (Optimizer flag) and edit 25307dd7cddfSDavid du Colombierthis line to 'CO=-O2' (-O or -O1 do not work!). 25317dd7cddfSDavid du Colombier 25327dd7cddfSDavid du Colombier<li>To start the make process, type <b><tt>nmake -f .\src\os2.mak</tt></b>, 25337dd7cddfSDavid du Colombierfrom the gs-directory. 25347dd7cddfSDavid du Colombier 25357dd7cddfSDavid du Colombier<li>One DLL and two EXEs will be produced in <b><tt>gs/bin</tt></b>: 25367dd7cddfSDavid du Colombier<b><tt>gsdll2.dll</tt></b> (the Ghostscript DLL), <b><tt>gsos2.exe</tt></b> 25377dd7cddfSDavid du Colombier(the Ghostscript executable) and <b><tt>gspmdrv.exe</tt></b> (the 25387dd7cddfSDavid du ColombierPresentation Manager display driver). All other newly generated files will 25397dd7cddfSDavid du Colombierbe produced in <b><tt>gs/obj</tt></b>. 25407dd7cddfSDavid du Colombier</ul> 25417dd7cddfSDavid du Colombier 25427dd7cddfSDavid du Colombier<p> 25437dd7cddfSDavid du ColombierNow, if you wish, you can edit OS2.MAK to suit your needs, and then perform 25447dd7cddfSDavid du Colombier<b><tt>nmake -f .\src\os2.mak clean</tt></b> and then <b><tt>nmake -f 25457dd7cddfSDavid du Colombier.\src\os2.mak</tt></b>. 25467dd7cddfSDavid du Colombier 25477dd7cddfSDavid du Colombier<hr> 25487dd7cddfSDavid du Colombier 25493ff48bf5SDavid du Colombier<h2><a name="VMS_build"></a>How to build Ghostscript from source (OpenVMS version)</h2> 25503ff48bf5SDavid du Colombier 25513ff48bf5SDavid du Colombier<p>The DECC6.2-003 compiler has an optimization problem that may lead to 25523ff48bf5SDavid du Colombierwarnings about the "ANSI aliasing rules". DEC (Compaq) can provide a fix 25533ff48bf5SDavid du Colombierfor this problem. The DECC6.2-006 compiler apparently does not have the 25543ff48bf5SDavid du Colombierproblem. 25557dd7cddfSDavid du Colombier 25567dd7cddfSDavid du Colombier<p> 25577dd7cddfSDavid du ColombierDEC C runtime library versions 5.5 and newer have an <b><tt>exit</tt></b> 25587dd7cddfSDavid du Colombierfunction that is compatible with all other C systems, but some older ones 25597dd7cddfSDavid du Colombierdon't. If you get error messages from VMS when auxiliary programs such as 25607dd7cddfSDavid du Colombier<b><tt>genarch</tt></b> or <b><tt>echogs</tt></b> finish executing, find the 25617dd7cddfSDavid du Colombierline in stdpre.h that reads 25627dd7cddfSDavid du Colombier 25637dd7cddfSDavid du Colombier<blockquote><b><tt> 25647dd7cddfSDavid du Colombier/*#define OLD_VMS_C*/ 25657dd7cddfSDavid du Colombier</tt></b></blockquote> 25667dd7cddfSDavid du Colombier 25677dd7cddfSDavid du Colombierand remove the <b><tt>/*</tt></b> and <b><tt>*/</tt></b>, changing it to 25687dd7cddfSDavid du Colombier 25697dd7cddfSDavid du Colombier<blockquote><b><tt> 25707dd7cddfSDavid du Colombier#define OLD_VMS_C 25717dd7cddfSDavid du Colombier</tt></b></blockquote> 25727dd7cddfSDavid du Colombier 25737dd7cddfSDavid du Colombier<p> 25747dd7cddfSDavid du ColombierSome versions of DEC's X server have bugs that produce broad bands of color 25757dd7cddfSDavid du Colombierwhere dither patterns should appear, or characters displayed white on top 25767dd7cddfSDavid du Colombierof black rectangles or not displayed at all. If this happens, consult the 25777dd7cddfSDavid du Colombierusage documentation for how to <a href="Use.htm#X_server_bugs">work around 25787dd7cddfSDavid du ColombierX server bugs</a> using X resources; also report the problem to DEC, or 25797dd7cddfSDavid du Colombierwhomever supplied your X server. 25807dd7cddfSDavid du Colombier 25817dd7cddfSDavid du Colombier<p> 25827dd7cddfSDavid du ColombierYou may also wish to turn off the use of a backing pixmap with Ghostscript, 25837dd7cddfSDavid du Colombiereither to work around X server memory limitations or bugs, or to obtain 25847dd7cddfSDavid du Colombierfaster displaying at the expense of no redrawing when a Ghostscript window 25857dd7cddfSDavid du Colombieris restored from an icon or exposed after being occluded by another window. 25867dd7cddfSDavid du ColombierAgain, the <a href="Use.htm">usage documentation</a> tells how to do this. 25877dd7cddfSDavid du Colombier 25887dd7cddfSDavid du Colombier<p> 25897dd7cddfSDavid du ColombierYou can <a href="Fonts.htm#Precompiling">precompile any Type 1 font</a> 25907dd7cddfSDavid du Colombierinto C, then compile and build it into Ghostscript, as described in the 25917dd7cddfSDavid du Colombier<a href="Fonts.htm">fonts documentation</a>. If you do this, then add 25927dd7cddfSDavid du Colombier"<b><tt>$(PSD)ccfonts.dev</tt></b>" to <b><tt>FEATURE_DEVS</tt></b> in 25937dd7cddfSDavid du Colombier<b><tt>OPENVMS.MAK</tt></b>: 25947dd7cddfSDavid du Colombier 25957dd7cddfSDavid du Colombier<blockquote><b><tt> 25967dd7cddfSDavid du Colombier$ FEATURE_DEVS = "$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)ccfonts.dev" 25977dd7cddfSDavid du Colombier</tt></b></blockquote> 25987dd7cddfSDavid du Colombier 25997dd7cddfSDavid du Colombier<p> 26007dd7cddfSDavid du ColombierSpecify the font names with <b><tt>ccfonts1</tt></b>: 26017dd7cddfSDavid du Colombier 26027dd7cddfSDavid du Colombier<blockquote><b><tt> 26037dd7cddfSDavid du Colombier$ ccfonts1 = "Courier Courier_Oblique Courier_Bold Courier_BoldOblique" 26047dd7cddfSDavid du Colombier</tt></b></blockquote> 26057dd7cddfSDavid du Colombier 26067dd7cddfSDavid du Colombier<p> 26077dd7cddfSDavid du ColombierIf this makes the line too long, add another line of the same form, such as 26087dd7cddfSDavid du Colombier 26097dd7cddfSDavid du Colombier<blockquote><b><tt> 26107dd7cddfSDavid du Colombier$ ccfonts1 = "Courier Courier_Oblique Courier_Bold Courier_BoldOblique" 26117dd7cddfSDavid du Colombier$ ccfonts2 = "Times_Roman Times_Italic Times_Bold Times_BoldItalic" 26127dd7cddfSDavid du Colombier</tt></b></blockquote> 26137dd7cddfSDavid du Colombier 26143ff48bf5SDavid du Colombier<h3><a name="GNU_make_VMS"></a>Building with GNU make on OpenVMS</h3> 26157dd7cddfSDavid du Colombier 26167dd7cddfSDavid du Colombier<p> 26177dd7cddfSDavid du Colombier<em>Note: GNU make on OpenVMS apparently has bugs that make it stop with an 26187dd7cddfSDavid du Colombiererror when building Ghostscript version 5.80 or later. Until further 26197dd7cddfSDavid du Colombiernotice, use MMS or MMK for building Ghostscript on OpenVMS. See <a 26207dd7cddfSDavid du Colombierhref="#MMK_MMS_VMS">below</a> for details.</em> 26217dd7cddfSDavid du Colombier 26227dd7cddfSDavid du Colombier<p> 26237dd7cddfSDavid du ColombierAs of Ghostscript version 5.0 you can use GNU make -- with the file 26247dd7cddfSDavid du Colombier<b><tt>OPENVMS.MAK</tt></b> and some auxiliary <b><tt>.COM</tt></b> files 26257dd7cddfSDavid du Colombier-- to build Ghostscript on OpenVMS. Use the command: 26267dd7cddfSDavid du Colombier 26277dd7cddfSDavid du Colombier<blockquote> 26287dd7cddfSDavid du Colombier<b><tt>make -fopenvms.mak "DECWINDOWS=</tt></b><em>[</em><b><tt>1.2</tt></b><em>]</em><b><tt>"</tt></b> 26297dd7cddfSDavid du Colombier</blockquote> 26307dd7cddfSDavid du Colombier 26317dd7cddfSDavid du Colombier<p> 26327dd7cddfSDavid du ColombierThat is, specify either "<b><tt>1.2</tt></b>" or nothing (blank) as the 26337dd7cddfSDavid du Colombiervalue of <b><tt>DECWINDOWS</tt></b>. In Europe and other parts of the world 26347dd7cddfSDavid du Colombierwhere ISO standard paper sizes are used, append "<b><tt>A4_PAPER=1</tt></b>" 26357dd7cddfSDavid du Colombierto that line to make A4 the default paper size at run time. 26367dd7cddfSDavid du Colombier 26377dd7cddfSDavid du Colombier<p> 26387dd7cddfSDavid du ColombierIf you haven't a prebuilt copy of GNU make, you'll have to build it 26397dd7cddfSDavid du Colombieryourself; as of Version 3.76 (but not earlier) it is said to build properly 26407dd7cddfSDavid du Colombierunder OpenVMS on both VAX and Alpha. The kit is available at the 26417dd7cddfSDavid du Colombier<a href="http://www.gnu.org/">Free Software Foundation's</a> ftp site and 26427dd7cddfSDavid du Colombierits mirrors. See 26437dd7cddfSDavid du Colombier 26447dd7cddfSDavid du Colombier<blockquote> 26453ff48bf5SDavid du Colombier<a href="ftp://ftp.gnu.org/pub/gnu/" 26463ff48bf5SDavid du Colombierclass="offsite">ftp://ftp.gnu.org/pub/gnu/</a> 26477dd7cddfSDavid du Colombier</blockquote> 26487dd7cddfSDavid du Colombier 26493ff48bf5SDavid du Colombier<h3><a name="MMK_MMS_VMS"></a>Building with MMK or MMS on OpenVMS</h3> 26507dd7cddfSDavid du Colombier 26517dd7cddfSDavid du Colombier<p> 26527dd7cddfSDavid du ColombierAs of Ghostscript version 5.68 you can use MMK or MMS to build Ghostscript on 26537dd7cddfSDavid du ColombierOpenVMS. MMS is a utility available from Compaq (Digital); 26547dd7cddfSDavid du ColombierMMK is a free program largely compatible with MMS. 26557dd7cddfSDavid du Colombier 26567dd7cddfSDavid du Colombier<p> 26577dd7cddfSDavid du ColombierBuilding Ghostscript with MMK or MMS uses the file 26587dd7cddfSDavid du Colombier<b><tt>OPENVMS.MMK</tt></b> and some auxiliary <b><tt>.COM</tt></b> files. 26597dd7cddfSDavid du ColombierTo build Ghostscript with MMK or MMS, use the command: 26607dd7cddfSDavid du Colombier 26617dd7cddfSDavid du Colombier<blockquote> 26627dd7cddfSDavid du Colombier<b><tt>###/descrip=[.src]openvms.mmk/macro=("DECWINDOWS1_2=</tt></b><em>{</em><b><tt>0</tt></b>,<b><tt>1</tt></b><em>}</em><b><tt>")</tt></b> 26637dd7cddfSDavid du Colombier</blockquote> 26647dd7cddfSDavid du Colombier 26657dd7cddfSDavid du Colombierwhere <b><tt>###</tt></b> is either <b><tt>mmk</tt></b> or <b><tt>mms</tt></b>. 26667dd7cddfSDavid du Colombier 26677dd7cddfSDavid du Colombier<p> 26687dd7cddfSDavid du ColombierSpecify <b><tt>DECWINDOWS1_2=1</tt></b> for DECWINDOWS 1.2, 26697dd7cddfSDavid du Colombier<b><tt>DECWINDOWS1_2=0</tt></b> for other DECWINDOWS versions. In Europe 26707dd7cddfSDavid du Colombierand other parts of the world where ISO standard paper sizes are used, add 26717dd7cddfSDavid du Colombier<b><tt>,"A4_PAPER=1"</tt></b> just before the final closing parenthesis to 26727dd7cddfSDavid du Colombiermake A4 the default paper size at run time. 26737dd7cddfSDavid du Colombier 26747dd7cddfSDavid du Colombier<p> 26757dd7cddfSDavid du ColombierTo download MMK (source code, and VAX and Alpha executables), visit 26767dd7cddfSDavid du Colombier 26777dd7cddfSDavid du Colombier<blockquote> 26787dd7cddfSDavid du Colombier<a href="http://www.madgoat.com/mmk.html">http://www.madgoat.com/mmk.html</a> 26797dd7cddfSDavid du Colombier</blockquote> 26807dd7cddfSDavid du Colombier 26817dd7cddfSDavid du Colombier<hr> 26827dd7cddfSDavid du Colombier 26833ff48bf5SDavid du Colombier<h2><a name="Other_environments"></a>Other environments</h2> 26847dd7cddfSDavid du Colombier 26853ff48bf5SDavid du Colombier<h3><a name="No_multi_thread"></a>Environments lacking multi-threading</h3> 26867dd7cddfSDavid du Colombier 26877dd7cddfSDavid du Colombier<p> 26887dd7cddfSDavid du ColombierAll environments mentioned here by name have multi-threading capability. 26897dd7cddfSDavid du ColombierHowever, if your environment doesn't, you can remove all need for 26907dd7cddfSDavid du Colombiermulti-threading by setting <b><tt>SYNC=nosync</tt></b> in the top-level 26917dd7cddfSDavid du Colombiermakefile. Note that you will not be able to use any so-called "async" 26927dd7cddfSDavid du Colombierdrivers (drivers that overlap interpretation and rasterization) if you do 26937dd7cddfSDavid du Colombierthis. No such drivers are in the <b><tt>DEVICE_DEVS*</tt></b> lists of any 26943ff48bf5SDavid du Colombiermakefile that we distribute. 26957dd7cddfSDavid du Colombier 26963ff48bf5SDavid du Colombier<h3><a name="Plan_9"></a>Plan 9</h3> 26977dd7cddfSDavid du Colombier 26987dd7cddfSDavid du Colombier<p> 26997dd7cddfSDavid du ColombierUse <b><tt>unix-gcc.mak</tt></b>, editing it to define 27007dd7cddfSDavid du Colombier 27017dd7cddfSDavid du Colombier<blockquote><b><tt> 27027dd7cddfSDavid du ColombierCC=cc 27037dd7cddfSDavid du ColombierGCFLAGS=-D_BSD_EXTENSION -DPlan9 27047dd7cddfSDavid du Colombier</tt></b></blockquote> 27057dd7cddfSDavid du Colombier 27067dd7cddfSDavid du Colombier<p> 27077dd7cddfSDavid du ColombierYou will also probably have to edit many path names. 27087dd7cddfSDavid du Colombier 27093ff48bf5SDavid du Colombier<h3><a name="QNX"></a>QNX</h3> 27107dd7cddfSDavid du Colombier 27117dd7cddfSDavid du Colombier<p> 27127dd7cddfSDavid du ColombierDavid J. Hawkey Jr. writes that he built Ghostscript 4.03 and 5.0 under QNX 27137dd7cddfSDavid du Colombier4.22, 4.23, and 4.24 using Watcom C 10.6 and that "it works quite well, 27147dd7cddfSDavid du Colombierafter figuring out the <b><tt>/etc/config/lpsrvr</tt></b> directives, 27157dd7cddfSDavid du Colombierexcept for color printing to my HP DeskJet some-number-or-another". Here 27167dd7cddfSDavid du Colombieris a concise presentation of changes based on the ones he made for 27177dd7cddfSDavid du ColombierGhostscript 4.03. 27187dd7cddfSDavid du Colombier 27197dd7cddfSDavid du Colombier<dl> 27207dd7cddfSDavid du Colombier<dt><b><tt>unixansi.mak</tt></b> 27217dd7cddfSDavid du Colombier<dd><table cellpadding=0 cellspacing=0> 27227dd7cddfSDavid du Colombier<tr valign=bottom> 27237dd7cddfSDavid du Colombier <th align=left>Original lines 27247dd7cddfSDavid du Colombier <td> 27257dd7cddfSDavid du Colombier <th align=left>Change to 27267dd7cddfSDavid du Colombier<tr> <td colspan=3><hr> 27277dd7cddfSDavid du Colombier<tr valign=top> <td><b><tt>INSTALL = install -c<br>INSTALL_PROGRAM = $(INSTALL) -m 755<br>INSTALL_DATA = $(INSTALL) -m 644</tt></b> 27287dd7cddfSDavid du Colombier <td> 27297dd7cddfSDavid du Colombier <td><b><tt>INSTALL = cp<br>INSTALL_PROGRAM = $(INSTALL)<br>INSTALL_DATA = $(INSTALL)</tt></b> 27307dd7cddfSDavid du Colombier<tr> <td colspan=3><hr> 27317dd7cddfSDavid du Colombier<tr valign=top> <td><b><tt>datadir = $(prefix)/share</tt></b> 27327dd7cddfSDavid du Colombier <td> 27337dd7cddfSDavid du Colombier <td><b><tt>datadir = $(prefix)/lib</tt></b> 27347dd7cddfSDavid du Colombier<tr> <td colspan=3><hr> 27357dd7cddfSDavid du Colombier<tr valign=top> <td><b><tt>CFLAGS_STANDARD=-O</tt></b> 27367dd7cddfSDavid du Colombier <td> 27377dd7cddfSDavid du Colombier <td><b><tt>CFLAGS_STANDARD=-Otx -zp1 -mf</tt></b> 27387dd7cddfSDavid du Colombier<tr> <td colspan=3><hr> 27397dd7cddfSDavid du Colombier<tr valign=top> <td><b><tt>LDFLAGS=$(XLDFLAGS)</tt></b> 27407dd7cddfSDavid du Colombier <td> 27417dd7cddfSDavid du Colombier <td><b><tt>LDFLAGS=-mf -N32k $(XLDFLAGS)</tt></b> 27427dd7cddfSDavid du Colombier<tr> <td colspan=3><hr> 27437dd7cddfSDavid du Colombier<tr valign=top> <td><b><tt>EXTRALIBS=</tt></b> 27447dd7cddfSDavid du Colombier <td> 27457dd7cddfSDavid du Colombier <td><b><tt>EXTRALIBS=-lXqnx_s -lsocket</tt></b> 27467dd7cddfSDavid du Colombier<tr> <td colspan=3><hr> 27477dd7cddfSDavid du Colombier<tr valign=top> <td><b><tt>XINCLUDE=-I/usr/local/X/include</tt></b> 27487dd7cddfSDavid du Colombier <td> 27497dd7cddfSDavid du Colombier <td><b><tt>#XINCLUDE=-I/usr/local/X/include</tt></b> 27507dd7cddfSDavid du Colombier<tr> <td colspan=3><hr> 27517dd7cddfSDavid du Colombier<tr valign=top> <td><b><tt>XLIBDIRS=-L/usr/local/X/lib<br>XLIBDIR=<br>XLIBS=Xt Xext X11</tt></b> 27527dd7cddfSDavid du Colombier <td> 27537dd7cddfSDavid du Colombier <td><b><tt>#XLIBDIRS=-L/usr/local/X/lib<br>#XLIBDIR=<br>XLIBS=Xt_s Xext X11_s</tt></b> 27547dd7cddfSDavid du Colombier<tr> <td colspan=3><hr> 27557dd7cddfSDavid du Colombier</table> 27567dd7cddfSDavid du Colombier</dl> 27577dd7cddfSDavid du Colombier 27587dd7cddfSDavid du Colombier<dl> 27597dd7cddfSDavid du Colombier<dt><b><tt>gp_unifs.c</tt></b> 27607dd7cddfSDavid du Colombier<dd>After the line 27617dd7cddfSDavid du Colombier 27627dd7cddfSDavid du Colombier<blockquote> 27637dd7cddfSDavid du Colombier<b><tt>#include <sys/param.h></tt></b> 27647dd7cddfSDavid du Colombier</blockquote> 27657dd7cddfSDavid du Colombier 27667dd7cddfSDavid du Colombier<p> 27677dd7cddfSDavid du Colombieradd these lines: 27687dd7cddfSDavid du Colombier 27697dd7cddfSDavid du Colombier<blockquote> 27707dd7cddfSDavid du Colombier<b><tt>#if defined(__QNX__)<br> 27717dd7cddfSDavid du Colombier#include <unix.h><br> 27727dd7cddfSDavid du Colombier#endif</tt></b><br> 27737dd7cddfSDavid du Colombier</blockquote> 27747dd7cddfSDavid du Colombier</dl> 27757dd7cddfSDavid du Colombier 27767dd7cddfSDavid du Colombier<dl> 27777dd7cddfSDavid du Colombier<dt><b><tt>gp_unix.c</tt></b> 27787dd7cddfSDavid du Colombier<dd>After the line 27797dd7cddfSDavid du Colombier 27807dd7cddfSDavid du Colombier<blockquote> 27817dd7cddfSDavid du Colombier<b><tt>#include "time.h"</tt></b> 27827dd7cddfSDavid du Colombier</blockquote> 27837dd7cddfSDavid du Colombier 27847dd7cddfSDavid du Colombier<p> 27857dd7cddfSDavid du Colombieradd these lines: 27867dd7cddfSDavid du Colombier 27877dd7cddfSDavid du Colombier<blockquote> 27887dd7cddfSDavid du Colombier<b><tt>#if defined(__QNX__)<br> 27897dd7cddfSDavid du Colombier#include <sys/time.h><br> 27907dd7cddfSDavid du Colombier#endif</tt></b><br> 27917dd7cddfSDavid du Colombier</blockquote> 27927dd7cddfSDavid du Colombier</dl> 27937dd7cddfSDavid du Colombier 27947dd7cddfSDavid du Colombier<dl> 27957dd7cddfSDavid du Colombier<dt><b><tt>time_.h</tt></b> 27967dd7cddfSDavid du Colombier<dd>Modify the line beginning 27977dd7cddfSDavid du Colombier 27987dd7cddfSDavid du Colombier<blockquote> 27997dd7cddfSDavid du Colombier<b><tt># if defined(Plan9) ||</tt></b> 28007dd7cddfSDavid du Colombier</blockquote> 28017dd7cddfSDavid du Colombier 28027dd7cddfSDavid du Colombier<p> 28037dd7cddfSDavid du Colombierto begin 28047dd7cddfSDavid du Colombier 28057dd7cddfSDavid du Colombier<blockquote> 28067dd7cddfSDavid du Colombier<b><tt># if defined(__QNX__) || defined(Plan9) ||</tt></b> 28077dd7cddfSDavid du Colombier</blockquote> 28087dd7cddfSDavid du Colombier</dl> 28097dd7cddfSDavid du Colombier 28107dd7cddfSDavid du Colombier<dl> 28117dd7cddfSDavid du Colombier<dt><b><tt>/etc/config/lpsrvr</tt></b> 28127dd7cddfSDavid du Colombier<dd>Here is Hawkey's <b><tt>lpsrvr</tt></b> as an example. 28137dd7cddfSDavid du Colombier 28143ff48bf5SDavid du Colombier<blockquote> 28157dd7cddfSDavid du Colombier<pre># lpsrvr 28167dd7cddfSDavid du Colombier# 28177dd7cddfSDavid du Colombier# Defines the print queues and their devices 28187dd7cddfSDavid du Colombier# 28197dd7cddfSDavid du Colombier# Queues 28207dd7cddfSDavid du Colombier 28217dd7cddfSDavid du Colombier# ink-jet: Ghostscript interpreter for mono DeskJet - LaserJet works 28227dd7cddfSDavid du Colombier# better than DeskJet! 28237dd7cddfSDavid du Colombier 28247dd7cddfSDavid du Colombier[ij-monops] 28257dd7cddfSDavid du Colombier ta=lpt1 28267dd7cddfSDavid du Colombier co=/usr/local/bin/gs -q -sDEVICE=laserjet -sOutputFile=- -dNOPAUSE $(spfile) quit.ps | cat > $(device) 28277dd7cddfSDavid du Colombier 28287dd7cddfSDavid du Colombier# Devices 28297dd7cddfSDavid du Colombier 28307dd7cddfSDavid du Colombier[-lpt1] 28317dd7cddfSDavid du Colombier dv=/dev/par1 28327dd7cddfSDavid du Colombier 28337dd7cddfSDavid du Colombier[-lpt2] 28347dd7cddfSDavid du Colombier dv=/dev/par2 28353ff48bf5SDavid du Colombier</pre></blockquote> 28367dd7cddfSDavid du Colombier</dl> 28377dd7cddfSDavid du Colombier 2838*593dc095SDavid du Colombier 2839*593dc095SDavid du Colombier<h2><a name="UFST_build"></a>How to build Ghostscript with UFST</h2> 2840*593dc095SDavid du Colombier 2841*593dc095SDavid du Colombier<p> 2842*593dc095SDavid du Colombier<em>Note: This section is only for customers who have licensed Agfa's UFST. 2843*593dc095SDavid du ColombierOther users please skip this section. 2844*593dc095SDavid du Colombier</em> 2845*593dc095SDavid du Colombier 2846*593dc095SDavid du Colombier<p> 2847*593dc095SDavid du ColombierGhostscript sources do not include UFST sources. You need to obtain them from Agfa. 2848*593dc095SDavid du ColombierGhostscript includes only some source modules that provide a bridge to UFST. 2849*593dc095SDavid du Colombier 2850*593dc095SDavid du Colombier<p> 2851*593dc095SDavid du ColombierGhostscript makefiles do not include any script for building UFST libraries. 2852*593dc095SDavid du ColombierRefer to Agfa's manual how to build them. UFST object libraries must be built 2853*593dc095SDavid du Colombierbefore building Ghostscript with the UFST bridge. 2854*593dc095SDavid du Colombier 2855*593dc095SDavid du Colombier<p> 2856*593dc095SDavid du ColombierTo build Ghostscript with UFST, specify additional options for "make": 2857*593dc095SDavid du Colombier 2858*593dc095SDavid du Colombier<dl> 2859*593dc095SDavid du Colombier<dt><b><tt>UFST_BRIDGE=1</tt></b> 2860*593dc095SDavid du Colombier<dd>forces the UFST bridge to build. 2861*593dc095SDavid du Colombier 2862*593dc095SDavid du Colombier<dt><b><tt>UFST_ROOT=path</tt></b> 2863*593dc095SDavid du Colombier<dd>specifies the path to UFST root directory or folder. 2864*593dc095SDavid du Colombier 2865*593dc095SDavid du Colombier<dt><b><tt>UFST_CFLAGS=options</tt></b> 2866*593dc095SDavid du Colombier<dd>specifies C compiler options for UFST library. Refer to Agfa's manual for information about them. 2867*593dc095SDavid du Colombier 2868*593dc095SDavid du Colombier<dt><b><tt>UFST_LIB_EXT=extension</tt></b> 2869*593dc095SDavid du Colombier<dd>sets the file name extension for object libraries. You must use the appropriate one for your platform and linker. 2870*593dc095SDavid du Colombier</dl> 2871*593dc095SDavid du Colombier 2872*593dc095SDavid du Colombier<p>An example for Unix/GCC : 2873*593dc095SDavid du Colombier<blockquote> 2874*593dc095SDavid du Colombier<tt>UFST_BRIDGE=1 UFST_ROOT=../Agfa UFST_CFLAGS=-DGCCx86 UFST_LIB_EXT=.a</tt> 2875*593dc095SDavid du Colombier</blockquote> 2876*593dc095SDavid du Colombier 2877*593dc095SDavid du Colombier<p>For Windows/MSVC you need only specify UFST_ROOT. 2878*593dc095SDavid du Colombiermsvc32.mak sets the other options automatically. 2879*593dc095SDavid du Colombier 2880*593dc095SDavid du Colombier<p> 2881*593dc095SDavid du Colombier 2882*593dc095SDavid du Colombier<h2><a name="FT_build"></a>How to build Ghostscript with Free Type</h2> 2883*593dc095SDavid du Colombier 2884*593dc095SDavid du Colombier<p> 2885*593dc095SDavid du Colombier<em>Note: This section is only for users who wish to use Ghostscript with Free Type font renderer. 2886*593dc095SDavid du ColombierOther users please skip this section. 2887*593dc095SDavid du Colombier</em> 2888*593dc095SDavid du Colombier 2889*593dc095SDavid du Colombier<p> 2890*593dc095SDavid du ColombierGhostscript sources do not include Free Type sources. You need to obtain them from Free Type group. 2891*593dc095SDavid du ColombierGhostscript includes only some source modules that provide a bridge to Free Type. 2892*593dc095SDavid du Colombier 2893*593dc095SDavid du Colombier<p> 2894*593dc095SDavid du ColombierGhostscript makefiles do not include any script for building Free Type libraries. 2895*593dc095SDavid du ColombierRefer to Free Type manual how to build them. Free Type object libraries must be built 2896*593dc095SDavid du Colombierbefore building Ghostscript with the Free Type bridge. 2897*593dc095SDavid du Colombier 2898*593dc095SDavid du Colombier<p> 2899*593dc095SDavid du ColombierTo build Ghostscript with Free Type, specify additional options for "make": 2900*593dc095SDavid du Colombier 2901*593dc095SDavid du Colombier<dl> 2902*593dc095SDavid du Colombier<dt><b><tt>FT_BRIDGE=1</tt></b> 2903*593dc095SDavid du Colombier<dd>forces the Free Type bridge to build. 2904*593dc095SDavid du Colombier 2905*593dc095SDavid du Colombier<dt><b><tt>FT_ROOT=path</tt></b> 2906*593dc095SDavid du Colombier<dd>specifies the path to Free Type root directory or folder. 2907*593dc095SDavid du Colombier 2908*593dc095SDavid du Colombier<dt><b><tt>FT_CFLAGS=options</tt></b> 2909*593dc095SDavid du Colombier<dd>specifies C compiler options for Free Type library. Refer to Free Type manual for information about them. 2910*593dc095SDavid du Colombier 2911*593dc095SDavid du Colombier<dt><b><tt>FT_LIB_EXT=extension</tt></b> 2912*593dc095SDavid du Colombier<dd>sets the file name extension for object libraries. You must use the appropriate one for your platform and linker. 2913*593dc095SDavid du Colombier</dl> 2914*593dc095SDavid du Colombier 2915*593dc095SDavid du Colombier<p>An example for Unix/GCC : 2916*593dc095SDavid du Colombier<blockquote> 2917*593dc095SDavid du Colombier<tt>FT_BRIDGE=1 FT_ROOT=../FreeType FT_CFLAGS=-DGCCx86 FT_LIB_EXT=.a</tt> 2918*593dc095SDavid du Colombier</blockquote> 2919*593dc095SDavid du Colombier 2920*593dc095SDavid du Colombier<p>For Windows/MSVC you need only specify FT_ROOT. 2921*593dc095SDavid du Colombiermsvc32.mak sets the other options automatically. 2922*593dc095SDavid du Colombier 2923*593dc095SDavid du Colombier<p> 2924*593dc095SDavid du Colombier 29257dd7cddfSDavid du Colombier<!-- [2.0 end contents] ==================================================== --> 29267dd7cddfSDavid du Colombier 29277dd7cddfSDavid du Colombier<!-- [3.0 begin visible trailer] =========================================== --> 29287dd7cddfSDavid du Colombier<hr> 29297dd7cddfSDavid du Colombier 29303ff48bf5SDavid du Colombier<p> 29313ff48bf5SDavid du Colombier<small>Copyright © 1996, 2000 Aladdin Enterprises. 29323ff48bf5SDavid du ColombierAll rights reserved.</small> 29337dd7cddfSDavid du Colombier 29347dd7cddfSDavid du Colombier<p> 2935*593dc095SDavid du ColombierThis software is provided AS-IS with no warranty, either express or 2936*593dc095SDavid du Colombierimplied. 2937*593dc095SDavid du Colombier 2938*593dc095SDavid du ColombierThis software is distributed under license and may not be copied, 2939*593dc095SDavid du Colombiermodified or distributed except as expressly authorized under the terms 2940*593dc095SDavid du Colombierof the license contained in the file LICENSE in this distribution. 2941*593dc095SDavid du Colombier 2942*593dc095SDavid du ColombierFor more information about licensing, please refer to 2943*593dc095SDavid du Colombierhttp://www.ghostscript.com/licensing/. For information on 2944*593dc095SDavid du Colombiercommercial licensing, go to http://www.artifex.com/licensing/ or 2945*593dc095SDavid du Colombiercontact Artifex Software, Inc., 101 Lucas Valley Road #110, 2946*593dc095SDavid du ColombierSan Rafael, CA 94903, U.S.A., +1(415)492-9861. 29477dd7cddfSDavid du Colombier 29483ff48bf5SDavid du Colombier<p> 2949*593dc095SDavid du Colombier<small>Ghostscript version 8.53, 20 October 2005 29507dd7cddfSDavid du Colombier 29517dd7cddfSDavid du Colombier<!-- [3.0 end visible trailer] ============================================= --> 29527dd7cddfSDavid du Colombier 29537dd7cddfSDavid du Colombier</body> 29547dd7cddfSDavid du Colombier</html> 2955