Help with installing gcc on Solaris 10

I want to install gcc for Solaris 10 to an alternate location besides /usr/local/bin, so I can't use the pre-compiled package from sunfreeware.com.

So I assume I need to compile gcc for myself and specify --prefix.

How can I accomplish this? Am I pretty much out of luck trying to compile gcc-3.4.6 using any old existing compilers on my system?

It SOUNDS as if I need to install the gcc package to /usr/local/bin, THEN I should not have difficulty compiling gcc for myself and specifying an alternate install path.

Thank you for your thoughts and time.

A lot of packages can be installed then moved and as long as the PATH and LD_LIBRARY_PATH are set appropriately relocating the binaries is not a problem.
LD_LIBRARY_PATH needs to include the packages relocated lib directory in addition to the usual /usr/lib:/usr/openwin/lib:/usr/dt/lib:/opt/sfw/lib:/usr/local/lib, etc..
So recompiling may not be necessary.
V 3.4.3 of GCC is included in a Solaris 10 install if you pick the correct install type during install (Full Install without OEM includes it for instance and presumably developer will also).

Gcc is already installed if you choose developer or full install cluster at installation time. If that is the case, you simply need to add /usr/sfw/bin to your PATH.

Thanks for the comments. Once I realized that Solaris 10 comes with gcc already in /usr/sfw/bin, our server team already installed it on the server I was working on. So, beautiful.

On top of that, I used the gcc compiler itself to re-compine the gcc source, so I can choose to install it to an alternate location now, because my dilema was I did not want to install to /usr/local/bin.

I don't know the options to compiling gcc, all I used was configure --prefix, and make, and make install. My build APPEARS to have been succesful. We'll see.