Do you actually have a functioning C compiler installed on that machine - one that you have verified as being capable of compiling C programs ?
I gather that
perl -V reports '/opt/SUNWspro/bin/cc' (or, at least, would have reported that before you amended Config.pm).
It's best to use the compiler that built perl (and 'perl -V' identifies that compiler), but if you have another functioning C compiler you could give it a try.
Just cd to any IO-Pty build directory you find in
/usr/local/home/myuser/.cpan/build and run:
make realclean
perl Makefile.PL CC=/usr/bin/cc (or wherever)
make test
make install
A better solution would be to follow
salva's advice if possible.
Cheere,
Rob