1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<style type="text/css" media="screen,projection"><!--
@import url("../www/magick.css");
//--></style>
<meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U=" />
<link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf" />
<title>ImageMagick: Advanced Unix Source Installation</title>
<meta http-equiv="Content-Language" content="en-US"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
<meta name="Generator" content="PHP"/>
<meta name="Keywords" content="advanced, unix, source, installation, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand"/>
<meta name="Description" content="ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (about 100) including GIF, JPEG, JPEG-2000, PNG, PDF, PhotoCD, TIFF, and DPX. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you can freely use, copy, modify, and distribute. Its license is compatible with the GPL. It runs on all major operating systems. The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images automagically and dynamically."/>
<meta name="Rating" content="GENERAL"/>
<meta name="Robots" content="INDEX, FOLLOW"/>
<meta name="Generator" content="ImageMagick Studio LLC"/>
<meta name="Author" content="ImageMagick Studio LLC"/>
<meta name="Revisit-after" content="2 DAYS"/>
<meta name="Resource-type" content="document"/>
<meta name="Copyright" content="Copyright (c) 1999-2008 ImageMagick Studio LLC"/>
<meta name="Distribution" content="Global"/>
<link rel="shortcut icon" href="../images/wand.ico" type="images/vnd.microsoft.icon"/>
</head>
<body id="www-imagemagick-org">
<table id="titlebar" style="width: 100%;background-color: #f5f5f5" cellpadding="0" cellspacing="0" border="0" summary="ImageMagick">
<tbody>
<tr valign="top">
<td align="left"><a href="../index.html"><img id="titlebar-west" src="../images/script.png" alt="[ImageMagick]" width="350" height="60" border="0" vspace="28" name="titlebar-west"/></a></td>
<td align="left"><a href="https://secure.networkredux.com/affiliate/idevaffiliate.html?id=146" target="94581026"><img id="titlebar-west" src="../images/networkredux.png" alt="[sponsor]" border="0" vspace="45" name="titlebar-west"/></a></td>
<td width="99%"><br /> </td>
<td style="background-color: white" align="right"><a href="../index.html"><img src="../images/sprite.jpg" alt="" width="114" height="118" border="0" name="titlebar-east"/></a></td>
<td style="background-color: white" align="right"><a href="http://www.imagemagick.org/discourse-server/" target="744354892"><img id="titlebar-east" src="../images/logo.jpg" alt="" width="114" height="118" border="0" name="titlebar-east"/></a></td>
</tr>
</tbody>
</table>
<table style="width: 100%" border="0" cellpadding="0" cellspacing="0" summary="">
<tbody>
<tr valign="top" style="height: 100%;">
<td id="menu" width="1%" height="100%">
<p><a href="#main">Skip to page contents</a></p>
<span>[</span>
<a href="../index.html">About ImageMagick</a>
<a href="../www/command-line-tools.html">Command-line Tools</a>
<a href="../www/command-line-processing.html" class="sub">Processing</a>
<a href="../www/command-line-options.html" class="sub">Options</a>
<a href="http://www.imagemagick.org/Usage/" target="1292927834" class="sub">Usage</a>
<a href="../www/api.html">Program Interfaces</a>
<a href="../www/magick-wand.html" class="sub">MagickWand</a>
<a href="../www/magick-core.html" class="sub">MagickCore</a>
<a href="../www/perl-magick.html" class="sub">PerlMagick</a>
<a href="../Magick++/" target="803528321" class="sub">Magick++</a>
<a href="../www/architecture.html">Architecture</a>
<span>]</span><br /><span>[</span>
<a href="../www/install-source.html">Install from Source</a>
<a href="../www/install-source.html#unix" class="sub">Unix</a>
<a href="../www/install-source.html#windows" class="sub">Windows</a>
<a href="../www/binary-releases.html">Binary Releases</a>
<a href="../www/binary-releases.html#unix" class="sub">Unix</a>
<a href="../www/binary-releases.html#macosx" class="sub">Mac OS X</a>
<a href="../www/binary-releases.html#windows" class="sub">Windows</a>
<a href="../www/resources.html">Resources</a>
<span>]</span><br /><span>[</span>
<a href="../www/download.html">Download</a>
<span>]</span><br /><span>[</span>
<a href="../www/sitemap.html">Site Map</a>
<a href="../www/links.html" class="sub">Links</a>
<span>]</span><br /><br /><span>[</span>
<a href="../www/sponsors.html">Sponsors</a>
<a href="http://www.fern-studiengang.de" class="sponsor" target="sponsor">Fernstudium / Studium</a><!-- 200804010000 -->
<br />
<a href="http://analogik.com"><img src="../images/analogik.png" alt="[Electronic Music]" width="105" height="60" border="0" name="analogik"/></a> <!-- 200803030160 -->
<span>]</span>
</td>
<td id="main" valign="top">
<p class="navigation-index">[<a href="#download">Download & Unpack</a> • <a href="#configure">Configure</a> • <a href="#build">Build</a> • <a href="#install">Install</a> • <a href="#macosx">Mac OS X-specific Build Instructions</a> <a href="#mingw">MinGW-specific Build Instructions</a> • <a href="#problems">Dealing with Unexpected Problems</a>]</p>
<p>It's possible you don't want to concern yourself with advanced installation under Unix or Linux systems. If so, you also have the option of installing a pre-compiled <a href="../www/binary-releases.html#unix">binary release</a> or if you still want to install from source without all the fuss see the simple <a href="../www/install-source.html#unix">Install From Source</a> instructions. However, if you want to customize the configuration and installation of ImageMagick under Unix or Linux systems, lets begin.</p>
<div style="margin: auto;">
<h2><a name="download"></a>Download & Unpack</h2>
</div>
<p>ImageMagick builds on a variety of Unix and Unix-like operating systems including Linux, Solaris, FreeBSD, Mac OS X, and others. A compiler is required and fortunately almost all modern Unix systems have one. Download <a href="ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz">ImageMagick.tar.gz</a> from <a href="ftp://ftp.imagemagick.org/pub/ImageMagick" target="1394256287">ftp.imagemagick.org</a> or its <a href="../www/download.html">mirrors</a> and unpack it with this command:</p>
<pre class="text">
gunzip -c ImageMagick.tar.gz • tar xvf -
</pre>
<p>Now that you have the ImageMagick Unix/Linux source distribution unpacked, let's configure it.</p>
<div style="margin: auto;">
<h2><a name="configure"></a>Configure</h2>
</div>
<p>The configure script looks at your environment and decides what it can cobble together to get ImageMagick compiled and installed on your system. This includes finding a compiler, where your compiler header files are located (e.g. stdlib.h), and if any delegate libraries are available for ImageMagick to use (e.g. JPEG, PNG, TIFF, etc.). If you are willing to accept configure's default options, and build from within the source directory, you can simply type:</p>
<pre class="text">
cd ImageMagick-6.2.2
./configure
</pre>
<p>Watch the configure script output to verify that it finds everything that
you think it should. Pay particular attention to the last lines of the script output. For example, here is what our system reports:</p>
<pre class="text">
ImageMagick is configured as follows. Please verify that this configuration matches your expectations.
Host system type : i686-magick-linux-gnu
Option Value
-------------------------------------------------------------------------
Shared libraries --enable-shared=yes yes
Static libraries --enable-static=yes yes
Module support --with-modules=yes yes
GNU ld --with-gnu-ld=yes yes
Quantum depth --with-quantum-depth=16 16
Delegate Configuration:
BZLIB --with-bzlib=yes yes
DPS --with-dps=yes yes
FlashPIX --with-fpx=no no
FreeType 2.0 --with-freetype=yes yes
Ghostscript None gs (7.07)
Ghostscript fonts --with-gs-font-dir=default /usr/local/share/ghostwww/fonts/
Ghostscript lib --with-gslib=no no
Graphviz --with-dot=yes no
JBIG --with-jbig=yes no
JPEG v1 --with-jpeg=yes yes
JPEG-2000 --with-jp2=yes no
LCMS --with-lcms=yes yes
Magick++ --with-magick-plus-plus=yes yes
PERL --with-perl=yes /usr/local/bin/perl
PNG --with-png=yes yes
TIFF --with-tiff=yes yes
Windows fonts --with-windows-font-dir= none
WMF --with-wmf=yes no
X11 --with-x= yes
XML --with-xml=yes yes
ZLIB --with-zlib=yes yes
X11 Configuration:
X_CFLAGS = -I/usr/X11R6/include
X_PRE_LIBS = -lSM -lICE
X_LIBS = -L/usr/X11R6/lib
X_EXTRA_LIBS =
Options used to compile and link:
PREFIX = /usr/local
EXEC-PREFIX = /usr/local
VERSION = 6.3.7
CC = gcc
CFLAGS = -g -O2 -Wall -pthread
CPPFLAGS = -I/usr/local/include
PCFLAGS =
DEFS = -DHAVE_CONFIG_H
LDFLAGS = -L/usr/local/lib -L/usr/X11R6/lib -lfreetype -lz -L/usr/lib
LIBS = -lMagick -llcms -ltiff -lfreetype -ljpeg -lpng -ldpstk -ldps -lXext -lXt -lSM
-lICE -lX11 -lbz2 -lxml2 -lz -lpthread -lm -lpthread
CXX = g++
CXXFLAGS = -pthread
</pre>
<p>You can influence choice of compiler, compilation flags, or libraries of the configure script by setting initial values for variables in the the configure command line. These include, among others:</p>
<ul>
<dt>CC</dt>
<dd>Name of C compiler (e.g. <kbd>cc -Xa</kbd>) to use.</dd>
<dt>CXX</dt>
<dd>Name of C++ compiler to use (e.g. <kbd>CC</kbd>).</dd>
<dt>CFLAGS</dt>
<dd>Compiler flags (e.g. <kbd>-g -O2</kbd>) to compile C code.</dd>
<dt>CXXFLAGS</dt>
<dd>Compiler flags (e.g. <kbd>-g -O2</kbd>) to compile C++ code.</dd>
<dt>CPPFLAGS</dt>
<dd>Include paths (.e.g. <kbd>-I/usr/local</kbd>) to look for header files.</dd>
<dt>LDFLAGS</dt>
<dd>Library paths (.e.g. <kbd>-L/usr/local</kbd>) 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 <em>-R/path</em>. Some Linux systems will work with <kbd>-rpath /usr/local/lib</kbd>, while some other Linux systems who's gcc does not pass <kbd>-rpath</kbd> to the linker, require an argument of the form <kbd>-Wl,-rpath,/usr/local/lib</kbd>.</dd>
<dt>LIBS</dt>
<dd>Extra libraries (.e.g. <kbd>-l/usr/local/lib</kbd>) required to link.</dd>
</ul>
<p>Here is an example of setting configure variables from the command line:</p>
<pre class="text">
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
</pre>
<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>Configure can usually find the X include and library files automatically, but if it doesn't, you can use the <em>--x-includes=path</em> and <em>--x-libraries=path</em> options to specify their locations.</p>
<p>The configure script provides a number of ImageMagick specific options. When disabling an option <em>--disable-something</em> is equivalent to specifying <em>--enable-something=no</em> and <em>--without-something</em> is equivalent to <em>--with-something=no</em>. The configure options are as follows (execute <kbd>configure --help</kbd> to see all options).</p>
<p> ImageMagick options represent either features to be enabled, disabled, or packages to be included in the build. When a feature is enabled (via <em>--enable-something</em>), it enables code already present in ImageMagick. When a package is enabled (via <em>--with-something</em>), 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>Here are the optional features you can configure:</p>
<ul>
<dt>--enable-shared</dt>
<dd>build the shared libraries and support for loading coder and process modules. 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.</dd><br />
<dd>ImageMagick built with delegates (see MAGICK PLUG-INS below) can pose additional challenges. If ImageMagick is built using static libraries (the default without <kbd>--enable-shared</kbd>) then delegate libraries may be built as either static libraries or shared libraries. However, if ImageMagick is built using shared libraries, then all delegate libraries must also be built as shared libraries. Static libraries usually have the extension <kbd>.a</kbd>, while shared libraries typically have extensions like <kbd>.so</kbd>, <kbd>.sa</kbd>, or <kbd>.dll</kbd>. 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.</dd><br />
<dd>PIC compilation flags differ from vendor to vendor (gcc's is <kbd>-fPIC</kbd>). However, you must compile all shared library source with the same flag (for gcc use <kbd>-fPIC</kbd> rather than <kbd>-fpic</kbd>). While static libraries are normally created using an archive tool like <kbd>ar</kbd>, shared libraries are built using special linker or compiler options (e.g. <kbd>-shared</kbd> for gcc).</dd><br />
<dd>If <kbd>--enable-shared</kbd> 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 ImageMagick utilities. If <kbd>--enable-shared</kbd> 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 use <kbd>--enable-shared</kbd> if possible (note that all libraries used with ImageMagick must be shared libraries!).</dd>
<dt>--disable-static</dt>
<dd>static archive libraries (with extension <kbd>.a</kbd>) 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) 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.</dd>
<dt>--disable-installed</dt>
<dd>disable building an installed ImageMagick (default enabled).</dd><br />
<dd>By default the ImageMagick build is configured to formally install into a directory tree. This is the most secure and reliable way to install ImageMagick. Use this option to configure ImageMagick 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.</dd>
<dt>--enable-ccmalloc</dt>
<dd>enable 'ccmalloc' memory debug support (default disabled).</dd>
<dt>--enable-prof</dt>
<dd>enable 'prof' profiling support (default disabled).</dd>
<dt>--enable-gprof</dt>
<dd>enable 'gprof' profiling support (default disabled).</dd>
<dt>--enable-gcov</dt>
<dd>enable 'gcov' profiling support (default disabled).</dd>
<dt>--disable-openmp</dt>
<dd>disable OpenMP (default enabled).</dd><br />
<dd>Certain ImageMagick algorithms, for example convolution, can achieve a significant speed-up with the assistance of the OpenMP API when running on modern dual and quad-core processors.</dd>
<dt>--disable-largefile</dt>
<dd>disable support for large (64 bit) file offsets.</dd><br />
<dd>By default, ImageMagick is compiled with support for large files (> 2GB on a 32-bit CPU) if the operating system supports large files. Some applications which use the ImageMagick library may also require support for large files. By disabling support for large files via <kbd>--disable-largefile</kbd>, dependent applications do not require special compilation options for large files in order to use the library.</dd>
</ul>
<p>Here are the optional packages you can configure:</p>
<ul>
<dt>--with-quantum-depth</dt>
<dd>number of bits in a pixel quantum (default 16).</dd><br />
<dd>Use this option to specify the number of bits to use per pixel quantum (the size of the red, green, blue, and alpha pixel components). For example, <kbd>--with-quantum-depth=8</kbd> builds ImageMagick using 8-bit quantums. Most computer display adapters use 8-bit quantums. Currently supported arguments are 8, 16, or 32. We recommend the default of 16 because some image formats support 16 bits-per-pixel. However, this option is important in determining the overall run-time performance of ImageMagick.</dd><br />
<dd>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.</dd><br />
<dd><pre class="text">
Quantum Depth Valid Range (Decimal) Valid Range (Hex)
8 0-255 00-FF
16 0-65535 0000-FFFF
32 0-4294967295 00000000-FFFFFFFF
</pre></dd><br />
<dd>Larger pixel quantums can cause ImageMagick to run more slowly and to require more memory. For example, using sixteen-bit pixel quantums can cause ImageMagick to run 15% to 50% slower (and take twice as much memory) than when it is built to support eight-bit pixel quantums.</dd><br />
<dd>The amount of virtual memory consumed by an image can be computed by the equation <em>(5 * Quantum Depth * Rows * Columns) / 8</em>. 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:</dd>
<dd><pre class="text">
Quantum Depth Virtual Memory
8 3MB
16 8MB
32 15MB
</pre></dd>
<dt>--enable-hdri</dt>
<dd>accurately represent the wide range of intensity levels (experimental).</dd>
<dt>--enable-osx-univeral-binary</dt>
<dd>build a universal binary on OS X.</dd>
<dt>--without-modules</dt><br />
<dd>disable support for dynamically loadable modules.</dd><br />
<dd>Image coders and process modules are built as loadable modules which are installed under the directory <em>[prefix]/lib/ImageMagick-X.X.X/modules-QN</em> (where 'N' equals 8, 16, or 32 depending on the quantum depth) in the subdirectories <kbd>coders</kbd> and <kbd>filters</kbd> respectively. The modules build option is only available in conjunction with <kbd>--enable-shared</kbd>. If <kbd>--enable-shared</kbd> is not also specified, support for building modules is disabled. Note that if <kbd>--enable-shared</kbd> and <kbd>--disable-modules</kbd> are specified, the module loader is active (allowing extending an installed ImageMagick by simply copying a module into place) but ImageMagick itself is not built using modules.</dd>
<dt>--with-cache</dt>
<dd>set pixel cache threshold (defaults to available memory).</dd><br />
<dd>Specify a different image pixel cache threshold with this option. This sets the maximum amount of heap memory that ImageMagick is allowed to consume before switching to using memory-mapped temporary files to store raw pixel data.</dd>
<dt>--without-threads</dt>
<dd>disable threads support.</dd><br />
<dd>By default, the ImageMagick library is compiled with multi-thread support. If this is undesirable, specify <kbd>--without-threads</kbd>.</dd>
<dt>--with-frozenpaths</dt>
<dd>enable frozen delegate paths.</dd><br />
<dd>Normally, external program names are substituted into the <kdb>delegates.xml</kdb> configuration 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 ImageMagick.</dd>
<dt>--without-magick-plus-plus</dt>
<dd>disable build/install of Magick++.</dd><br />
<dd>Disable building Magick++, the C++ application programming interface to ImageMagick. A suitable C++ compiler is required in order to build Magick++. Specify the CXX configure variable to select the C++ compiler to use (default <kbd>g++</kbd>), and CXXFLAGS to select the desired compiler optimization and debug flags (default <kbd>-g -O2</kbd>). Antique C++ compilers will normally be rejected by configure tests so specifying this option should only be necessary if Magick++ fails to compile.</dd>
<dt>--without-perl</dt>
<dd>disable build/install of PerlMagick, or</dd><br />
<dd>By default, PerlMagick is conveniently compiled and installed as part of ImageMagick's normal <kbd>configure</kbd>, <kbd>make</kbd>, <kbd>make install</kbd> process. When <kbd>--without-perl</kbd> is specified, you must first install ImageMagick, change to the PerlMagick subdirectory, build, and finally install PerlMagick. Note, PerlMagick is configured even if <kbd>--without-perl</kbd> is specified. If the argument <em>--with-perl=/path/to/perl</em> is supplied, <em>/../path/to/perl</em> is be taken as the PERL interpreter to use. This is important in case the <kbd>perl</kbd> executable in your PATH is not PERL5, or is not the PERL you want to use.</dd>
<dt>--with-perl=PERL</dt>
<dd>use specified Perl binary to configure PerlMagick.</dd>
<dt>--with-perl-options=OPTIONS</dt>
<dd>options to pass on command-line when generating PerlMagick's Makefile from Makefile.PL.</dd><br />
<dd>The PerlMagick module is normally installed using the Perl interpreter's installation PREFIX, rather than ImageMagick's. If ImageMagick'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 "--with-perl-options=PREFIX=/some/place". 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.</dd>
<dt>--without-bzlib</dt>
<dd>disable BZLIB support.</dd>
<dt>--without-dps</dt>
<dd>disable Display Postscript support.</dd>
<dt>--with-fpx</dt>
<dd>enable FlashPIX support.</dd>
<dt>--without-freetype</dt>
<dd>disable TrueType support.</dd>
<dt>--with-gslib</dt>
<dd>enable Ghostscript library support.</dd>
<dt>--without-jbig</dt>
<dd>disable JBIG support.</dd>
<dt>--without-jpeg</dt>
<dd>disable JPEG support.</dd>
<dt>--without-jp2</dt>
<dd>disable JPEG v2 support.</dd>
<dt>--without-lcms</dt>
<dd>disable LCMS support.</dd>
<dt>--without-png</dt>
<dd>disable PNG support.</dd>
<dt>--without-tiff</dt>
<dd>disable TIFF support.</dd>
<dt>--without-wmf</dt>
<dd>disable WMF support.</dd>
<dt>--with-fontpath</dt>
<dd>prepend to default font search path.</dd>
<dt>--with-gs-font-dir</dt>
<dd>directory containing Ghostscript fonts.</dd><br />
<dd>Specify the directory containing the Ghostscript Postscript Type 1 font files (e.g. <kbd>n022003l.pfb</kbd>) so that they can be rendered using the FreeType library. If the font files are installed using the default Ghostscript installation paths (<em>${prefix}/share/ghostwww/fonts</em>), 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.</dd>
<dt>--with-windows-font-dir</dt>
<dd>directory containing MS-Windows fonts.</dd>
<dd>Specify the directory containing MS-Windows-compatible fonts. This is not necessary when ImageMagick is running under MS-Windows.</dd>
<dt>--without-xml</dt>
<dd>disable XML support.</dd>
<dt>--without-zlib</dt>
<dd>disable ZLIB support.</dd>
<dt>--without-x</dt>
<dd>don't use the X Window System.</dd>
<dd>By default, ImageMagick uses the X11 delegate 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).</dd>
<dt>--with-share-path=DIR</dt>
<dd>Alternate path to share directory (default share/ImageMagick).</dd>
<dt>--with-libstdc=DIR</dt>
<dd>use libstdc++ in DIR (for GNU C++).</dd>
</ul>
<p>While <kbd>configure</kbd> is designed to ease installation of ImageMagick, it often discovers problems that would otherwise be encountered later when compiling ImageMagick. 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 <kbd>config.log</kbd>. If configure fails to discover a header or library please review this log file to determine why, however, please be aware that *errors in the <kbd>config.log</kbd> are normal* because configure works by trying something and seeing if it fails. An error in <kbd>config.log</kbd> is only a problem if the test should have passed on your system.</p>
<p>Common causes of configure failures are: 1) a delegate header is not in the header include path (CPPFLAGS -I option); 2) a delegate library is not in the linker search/run path (LDFLAGS -L/-R option); 3) a delegate library is missing a function (old version?); or 4) compilation environment is faulty.</p>
<p>If all reasonable corrective actions have been tried and the problem appears be due to a flaw in the configure script, please send a bug report to the <a href="http://www.imagemagick.org/magick/viewforum.html?f=3" target="602725793">ImageMagick Defect Support Forum</a>. All bug reports should contain the operating system type (as reported by <kbd>uname -a</kbd>) and the compiler/compiler-version. A copy of the configure script output and/or the relevant portion of <kbd>config.log</kbd> file may be valuable in order to find the problem. If you post portions of <kbd>config.log</kbd>, 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>
<p>ImageMagick is now configured and ready to build</p>
<div style="margin: auto;">
<h2><a name="build"></a>Build</h2>
</div>
<p>Once ImageMagick is configured, these standard build targets are available from the generated <kbd>make</kbd> files:</p>
<ul>
<dt>make</dt>
<dd>build ImageMagick.</dd>
<dt>make install</dt>
<dd>install ImageMagick.</dd>
<dt>make check</dt>
<dd>Run tests using the installed ImageMagick (<kbd>make install</kbd> must be done first).</dd>
<dt>make clean</dt>
<dd> Remove everything in the build directory created by <kbd>make</kbd>.</dd>
<dt>make distclean</dt>
<dd>remove everything in the build directory created by <kbd>configure</kbd> and <kbd>make</kbd>. 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 <kbd>make install</kbd> using the current configuration. Note that this target is imperfect for PerlMagick since Perl no longer supports an <em>uninstall</em> target.</dd>
</ul>
<p>In most cases you will simply wand to compile ImageMagick with this command:</p>
<pre class="text">
make
</pre>
<p>Once built, you can optionally install ImageMagick on your system as discussed below.</p>
<div style="margin: auto;">
<h2><a name="install"></a>Install</h2>
</div>
<p>Now that ImageMagick is configured and built, type:</p>
<pre class="text">
make install
</pre>
<p>to install it.</p>
<p>By default, ImageMagick is installs binaries in <kbd>/../usr/local/bin</kbd>, libraries in <kbd>/../usr/local/lib</kbd>, header files in <kbd>/../usr/local/include</kbd> and documentation in <kbd>/../usr/local/share</kbd>. You can specify an alternative installation prefix other than <kbd>/../usr/local</kbd> by giving <kbd>configure</kbd> the option <em>--prefix=PATH</em>. 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>To confirm your installation of the ImageMagick distribution was successful, ensure that the installation directory is in your executable search path and type:</p>
<pre class="text">
display
</pre>
<p>The ImageMagick logo is displayed on your X11 display.</p>
<p>For a more comprehensive test, you run the ImageMagick test suite by typing:</p>
<pre class="text">
make check
</pre>
<p>Note that due to differences between the developer's environment and your own it is possible that a few tests may fail 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 ImageMagick developers use the current release of all dependent libraries.</p>
<div style="margin: auto;">
<h2><a name="macosx"></a>Mac OS X-specific Build instructions</h2>
</div>
<p>Perform these steps as an administrator or with the <tt>sudo</tt> command:</p>
<ul>
<li>Install <a href="http://finkproject.org" target="1284053380">Fink</a>. The default setup creates a <tt>/sw</tt> folder on your main hard drive. Make sure <tt>/sw/bin</tt> is in your path.</li>
<li>Install the latest <a href="http://developer.apple.com/tools/download/" target="1538868947">Xcode</a> from Apple.</li>
<li>Create a symbolic link in <tt>/Developer/SDKs/MacOSX10.5.sdk/</tt> to <tt>/sw</tt>:</li>
<pre class="text">
cd /Developer/SDKs/MacOSX10.5.sdk
ln -s sw /sw
</pre>
<li>Use Fink, or FinkCommander to install any delegate libraries you require, for example:</li>
<pre class="text">
fink install libjpeg
</pre>
</ul>
<p>As a regular user or administrator:</p>
<ul>
<li><a href="../www/download.html">Download</a> the ImageMagick source distribution.</li>
<li>Unpack and change into the top-level ImageMagick directory:</li>
<pre class="text">
tar xvfz ImageMagick-6.3.7-0.tar.gz
cd ImageMagick-6.3.7
</pre>
<li>Choose an architecture and set your CFLAGS environment variable. Here we set CFLAGS for an Intel build:</li>
<pre class="text">
export CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.5.sdk/ -arch i386 -I/sw/include/"
</pre>
<li>Set your LDFLAGS environment variable to:</li>
<pre class="text">
export LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk/,-L/sw/lib/"
</pre>
<li>Configure ImageMagick:</li>
<pre class="text">
./configure --prefix=/sw --with-quantum-depth=16 \
--disable-dependency-tracking --with-x=yes \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib/ \
--without-perl
</pre>
<li>Build ImageMagick:</li>
<pre class="text">
make
</pre>
<li>Install ImageMagick:</li>
<pre class="text">
sudo make install
</pre>
<li>To test the ImageMagick GUI, start X11 and in a new shell and type:</li>
<pre class="text">
display -display :0
</pre>
</ul>
<p>An alterative method is to download and build ImageMagick with <a href="http://www.macports.org" target="1233681601">MacPorts</a>. Download and install MacPorts and type the following command:
<pre class="text">
sudo port -v install freetype +bytecode
sudo port -v install librsvg
sudo port -v install ImageMagick +graphviz +gs +wmf +jbig +jpeg2 +lcms
</pre>
<p>This not only installs ImageMagick but includes many of the delegate libraries such as JPEG and FreeType.</p>
<p>To verify your install, type</p>
<pre class="text">
/opt/local/bin/identify -list type
</pre>
<p>to list all the fonts ImageMagick knows about.</p>
<div style="margin: auto;">
<h2><a name="mingw"></a>MinGW-specific Build instructions</h2>
</div>
<p>Although you can download and install delegate libraries yourself, many are already available in the <a href="http://gnuwin32.sourceforge.net/" target="1219065487">GnuWin32</a> distribution. Download and install whichever delegate libraries you require such as JPEG, PNG, TIFF, etc. Make sure you specify the development headers when you install a package. Next type,</p>
<pre class="text">
tar jxvf ImageMagick-6.3.7-?.tar.bz2
cd ImageMagick-6.3.7
export CPPFLAGS="-Ic:/Progra~1/GnuWin32/include"
export LDFLAGS="-Lc:/Progra~1/GnuWin32/lib"
./configure --without-perl
make
make install
</pre>
<div style="margin: auto;">
<h2><a name="problems"></a>Dealing with Unexpected Problems</h2>
</div>
<p>Chances are the download, configure, build, and install of ImageMagick went flawlessly as it is intended, however, certain systems and environments may cause one or more steps to fail. We discuss a few problems we've run across and how to take corrective action to ensure you have a working release of ImageMagick</p>
<p>If PerlMagick fails to link with a message similar to <em>libperl.a is not found</em>, rerun <kbd>configure</kbd> with the <kbd>--enable-shared</kbd> or <kbd>--enable-shared --with-modules</kbd> options.</p>
<p>On some systems, ImageMagick may not find its shared library, <em>libMagick.so</em>. Try running the <kbd>ldconfig</kbd> with the library path:</p>
<pre class="text">
/sbin/ldconfig /usr/local/lib
</pre>
<p>If the build complains about missing dependencies (e.g. <em>.deps/source.PLO</em>), add <kbd>--disable-dependency-tracking</kbd> to your <kbd>configure</kbd> command line.</p>
<p>If you receive complaints about delegate libraries (e.g. JPEG) at build or run time, you may resolve these by simply updating to the latest release of the delegate library. For Linux system, it may be as simple as installing the latest delegate library RPM.</p>
<p>Some systems may fail to link at build time due to unresolved symbols. Try adding the LDFLAGS to the <kbd>configure</kbd> command line:</p>
<pre class="text">
configure LDFLAGS='-L/usr/local/lib -R/usr/local/lib'
</pre>
<p>Solaris and Linux systems have the <kbd>ldd</kbd> command which is useful to track which libraries ImageMagick depends on:</p>
<pre class="text">
ldd `which convert`
</pre>
</td>
<td id="margin" width="1%" height="100%" valign="top" align="right"> </td>
</tr>
</tbody>
</table>
<div id="linkbar">
<a href="http://www.imagemagick.org/discourse-server/" target="1105362177">Discourse Server</a> •
<a href="../www/mailing-list.html">Mailing Lists</a> •
<a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi" target="1163686427">ImageMagick Studio</a>
</div>
<div id="footer">
<span id="footer-west">© 1999-2008 ImageMagick Studio LLC</span>
</div>
<div style="clear: both; margin: 0; width: 100%; "></div>
</body>
</html>
|