Stairways Software Icon

Stairways Software

Excellence In Software For Over Twenty Years – Only with a Mac

Installing ImageMagick

I‘ve beat my head against installing ImageMagick far too many times. Its a powerful tool very useful for scripted image manipulation, but it has always been a royal pain to install.

The following describes how to install it under Mac OS X 10.6 (Snow Leopard) in 64 bit architecture (if applicable). All of the files are downloaded into ~/unix/install and all the components are installed in ~/unix/local, except for the perl modules, and (annoyingly) some ImageMagick man pages which refuse to honour the prefix, though no doubt there is some other magick (ha!) incantation that would force the man pages to the right location.

Although the code below is written like a script, you can‘t (well, certainly shouldn‘t) just run it as a script. For one thing, by the time I‘ve finished writing this article, one or other of the components will likely have been updated. For another, you really should check that each part compiles and installs before proceeding. Its a slow and painful process, but a lot faster with a plan to follow.

Good luck!

mkdir ~/unix
mkdir ~/unix/install
cd ~/unix/install
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv LDFLAGS -L$HOME/unix/local/lib

curl -O ftp://ftp.remotesensing.org/pub/libtiff/tiff-3.9.1.tar.gz
tar zxf tiff-3.9.1.tar.gz
cd tiff-3.9.1
./configure --enable-shared --prefix=$HOME/unix/local
make
make check
make install
cd ..

curl -O ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.40.tar.gz
tar zxf libpng-1.2.40.tar.gz
cd libpng-1.2.40
./configure --enable-shared --prefix=$HOME/unix/local
make
make install
make check
cd ..


curl -O http://www.ijg.org/files/jpegsrc.v7.tar.gz
tar zxf jpegsrc.v7.tar.gz
cd jpeg-7/
./configure --enable-shared --prefix=$HOME/unix/local
make
make check
make install
cd ..

curl -O http://mirror.dknss.com/nongnu/freetype/freetype-2.3.9.tar.gz
tar zxf freetype-2.3.9.tar.gz
cd freetype-2.3.9
./configure --enable-shared --prefix=$HOME/unix/local
make
make install
cd ..

curl -O http://internode.dl.sourceforge.net/project/ghostscript/GPL%20Ghostscript/8.70/ghostscript-8.70.tar.gz
tar zxf ghostscript-8.70.tar.gz
cd ghostscript-8.70
./configure --disable-cups --prefix=$HOME/unix/local
make
make install
cd ..

curl -O http://www.vg.kernel.org/pub/mirrors/gentoo/source/distfiles/pkg-config-0.23.tar.gz
tar zxf pkg-config-0.23.tar.gz
cd pkg-config-0.23
./configure --enable-shared --prefix=$HOME/unix/local CPPFLAGS=-I$HOME/unix/local/include LDFLAGS=-L$HOME/unix/local/lib
make
sudo make install
cd ..

curl -O ftp://ftp.gnu.org/pub/gnu/gettext/gettext-0.17.tar.gz
tar zxf gettext-0.17.tar.gz
cd gettext-0.17
./configure --enable-shared --prefix=$HOME/unix/local CPPFLAGS=-I$HOME/unix/local/include LDFLAGS=-L$HOME/unix/local/lib
make
make install
cd ..

curl -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.9.2.tar.gz
tar zxf libiconv-1.9.2.tar.gz
cd libiconv-1.9.2
./configure --enable-shared --prefix=$HOME/unix/local CPPFLAGS=-I$HOME/unix/local/include LDFLAGS=-L$HOME/unix/local/lib
make
make install
cd ..

curl -O http://laotzu.acc.umu.se/pub/gnome/sources/glib/2.20/glib-2.20.5.tar.gz
tar zxf glib-2.20.5.tar.gz
cd glib-2.20.5
./configure --enable-shared --prefix=$HOME/unix/local CPPFLAGS=-I$HOME/unix/local/include LDFLAGS=-L$HOME/unix/local/lib --with-libiconv
make
make install
cd ..

curl -O  http://www.imagemagick.org/download/delegates/liblqr-1-0.1.0-1.tar.gz
tar zxf liblqr-1-0.1.0-1.tar.gz
cd liblqr-1-0.1.0
./configure --enable-shared --prefix=$HOME/unix/local GLIB_CFLAGS=-I$HOME/unix/local/include GLIB_LIBS=-L$HOME/unix/local/lib
make
make install
cd ..

[sudo is needed to install some man pages and the perl modules]

curl -O  ftp://mirror.aarnet.edu.au/pub/ImageMagick/ImageMagick-6.5.7-6.tar.gz
tar zxf ImageMagick-6.5.7-6.tar.gz
cd ImageMagick-6.5.7-6
./configure --enable-shared --prefix=$HOME/unix/local CPPFLAGS=-I$HOME/unix/local/include LDFLAGS=-L$HOME/unix/local/lib --with-perl
make
sudo make install
cd ..

Posted Tuesday, November 10, 2009. Permalink. Post a Comment.

Comments

Post Comment

Name: (optional)
URL: (optional)
Email: (optional, not published)
   
CAPTCHA: five five seven three (required)
  To prove you are human, please enter the number as digits (ie, 1-9).
Comment:
  You can use some HTML tags such as <b>, <i>, and <a href="">.
We reserve the right to remove any offensive or inappropriate comments.
Due to spam issues, comments are initially invisible until we review them,
you can see them (background red) and we can see them, but no one else.

Comment Preview

None yet.

Buy Now

User Database

Stairways