How to install imagick via homebrew?
As mentioned on this answer : https://stackoverflow.com/a/17848864/2307070

you can try these steps:

wget http://pecl.php.net/get/imagick-3.1.0RC2.tgz
tar zxf imagick-3.1.0RC2.tgz


Edit the file imagick-3.1.0RC2/config.m4 line number 55.

Make changes like this, from

if test -r $WAND_DIR/include/ImageMagick/wand/MagickWand.h;


to

if test -r $WAND_DIR/include/ImageMagick-6/wand/MagickWand.h;


Note this difference made in the imagick version number. After that try the conventional installation procedures

cd imagick-3.1.0RC2
phpize
./configure
make
make install