Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > main-release > by-pkgid > b6c0c45acc40abafd9e92cef662b1736 > files > 29

graphicsmagick-doc-1.3.12-1mdv2010.1.x86_64.rpm

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
<title>UNIX/Cygwin/MinGW Compilation</title>
<link rel="stylesheet" href="docutils-articles.css" type="text/css" />
</head>
<body>

<div class="banner">
<span>
<img src="images/gm-107x76.png" alt="GraphicMagick logo" width="107" height="76" />
<span class="title">GraphicsMagick</span>
<form action="http://www.google.com/search">
    Search&nbsp;site
	<input type=hidden name="domains" value="www.graphicsmagick.org" />
	<input type=hidden name="sitesearch" value="www.graphicsmagick.org" />
    <input type=text name="q" size="25" maxlength="255" />
    <input type=submit name="sa" value="Search" />
</form>
</span>
</div>

<div class="navmenu">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="Copyright.html">License</a></li>
<li><a href="mission.html">Mission</a></li>
<li><a href="download.html">Download</a></li>
<li><a href="README.html">Installation</a></li>
<li><a href="FAQ.html">FAQ</a></li>
<li><a href="NEWS.html">News</a> </li>
<li><a href="formats.html">Formats</a></li>
</ul>
</div>
<div class="navmenu">
<ul>
<li><a href="process.html">Process</a></li>
<li><a href="contribute.html">Contribute</a></li>
<li><a href="CVS.html">CVS</a></li>
<li><a href="http://sourceforge.net/mail/?group_id=73485" target="top_">Mailing Lists</a></li>
<li><a href="Changelog.html">ChangeLog</a></li>
<li><a href="http://sourceforge.net/projects/graphicsmagick/" target="top_">Report Bugs</a></li>
<li><a href="utilities.html">Utilities</a></li>
<li><a href="programming.html">Programming</a></li>
<li><a href="links.html">Links</a></li>
</ul>
</div>
<div class="document" id="unix-cygwin-mingw-compilation">
<h1 class="title">UNIX/Cygwin/MinGW Compilation</h1>

