Trying to get ImageMagick and it’s PHP extension working on OS X Lion is a frustrating process. It will often fail and even if you try to configure it manually you may get an error like the following.
checking ImageMagick MagickWand API configuration program... configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.
First of all, install ImageMagick via MacPorts.
sudo port install ImageMagick
Now install the imagick PECL module.
sudo pecl install imagick
Very importantly however, make sure you specify the path when prompted, to be /opt/local, do not let it auto detect! Once this is done it should compile successfully and you will be prompted to add imagick.so to your php.ini file.