GraphicsMagick is distributed in a number of different archive formats. The source code must be extracted prior to compilation as follows:
7-Zip archive format. The Z-Zip format may be extracted under Unix using '7za' from the P7ZIP package (http://p7zip.sourceforge.net/). Extract similar to:
7za x GraphicsMagick-1.3.7z
BZip2 compressed tar archive format. Requires that both the bzip2 (http://www.bzip.org/) and tar programs to be available. Extract similar to:
bzip2 -d GraphicsMagick-1.3.tar.bz | tar -xvf -
Gzip compressed tar archive format. Requires that both the gzip (http://www.gzip.org/) and tar programs to be available. Extract similar to:
gzip -d GraphicsMagick-1.3.tar.gz | tar -xvf -
.tar.lz
Lzip compressed tar archive format. Requires that both the lzip (http://lzip.nongnu.org/lzip.html) and tar programs to be available. Extract similar to:
lzip -d -c GraphicsMagick-1.3.tar.gz | tar -xvf -
LZMA compressed tar archive format. Requires that LZMA utils (http://tukaani.org/lzma/) and tar programs to be available. Extract similar to:
xz -d GraphicsMagick-1.3.tar.xz | tar -xvf -
PK-ZIP archive format. Requires that the unzip program from Info-Zip (http://www.info-zip.org/UnZip.html) be available. Extract similar to:
unzip GraphicsMagick-1.3.zip
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:
cd GraphicsMagick-1.3
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. Using a separate directory also makes it easier to keep track of any files you may have edited.
If you are willing to accept configure's default options (static build, 8 bits/sample), and build from within the source directory, type:
./configure
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.
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.
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.:
./configure CC=c99 CFLAGS=-O2 LIBS=-lposix
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:
# 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'
When the 'config.site' file is being used to supply configuration options, configure will issue a message similar to:
configure: loading site script /usr/local/share/config.site
The configure variables you should be aware of are:
Any variable (e.g. CPPFLAGS or LDFLAGS) which requires a directory path must specify an absolute path rather than a relative path.
The build now supports a Linux-style "silent" 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'.
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.
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).
| --enable-ccmalloc | |
| enable 'ccmalloc' memory debug support (default disabled) | |
| --enable-prof | enable 'prof' profiling support (default disabled) |
| --enable-gprof | enable 'gprof' profiling support (default disabled) |
| --enable-gcov | enable 'gcov' profiling support (default disabled) |
| --disable-installed | |
| disable building an installed GraphicsMagick (default enabled) | |
| --disable-largefile | |
| disable support for large (64 bit) file offsets | |
| --disable-openmp | |
| disable use of OpenMP (automatic multi-threaded loops) at all | |
| --enable-openmp-slow | |
| enable OpenMP for algorithms which sometimes run slower | |
| --enable-symbol-prefix | |
| enable prefixing library symbols with "Gm" | |
| --enable-magick-compat | |
| install ImageMagick utility shortcuts (default disabled) | |
| --with-quantum-depth | |
| number of bits in a pixel quantum (default 8) | |
| --enable-ltdl-install | |
| install libltdl | |
| --with-included-ltdl | |
| use the GNU ltdl sources included here | |
| --with-ltdl-include=DIR | |
| use the ltdl headers installed in DIR | |
| --with-ltdl-lib=DIR | |
| use the libltdl.la installed in DIR | |
| --with-modules | enable building dynamically loadable modules |
| --with-cache | set pixel cache threshhold (defaults to available memory) |
| --without-threads | |
| disable threads support. | |
| --with-frozenpaths | |
| enable frozen delegate paths | |
| --without-magick-plus-plus | |
| disable build/install of Magick++of
merchantability, fitness for a particular purpose and noninfringement.
In no event shall GraphicsMagick Group be liable for any claim, damages
or other liability, whether in an action of contract, tort or otherwise,
arising from, out of or in connection with GraphicsMagick or the use or
other dealings in GraphicsMagick.
Except as contained in this notice, the name of the GraphicsMagick Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in GraphicsMagick without prior written authorization from the GraphicsMagick Group. Additional copyrights and licenses apply to this software. You should have received a copy of Copyright.txt with this package, which describes additional copyrights and licenses which apply to this software; otherwise see http://www.graphicsmagick.org/Copyright.html. | |
Copyright © GraphicsMagick Group 2002 - 2011