<!-- This text is in reStucturedText format, so it may look a bit odd. -->
<!-- See http://docutils.sourceforge.net/rst.html for details. -->
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#platforms-note" id="id1">Platforms Note</a></li>
<li><a class="reference internal" href="#archive-formats" id="id2">Archive Formats</a></li>
<li><a class="reference internal" href="#build-configuration" id="id3">Build Configuration</a><ul>
<li><a class="reference internal" href="#optional-features" id="id4">Optional Features</a></li>
<li><a class="reference internal" href="#optional-packages-options" id="id5">Optional Packages/Options</a></li>
</ul>
</li>
<li><a class="reference internal" href="#building-under-cygwin" id="id6">Building under Cygwin</a></li>
<li><a class="reference internal" href="#building-under-mingw-msys" id="id7">Building under MinGW &amp; MSYS</a></li>
<li><a class="reference internal" href="#dealing-with-configuration-failures" id="id8">Dealing with configuration failures</a></li>
<li><a class="reference internal" href="#makefile-build-targets" id="id9">Makefile Build Targets</a></li>
<li><a class="reference internal" href="#build-install" id="id10">Build &amp; Install</a></li>
<li><a class="reference internal" href="#verifying-the-build" id="id11">Verifying The Build</a></li>
</ul>
</div>
<div class="section" id="platforms-note">
<h1><a class="toc-backref" href="#id1">Platforms Note</a></h1>
<p>Platform specific notes regarding specific operating systems may be found
in the <a class="reference external" href="platforms.html">www/platforms.rst</a> file. The intructions in the
platforms document provide generic instructions which work in most common
cases. Additional notes regarding Cygwin &amp; MinGW are provided later in
this file.</p>
</div>
<div class="section" id="archive-formats">
<h1><a class="toc-backref" href="#id2">Archive Formats</a></h1>
<p>GraphicsMagick is distributed in a number of different archive formats.
The source code must be extracted prior to compilation as follows:</p>
<dl class="docutils">
<dt>7z</dt>
<dd><p class="first">7-Zip archive format. The Z-Zip format may be extracted under Unix
using '7za' from the P7ZIP package (<a class="reference external" href="http://p7zip.sourceforge.net/">http://p7zip.sourceforge.net/</a>).
Extract similar to:</p>
<pre class="last literal-block">
7za x GraphicsMagick-1.3.7z
</pre>
</dd>
<dt>.tar.bz2</dt>
<dd><p class="first">BZip2 compressed tar archive format. Requires that both the bzip2
(<a class="reference external" href="http://www.bzip.org/">http://www.bzip.org/</a>) and tar programs to be available. Extract
similar to:</p>
<pre class="last literal-block">
bzip2 -d GraphicsMagick-1.3.tar.bz | tar -xvf -
</pre>
</dd>
<dt>.tar.gz</dt>
<dd><p class="first">Gzip compressed tar archive format. Requires that both the gzip
(<a class="reference external" href="http://www.gzip.org/">http://www.gzip.org/</a>) and tar programs to be available. Extract
similar to:</p>
<pre class="last literal-block">
gzip -d GraphicsMagick-1.3.tar.gz | tar -xvf -
</pre>
</dd>
<dt>.tar.lzma</dt>
<dd><p class="first">LZMA compressed tar archive format. Requires that LZMA utils
(<a class="reference external" href="http://tukaani.org/lzma/">http://tukaani.org/lzma/</a>) and tar programs to be available. Extract
similar to:</p>
<pre class="last literal-block">
lzma -d GraphicsMagick-1.3.tar.lzma | tar -xvf -
</pre>
</dd>
<dt>zip</dt>
<dd><p class="first">PK-ZIP archive format. Requires that the unzip program from Info-Zip
(<a class="reference external" href="http://www.info-zip.org/UnZip.html">http://www.info-zip.org/UnZip.html</a>) be available. Extract similar to:</p>
<pre class="last literal-block">
unzip GraphicsMagick-1.3.zip
</pre>
</dd>
</dl>
<p>The GraphicsMagick source code is extracted into the subdirectory
'GraphicsMagick-1.3'. After the source code extracted, change to the new
directory using the command:</p>
<pre class="literal-block">
cd GraphicsMagick-1.3
</pre>
</div>
<div class="section" id="build-configuration">
<h1><a class="toc-backref" href="#id3">Build Configuration</a></h1>
<p>Use 'configure' to automatically configure, build, and install
GraphicsMagick. The configure script may be executed from the
GraphicsMagick source directory (e.g ./configure) or from a separate
build directory by specifying the full path to configure (e.g.
/src/GraphicsMagick-1.3/configure). The advantage of using a separate
build directory is that multiple GraphicsMagick builds may share the
same GraphicsMagick source directory while allowing each build to use a
unique set of options.</p>
<p>If you are willing to accept configure's default options, and build from
within the source directory, type:</p>
<pre class="literal-block">
./configure
</pre>
<p>and watch the configure script output to verify that it finds everything
that you think it should. If it does not, then adjust your environment
so that it does.</p>
<p>By default, 'make install' will install the package's files
in '/usr/local/bin', '/usr/local/man', etc. You can specify an
installation prefix other than '/usr/local' by giving 'configure'
the option '--prefix=PATH'.  This is valuable in case you don't have
privileges to install under the default paths or if you want to install
in the system directories instead.</p>
<p>If you are not happy with configure's choice of compiler, compilation
flags, or libraries, you can give 'configure' initial values for
variables by specifying them on the configure command line, e.g.:</p>
<pre class="literal-block">
./configure CC=c99 CFLAGS=-O2 LIBS=-lposix
</pre>
<p>Options which should be common to packages installed under the same
directory heirarchy may be supplied via a 'config.site' file located
under the installation prefix via the path ${prefix}/share/config.site
where ${prefix} is the installation prefix. This file is used for all
packages installed under that prefix. As an alternative, the CONFIG_SITE
environment variable may be used to specify the path of a site
configuration file to load. This is an example config.site file:</p>
<pre class="literal-block">
# Configuration values for all packages installed under this prefix
CC=gcc
CXX=c++
CPPFLAGS='-I/usr/local/include'
LDFLAGS='-L/usr/local/lib -R/usr/local/lib'
</pre>
<p>When the 'config.site' file is being used to supply configuration
options, configure will issue a message similar to:</p>
<pre class="literal-block">
configure: loading site script /usr/local/share/config.site
</pre>
<p>The configure variables you should be aware of are:</p>
<dl class="docutils">
<dt>CC</dt>
<dd>Name of C compiler (e.g. 'cc -Xa') to use</dd>
<dt>CXX</dt>
<dd>Name of C++ compiler to use (e.g. 'CC')</dd>
<dt>CFLAGS</dt>
<dd>Compiler flags (e.g. '-g -O2') to compile C code</dd>
<dt>CXXFLAGS</dt>
<dd>Compiler flags (e.g. '-g -O2') to compile C++ code</dd>
<dt>CPPFLAGS</dt>
<dd>Include paths (-I/somedir) to look for header files</dd>
<dt>LDFLAGS</dt>
<dd>Library paths (-L/somedir) to look for libraries Systems that support
the notion of a library run-path may require an additional argument
in order to find shared libraries at run time. For example, the
Solaris linker requires an argument of the form '-R/somedir', some
Linux systems will work with '-rpath /somedir', while some other
Linux systems who's gcc does not pass -rpath to the linker require an
argument of the form '-Wl,-rpath,/somedir'.</dd>
<dt>LIBS</dt>
<dd>Extra libraries (-lsomelib) required to link</dd>
</dl>
<p>Any variable (e.g. CPPFLAGS or LDFLAGS) which requires a directory
path must specify an absolute path rather than a relative path.</p>
<p>The build now supports a Linux-style &quot;silent&quot; build (default
disabled).  To enable this, add the configure option
--enable-silent-rules or invoke make like 'make V=0'.  If the build
has been configured for silent mode and it is necessary to see a
verbose build, then invoke make like 'make V=1'.</p>
<p>Configure can usually find the X include and library files
automatically, but if it doesn't, you can use the 'configure' options
'--x-includes=DIR' and '--x-libraries=DIR' to specify their locations.</p>
<p>The configure script provides a number of GraphicsMagick specific
options.  When disabling an option --disable-something is equivalent to
specifying --enable-something=no and --without-something is equivalent
to --with-something=no.  The configure options are as
follows (execute 'configure --help' to see all options).</p>
<div class="section" id="optional-features">
<h2><a class="toc-backref" href="#id4">Optional Features</a></h2>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--enable-ccmalloc</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>enable 'ccmalloc' memory debug support (default disabled)</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--enable-prof</span></kbd></td>
<td>enable 'prof' profiling support (default disabled)</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--enable-gprof</span></kbd></td>
<td>enable 'gprof' profiling support (default disabled)</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--enable-gcov</span></kbd></td>
<td>enable 'gcov' profiling support (default disabled)</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--disable-installed</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>disable building an installed GraphicsMagick (default enabled)</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--disable-largefile</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>disable support for large (64 bit) file offsets</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--disable-openmp</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>disable use of OpenMP (automatic multi-threaded loops) at all</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--enable-openmp-slow</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>enable OpenMP for algorithms which sometimes run slower</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--enable-symbol-prefix</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>enable prefixing library symbols with &quot;Gm&quot;</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--enable-magick-compat</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>install ImageMagick utility shortcuts (default disabled)</td></tr>
</tbody>
</table>
</div>
<div class="section" id="optional-packages-options">
<h2><a class="toc-backref" href="#id5">Optional Packages/Options</a></h2>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-quantum-depth</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>number of bits in a pixel quantum (default 8)</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--enable-ltdl-install</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>install libltdl</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-included-ltdl</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>use the GNU ltdl sources included here</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-ltdl-include=<var>DIR</var></span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>use the ltdl headers installed in DIR</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-ltdl-lib=<var>DIR</var></span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>use the libltdl.la installed in DIR</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--with-modules</span></kbd></td>
<td>enable building dynamically loadable modules</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--with-cache</span></kbd></td>
<td>set pixel cache threshhold (defaults to available memory)</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--without-threads</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>disable threads support.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-frozenpaths</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>enable frozen delegate paths</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--without-magick-plus-plus</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>disable build/install of Magick++</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--with-perl</span></kbd></td>
<td>enable build/install of PerlMagick</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-perl=<var>PERL</var></span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>use specified Perl binary to configure PerlMagick</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-perl-options=<var>OPTIONS</var></span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>options to pass on command-line when generating PerlMagick's Makefile from Makefile.PL</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--without-bzlib</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>disable BZLIB support</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--without-dps</span></kbd></td>
<td>disable Display Postscript support</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--with-fpx</span></kbd></td>
<td>enable FlashPIX support</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--with-gslib</span></kbd></td>
<td>enable Ghostscript library support (not recommended)</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--without-jbig</span></kbd></td>
<td>disable JBIG support</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--without-jpeg</span></kbd></td>
<td>disable JPEG support</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--without-jp2</span></kbd></td>
<td>disable JPEG v2 support</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--without-lcms</span></kbd></td>
<td>disable LCMS support</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--without-png</span></kbd></td>
<td>disable PNG support</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--without-tiff</span></kbd></td>
<td>disable TIFF support</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--without-trio</span></kbd></td>
<td>disable TRIO library support</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--without-ttf</span></kbd></td>
<td>disable TrueType support</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--with-umem</span></kbd></td>
<td>enable umem memory allocation library support</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--without-wmf</span></kbd></td>
<td>disable WMF support</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-fontpath</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>prepend to default font search path</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-gs-font-dir</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>directory containing Ghostscript fonts</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-windows-font-dir</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>directory containing MS-Windows fonts</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--without-xml</span></kbd></td>
<td>disable XML support</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--without-zlib</span></kbd></td>
<td>disable ZLIB support</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--with-x</span></kbd></td>
<td>use the X Window System</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-share-path=<var>DIR</var></span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>Alternate path to share directory (default share/GraphicsMagick)</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-libstdc=<var>DIR</var></span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>use libstdc++ in DIR (for GNU C++)</td></tr>
</tbody>
</table>
<p>GraphicsMagick options represent either features to be enabled, disabled,
or packages to be included in the build.  When a feature is enabled (via
--enable-something), it enables code already present in GraphicsMagick.
When a package is enabled (via --with-something), the configure script
will search for it, and if is is properly installed and ready to use
(headers and built libraries are found by compiler) it will be included
in the build.  The configure script is delivered with all features
disabled and all packages enabled. In general, the only reason to
disable a package is if a package exists but it is unsuitable for
the build (perhaps an old version or not compiled with the right
compilation flags).</p>
<p>Several configure options require special note:</p>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-included-ltdl</span>, <span class="option">--enable-ltdl-install</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>GraphicsMagick supports loadable coder and filter modules if
--enable-shared (see below) is specified in order to enable building
shared libraries. This is true even if --with-modules (see below) has
not been specified. The libldtl library is used to support this
feature. A copy of libltdl is included with GraphicsMagick. By default,
if a suitable libltdl is already installed on the system, it will be
used. If there is no suitable libltdl installed, then it may be
necessary to specify --with-included-ltdl to use libltdl as provided
with GraphicsMagick. The --enable-ltdl-install option enables building
libltdl locally and also formally installing it at time of 'make
install'. If your already installed libltdl is supported via a package
management system then you probably don't want to use this option.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--enable-shared</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td><p class="first">The shared libraries are built and support for loading coder and
process modules is enabled. Shared libraries are preferred because
they allow programs to share common code, making the individual
programs much smaller. In addition shared libraries are required in
order for PerlMagick to be dynamically loaded by an installed PERL
(otherwise an additional PERL (PerlMagick) must be installed. This
option is not the default because all libraries used by
GraphicsMagick must also be dynamic libraries if GraphicsMagick
itself is to be dynamically loaded (such as for PerlMagick).</p>
<p>GraphicsMagick built with delegates (see MAGICK PLUG-INS below)
can pose additional challenges. If GraphicsMagick is built using
static libraries (the default without --enable-shared) then
delegate libraries may be built as either static libraries or
shared libraries. However, if GraphicsMagick is built using shared
libraries, then all delegate libraries must also be built as
shared libraries.  Static libraries usually have the extension .a,
while shared libraries typically have extensions like .so, .sa,
or .dll. Code in shared libraries normally must compiled using
a special compiler option to produce Position Independent Code
(PIC). The only time this is not necessary is if the platform
compiles code as PIC by default.</p>
<p>PIC compilation flags differ from vendor to vendor (gcc's is
-fPIC). However, you must compile all shared library source with
the same flag (for gcc use -fPIC rather than -fpic). While static
libraries are normally created using an archive tool like 'ar',
shared libraries are built using special linker or compiler options
(e.g. -shared for gcc).</p>
<p>Building shared libraries often requires subtantial hand-editing
of Makefiles and is only recommended for those who know what they
are doing.</p>
<p class="last">If --enable-shared is not specified, a new PERL interpreter
(PerlMagick) is built which is statically linked against the
PerlMagick extension. This new interpreter is installed into the
same directory as the GraphicsMagick utilities. If --enable-shared
is specified, the PerlMagick extension is built as a dynamically
loadable object which is loaded into your current PERL interpreter
at run-time. Use of dynamically-loaded extensions is preferable over
statically linked extensions so --enable-shared should be specified
if possible (note that all libraries used with GraphicsMagick must
be shared libraries!).</p>
</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--disable-static</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>static archive libraries (with extension .a) are not built. If you
are building shared libraries, there is little value to building
static libraries. Reasons to build static libraries include: 1) they
can be easier to debug; 2) the clients do not have external
dependencies (i.e. libMagick.so); 3) building PIC versions of the
delegate libraries may take additional expertise and effort; 4) you
are unable to build shared libraries.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--disable-installed</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>By default the GraphicsMagick build is configured to formally install
into a directory tree. This is the most secure and reliable way to
install GraphicsMagick. Specifying --disable-installed configures
GraphicsMagick so that it doesn't use hard-coded paths and locates
support files by computing an offset path from the executable (or
from the location specified by the MAGICK_HOME environment variable.
The uninstalled configuration is ideal for binary distributions which
are expected to extract and run in any location.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--with-modules</span></kbd></td>
<td>Image coders and process modules are built as loadable modules which
are installed under the directory
[prefix]/lib/GraphicsMagick-X.X.X/modules-QN (where 'N' equals 8, 16,
or 32 depending on the quantum depth) in the subdirectories 'coders'
and 'filters' respectively. The modules build option is only
available in conjunction with --enable-shared. If --enable-shared is
not also specified, then support for building modules is disabled.
Note that if --enable-shared is specified, the module loader is
active (allowing extending an installed GraphicsMagick by simply
copying a module into place) but GraphicsMagick itself is not built
using modules.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--enable-symbol-prefix</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>The GraphicsMagick libraries may contain symbols which conflict with
other libraries. Specifify this option to prefix &quot;Gm&quot; to all library
symbols, and use the C pre-processor to allow dependent code to still
compile as before.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--enable-magick-compat</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>Normally GraphicsMagick installs only the 'gm' utility from which all
commands may be accessed. Existing packages may be designed to invoke
ImageMagick utilities (e.g. &quot;convert&quot;). Specify this option to
install ImageMagick utility compatibility links to allow
GraphicsMagick to substitute directly for ImageMagick. Take care when
selecting this option since if there is an existing ImageMagick
installation installed in the same directory, its utilities will be
replaced when GraphicsMagick is installed.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-quantum-depth</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td><p class="first">This option allows the user to specify the number of bits to use per
pixel quantum (the size of the red, green, blue, and alpha pixel
components. For example, &quot;--with-quantum-depth=8&quot; builds
GraphicsMagick using 8-bit quantums. Most computer display adaptors
use 8-bit quantums. Currently supported arguments are 8, 16, or 32.
The default is 8. This option is the most important option in
determining the overall run-time performance of GraphicsMagick.</p>
<p>The number of bits in a quantum determines how many values it may
contain. Each quantum level supports 256 times as many values as
the previous level. The following table shows the range available
for various quantum sizes.</p>
<blockquote>
<table border="1" class="docutils">
<colgroup>
<col width="24%" />
<col width="42%" />
<col width="34%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">QuantumDepth</th>
<th class="head">Valid Range (Decimal)</th>
<th class="head">Valid Range (Hex)</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>8</td>
<td>0-255</td>
<td>00-FF</td>
</tr>
<tr><td>16</td>
<td>0-65535</td>
<td>0000-FFFF</td>
</tr>
<tr><td>32</td>
<td>0-4294967295</td>
<td>00000000-FFFFFFFF</td>
</tr>
</tbody>
</table>
</blockquote>
<p>Larger pixel quantums cause GraphicsMagick to run more slowly and to
require more memory. For example, using sixteen-bit pixel quantums
causes GraphicsMagick to run 15% to 50% slower (and take twice as
much memory) than when it is built to support eight-bit pixel
quantums.</p>
<p>The amount of virtual memory consumed by an image can be computed
by the equation (QuantumDepth*Rows*Columns*5)/8. This is an
important consideration when resources are limited, particularly
since processing an image may require several images to be in
memory at one time. The following table shows memory consumption
values for a 1024x768 image:</p>
<blockquote>
<table border="1" class="docutils">
<colgroup>
<col width="46%" />
<col width="54%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">QuantumDepth</th>
<th class="head">Virtual Memory</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>8</td>
<td>3MB</td>
</tr>
<tr><td>16</td>
<td>8MB</td>
</tr>
<tr><td>32</td>
<td>15MB</td>
</tr>
</tbody>
</table>
</blockquote>
<p class="last">GraphicsMagick performs all image processing computations using
double-precision floating point so results are very accurate.
Increasing the quantum storage size decreases the amount of
quantization noise (usually not visible at 8 bits) and helps
prevent countouring and posterization in the image.</p>
</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--without-magick-plus-plus</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>Disable building Magick++, the C++ application programming interface
to GraphicsMagick. A suitable C++ compiler is required in order to
build Magick++. Specify the CXX configure variable to select the C++
compiler to use (default &quot;g++&quot;), and CXXFLAGS to select the desired
compiler opimization and debug flags (default &quot;-g -O2&quot;). Antique C++
compilers will normally be rejected by configure tests so specifying
this option should only be necessary if Magick++ fails to compile.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-frozenpaths</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>Normally external program names are substituted into the
delegates.mgk file without full paths. Specify this option to enable
saving full paths to programs using locations determined by
configure. This is useful for environments where programs are stored
under multiple paths, and users may use different PATH settings than
the person who builds GraphicsMagick.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--without-threads</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>By default, the GraphicsMagick library is compiled with multi-thread
support. If this is undesireable, then specify --without-threads.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--with-cache</span></kbd></td>
<td>Specify a different image pixel cache threshold using the
--with-cache option. This sets the maximum amount of heap memory that
GraphicsMagick is allowed to consume before switching to using
memory-mapped temporary files to store raw pixel data.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--disable-largefile</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>By default, GraphicsMagick is compiled with support for large (&gt; 2GB
on a 32-bit CPU) files if the operating system supports large files.
All applications which use the GraphicsMagick library must then also
include support for large files. By disabling support for large files
via --disable-largefile, dependent applications do not require
special compilation options for large files in order to use the
library.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--disable-openmp</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td><p class="first">By default, GraphicsMagick is compiled with support for OpenMP
(<a class="reference external" href="http://www.openmp.org/">http://www.openmp.org/</a>) if the compilation environment supports it.
OpenMP automatically parallizes loops across concurrent threads
based on instructions in pragmas. OpenMP is relatively new to GCC
and was introduced in GCC 4.2. OpenMP is a standard and was
implemented in some other compilers long before its appearance in
GCC. OpenMP adds additional build and linkage requirements.</p>
<p class="last">The OpenMP support provided by GCC (&quot;GOMP&quot;) automatically enables use
of OpenMP with the number of threads equal to the number of CPU cores
in the system. Other implementations of OpenMP do not enable
parallelization by default. According to the OpenMP standard, the
OMP_NUM_THREADS environment variable specifies how many threads should
be used. In order to obtain the best single-user performance, set
OMP_NUM_THREADS equal to the number of available CPU cores.</p>
</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--enable-openmp-slow</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>On some systems, relatively fast algorithms run slower (rather than
faster) as threads are added via OpenMP.  This may be due to CPU
cache and memory architecture implementation, or OS thread API
implementation.  Since it is not known how a system will behave
without testing, these algorithms are now disabled for OpenMP by
default.  This option should usually be enabled for AIX, Linux, and
Solaris, which work well with OpenMP.  AMD Opteron and AMD K10
architecture chips works well with this option.  Intel Core 2 Duo
works well, but Core 2 Quad does not.  IBM Power works well.
UltraSPARC works well.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--with-perl</span></kbd></td>
<td><p class="first">Use this option to include PerlMagick in the GraphicsMagick build
and test suite. While PerlMagick is always configured by default
(PerlMagick/Makefile.PL is generated by the configure script),
PerlMagick is no longer installed by GraphicsMagick's ''make
install''.  The procedure to configure, build, install, and check
PerlMagick is described in PerlMagick/README.txt.  When using a
shared library build of GraphicsMagick, it is necessary to formally
install GraphicsMagick prior to building PerlMagick in order to
achieve a working PerlMagick since otherwise the wrong
GraphicsMagick libraries may be used.</p>
<p class="last">If the argument ''--with-perl=/path/to/perl'' is supplied, then
/path/to/perl will be taken as the PERL interpreter to use. This is
important in case the 'perl' executable in your PATH is not PERL5,
or is not the PERL you want to use.  Experience suggests that static
PerlMagick builds may not be fully successful for Perl versions
newer than 5.8.8.</p>
</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-perl-options</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>The PerlMagick module is normally installed using the Perl
interpreter's installation PREFIX, rather than GraphicsMagick's. If
GraphicsMagick's installation prefix is not the same as PERL's
PREFIX, then you may find that PerlMagick's 'make install' step tries
to install into a directory tree that you don't have write
permissions to. This is common when PERL is delivered with the
operating system or on Internet Service Provider (ISP) web servers.
If you want PerlMagick to install elsewhere, then provide a PREFIX
option to PERL's configuration step via
&quot;--with-perl-options=PREFIX=/some/place&quot;. Other options accepted by
MakeMaker are 'LIB', 'LIBPERL_A', 'LINKTYPE', and 'OPTIMIZE'. See the
ExtUtils::MakeMaker(3) manual page for more information on
configuring PERL extensions.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--without-x</span></kbd></td>
<td>By default, GraphicsMagick will use X11 libraries if they are
available. When --without-x is specified, use of X11 is disabled. The
display, animate, and import sub-commands are not included. The
remaining sub-commands have reduced functionality such as no access
to X11 fonts (consider using Postscript or TrueType fonts instead).</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-gs-font-dir</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>Specify the directory containing the Ghostscript Postscript Type 1
font files (e.g. &quot;n022003l.pfb&quot;) so that they can be rendered using
the FreeType library. If the font files are installed using the
default Ghostscript installation paths
(${prefix}/share/ghostscript/fonts), they should be discovered
automatically by configure and specifying this option is not
necessary. Specify this option if the Ghostscript fonts fail to be
located automatically, or the location needs to be overridden.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">--with-windows-font-dir</span></kbd></td>
</tr>
<tr><td>&nbsp;</td><td>Specify the directory containing MS-Windows-compatible fonts. This is
not necessary when GraphicsMagick is running under MS-Windows.</td></tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="building-under-cygwin">
<h1><a class="toc-backref" href="#id6">Building under Cygwin</a></h1>
<p>GraphicsMagick may be built under the Windows '95-XP Cygwin
Unix-emulation environment available for free from</p>
<blockquote>
<a class="reference external" href="http://www.cygwin.com/">http://www.cygwin.com/</a></blockquote>
<p>X11R6 for Cygwin is available from</p>
<blockquote>
<a class="reference external" href="http://xfree86.cygwin.com/">http://xfree86.cygwin.com/</a></blockquote>
<p>It is strongly recommended that the X11R6 package be installed since
this enables GraphicsMagick's X11 support (animate, display, and
import sub-commands will work) and it includes the Freetype v2 DLL
required to support TrueType and Postscript Type 1 fonts. Make sure
that /usr/X11R6/bin is in your PATH prior to running configure.</p>
<p>If you are using Cygwin version 1.3.9 or later, you may specify the
configure option '--enable-shared' to build Cygwin DLLs. Specifying
'--enable-shared' is required if you want to build PerlMagick under
Cygwin because Cygwin does not provide the libperl.a static library
required to create a static PerlMagick. Note that since C++
exceptions do not currently work properly when thrown from a DLL, the
Magick++ library is always built as a static library. Be sure to not
specify --disable-static if you are building the Magick++ library since
that would surely lead to problems.</p>
</div>
<div class="section" id="building-under-mingw-msys">
<h1><a class="toc-backref" href="#id7">Building under MinGW &amp; MSYS</a></h1>
<p>GraphicsMagick may be built using the free MinGW (&quot;Minimalistic GNU for
Windows&quot;) package, available from</p>
<blockquote>
<a class="reference external" href="http://www.mingw.org/">http://www.mingw.org/</a></blockquote>
<p>which consists of a GNU-based (GCC) compilation toolset plus headers
and libraries required to build programs which are entirely based on
standard Microsoft Windows DLLs so that they may be used for
proprietary applications. MSYS provides a Unix-style console shell
window with sufficient functionality to run the GraphicsMagick
configure script and execute 'make', 'make check', and 'make install'.
GraphicsMagick may be executed from the MSYS shell, but since it is a
normal Windows application, it will work just as well from the Windows
command line.</p>
<p>Unlike the Cygwin build which creates programs based on a
Unix-emulation DLL, and which uses Unix-style paths to access Windows
files, the MinGW build creates native Windows console applications
similar to the Visual C++ build. Run-time performance is similar to the
Microsoft compilers.</p>
<p>The base MinGW package and the MSYS package should be installed. Other
MinGW packages are entirely optional. Once MSYS is installed a MSYS
icon (blue capital 'M') is added to the desktop. Double clicking on
this icon starts an instance of the MSYS shell.</p>
<p>Start the MSYS console and follow the Unix configure and build
instructions. The configure and build for MinGW is the same as for
Unix. Any additional delegate libraries (e.g. libpng) will need to be
built under MinGW in order to be used. These libraries should be built
and installed prior to configuring GraphicsMagick. While some delegate
libraries are easy to configure and build under MinGW, others may be
quite a challenge.</p>
<p>Lucky for us, the most common delegate libraries are available
pre-built, as part of the GnuWin32 project, from</p>
<blockquote>
<a class="reference external" href="http://gnuwin32.sourceforge.net/packages.html">http://gnuwin32.sourceforge.net/packages.html</a></blockquote>
<p>The relevant packages are bzip2, freetype, jbigkit, libintl, jpeg,
libpng, libtiff, libwmf and zlib. However, note that for freetype
to be detected by configure, you must move the <tt class="docutils literal"><span class="pre">freetype</span></tt> directory
out of <tt class="docutils literal"><span class="pre">GnuWin32\include\freetype2</span></tt> and into <tt class="docutils literal"><span class="pre">GnuWin32\include</span></tt>.</p>
<p>Since C++ exceptions do not currently work properly when thrown from a
DLL, the Magick++ library is always built as a static library. Be sure
to not specify --disable-static if you are building the Magick++
library since that would surely lead to problems.</p>
<p>Note that the default installation prefix is MSYS's notion of
<tt class="docutils literal"><span class="pre">/usr/local</span></tt> which installs the package into a MSYS directory. To
install outside of the MSYS directory tree, you may specify an
installation prefix like <tt class="docutils literal"><span class="pre">/c/GraphicsMagick</span></tt> which causes the package
to be installed under the Windows directory <tt class="docutils literal"><span class="pre">C:\GraphicsMagick</span></tt>. The
installation directory structure will look very much like the Unix
installation layout (e.g. <tt class="docutils literal"><span class="pre">C:\GraphicsMagick\bin</span></tt>,
<tt class="docutils literal"><span class="pre">C:\GraphicsMagick\lib</span></tt>, <tt class="docutils literal"><span class="pre">C:\GraphicsMagick\share</span></tt>, etc.). Paths
which may be embedded in libraries and configuration files are
transformed into Windows paths so they don't depend on MSYS.</p>
</div>
<div class="section" id="dealing-with-configuration-failures">
<h1><a class="toc-backref" href="#id8">Dealing with configuration failures</a></h1>
<p>While configure is designed to ease installation of GraphicsMagick, it
often discovers problems that would otherwise be encountered later
when compiling GraphicsMagick. The configure script tests for headers
and libraries by executing the compiler (CC) with the specified
compilation flags (CFLAGS), pre-processor flags (CPPFLAGS), and linker
flags (LDFLAGS). Any errors are logged to the file 'config.log'. If
configure fails to discover a header or library please review this
log file to determine why, however, please be aware that <em>errors
in the config.log are normal</em> because configure works by trying
something and seeing if it fails. An error in config.log is only a
problem if the test should have passed on your system. After taking
corrective action, be sure to remove the 'config.cache' file before
running configure so that configure will re-inspect the environment
rather than using cached values.</p>
<p>Common causes of configure failures are:</p>
<ol class="arabic simple">
<li>A delegate header is not in the header include path (CPPFLAGS -I
option).</li>
<li>A delegate library is not in the linker search/run path (LDFLAGS
-L/-R option).</li>
<li>A delegate library is missing a function (old version?).OB</li>
<li>The compilation environment is faulty.</li>
</ol>
<p>If all reasonable corrective actions have been tried and the problem
appears to be due to a flaw in the configure script, please send a
bug report to the configure script maintainer (currently
<a class="reference external" href="mailto:bfriesen&#64;graphicsmagick.org">bfriesen&#64;graphicsmagick.org</a>). All bug reports should contain the
operating system type (as reported by 'uname -a') and the
compiler/compiler-version. A copy of the configure script output
and/or the config.log file may be valuable in order to find the
problem. If you send a config.log, please also send a script of the
configure output and a description of what you expected to see (and
why) so the failure you are observing can be identified and resolved.</p>
</div>
<div class="section" id="makefile-build-targets">
<h1><a class="toc-backref" href="#id9">Makefile Build Targets</a></h1>
<p>Once GraphicsMagick is configured, these standard build targets are
available from the generated Makefiles:</p>
<blockquote>
<dl class="docutils">
<dt>'make'</dt>
<dd>Build the package</dd>
<dt>'make install'</dt>
<dd>Install the package</dd>
<dt>'make check'</dt>
<dd>Run tests using the installed GraphicsMagick. On some systems,
'make install' must be done before the test suite will work but
usually the software can be tested prior to installation.</dd>
<dt>'make clean'</dt>
<dd>Remove everything in the build directory created by 'make'</dd>
<dt>'make distclean'</dt>
<dd>Remove everything in the build directory created by 'configure'
and 'make'. This is useful if you want to start over from scratch.</dd>
<dt>'make uninstall'</dt>
<dd>Remove all files from the system which are (or would be) installed
by 'make install' using the current configuration. Note that this
target does not work for PerlMagick since Perl no longer supports
an 'uninstall' target.</dd>
</dl>
</blockquote>
</div>
<div class="section" id="build-install">
<h1><a class="toc-backref" href="#id10">Build &amp; Install</a></h1>
<p>Now that GraphicsMagick is configured, type</p>
<pre class="literal-block">
make
</pre>
<p>to build the package and</p>
<pre class="literal-block">
make install
</pre>
<p>to install it.</p>
</div>
<div class="section" id="verifying-the-build">
<h1><a class="toc-backref" href="#id11">Verifying The Build</a></h1>
<p>To confirm your installation of the GraphicsMagick distribution was
successful, ensure that the installation directory is in your executable
search path and type</p>
<pre class="literal-block">
gm display
</pre>
<p>The GraphicsMagick logo should be displayed on your X11 display.</p>
<p>Verify that the expected image formats are supported by executing</p>
<pre class="literal-block">
gm convert -list formats
</pre>
<p>Verify that the expected fonts are available by executing</p>
<pre class="literal-block">
gm convert -list fonts
</pre>
<p>Verify that delegates (external programs) are configured as expected
by executing</p>
<pre class="literal-block">
gm convert -list delegates
</pre>
<p>Verify that color definitions may be loaded by executing</p>
<pre class="literal-block">
gm convert -list colors
</pre>
<p>If GraphicsMagick is built to use loadable coder modules, then verify
that the modules load via</p>
<pre class="literal-block">
gm convert -list modules
</pre>
<p>For a thorough test, you may run the GraphicsMagick test suite by typing</p>
<pre class="literal-block">
make check
</pre>
<p>Note that due to differences between the developer's environment and
your own, it is possible that some tests may be indicated as failed
even though the results are ok. Differences between the developer's
environment environment and your own may include the compiler, the CPU
type, and the library versions used. The GraphicsMagick developers use
the current release of all dependent libraries.</p>
<hr class="docutils" />
<div class="line-block">
<div class="line">Copyright (C) 2003 - 2010 GraphicsMagick Group</div>
<div class="line">Copyright (C) 2002 ImageMagick Studio</div>
<div class="line">Copyright (C) 1999 E. I. du Pont de Nemours and Company</div>
</div>
<p>This program is covered by multiple licenses, which are described in
Copyright.txt. You should have received a copy of Copyright.txt with this
package; otherwise see <a class="reference external" href="http://www.graphicsmagick.org/Copyright.html">http://www.graphicsmagick.org/Copyright.html</a>.</p>
</div>
</div>
<div class="footer">
<hr class="footer" />
Generated on: 2010-02-01 01:02 UTC.

</div>
</body>
</html>