We'll assume that your PHP installation is in
	/usr/src/php

1) make sure the path to Magick-config (the ImageMagick configuration
   script) is in your PATH environment variable
2) cd /usr/src/php/ext
3) untar the imagick tar
4) if the directory created is anything other then imagick, rename it to
   imagick
5) cd /usr/src/php/ext/imagick
6) phpize

If phpize produces this:

aclocal: macro `AC_ADD_LIBPATH' defined in acinclude.m4 but never used
aclocal: macro `AC_ADD_LIBRARY_WITH_PATH' defined in acinclude.m4 but never used
aclocal: macro `AC_ADD_LIBRARY' defined in acinclude.m4 but never used
aclocal: macro `AC_ADD_INCLUDE' defined in acinclude.m4 but never used
You should update your `aclocal.m4' by running aclocal.

Don't worry.  Everything should still compile fine.

7) cd /usr/src/php
8) rm ./configure
9) ./buildconf
10) run configure as you normally would and add --with-imagick
    If Imagemagick is installed in a non standard dir, add this dir to --with-imagick=dir
    If you want GraphicsMagick instead of ImageMagick as backend, add --with-imagick-gm
11) make
12) make install

You're all set.
