O.K., I'm going to give this a shot.
In my opinion (not expert) there is a lot to compiling on a Sun box. I always opt for a Sun compiler. It 'knows' where libraries & include files reside. I have had MAJOR headaches wih Solaris 8, 9, & 10 using GCC. [Besides, the Sun compiler is NOW free.]
The Apache from sunfreeware is what I used when I was running Solaris 8. Do an 'ldd' on the httpd program. I just loaded the Apache version you mention and got:
baradur[root]#/usr/local/apache2/bin
ldd httpd
libm.so.2 => /lib/libm.so.2
libaprutil-1.so.0 => (file not found)
libgdbm.so.3 => (file not found)
libdb-4.2.so => /opt/sfw/lib/libdb-4.2.so
libexpat.so.0 => /usr/sfw/lib/libexpat.so.0
libiconv.so.2 => /usr/local/lib/libiconv.so.2
libapr-1.so.0 => (file not found)
libuuid.so.1 => /lib/libuuid.so.1
libsendfile.so.1 => /lib/libsendfile.so.1
librt.so.1 => /lib/librt.so.1
libsocket.so.1 => /lib/libsocket.so.1
libnsl.so.1 => /lib/libnsl.so.1
libpthread.so.1 => /lib/libpthread.so.1
libc.so.1 => /lib/libc.so.1
libgcc_s.so.1 => /opt/sfw/lib/libgcc_s.so.1
libaio.so.1 => /lib/libaio.so.1
libmd5.so.1 => /lib/libmd5.so.1
libmp.so.2 => /lib/libmp.so.2
libscf.so.1 => /lib/libscf.so.1
libdoor.so.1 => /lib/libdoor.so.1
libuutil.so.1 => /lib/libuutil.so.1
/platform/SUNW,Ultra-60/lib/libc_psr.so.1
/platform/SUNW,Ultra-60/lib/libmd5_psr.so.1
As you can see I've got some libraries that Apache depends on that do NOT exist on my machine. Do this on your box, and see what shows up as "file not found".
THAT is where to start. It will probably take more. :>D
Let us know !!