Trouble with installing RMagick, please help

Hi I'm trying to install RMagick 1.14.1. I have ImageMagick already
installed on my machine which is running Solaris 10 on it.
when ever I try to run the ./configure
it creshes out complainging about:
configure: error: Can't install RMagick. Can't find libMagick or one of
the dependent libraries.
                  Check the config.log file for more detailed

checking the config.log I get this message;
configure:2501: gcc -o conftest -I/usr/local/include -L/usr/local/lib
-L/usr/local/lib -R/usr/local/lib -R/usr/lib -L/usr/lib
-R/usr/openwin/lib -L/usr/openwin/lib -L/usr/local/ssl/lib
-R/usr/local/ssl/lib -L/usr/local/BerkeleyDB.4.2/lib
-R/usr/local/BerkeleyDB.4.2/lib -L/usr/openwin/lib -R/usr/openwin/lib
-L/usr/local/lib -R/usr/local/lib -lfreetype -lz -L/usr/local/lib
conftest.c -lMagick -lMagick -ltiff -lfreetype -ljpeg -L/usr/local/lib
-lfontconfig -lXext -lSM -lICE -lX11 -lsocket -lnsl -lXt -lbz2 -lz
-lpthread -lm -lpthread -lWand -lMagick >&5
Undefined first referenced
symbol in file
libiconv_open /usr/local/lib/
libiconv /usr/local/lib/
ld: fatal: Symbol referencing errors. No output written to conftest

on fact even when I try to just compile something with the -lMagick
library it spits out the complaint about libiconv_open and fontconfig.
Has anyone any ideas? if so please help.