Using 'apr --cc' and compiler specific flags implies that if the apr binary was built with the Sun Forte compiler, then my application must also be built with the Sun Forte compiler, but I may not be the proud owner of the Sun Forte compiler.
Then, you might consider distributing two versions of the package: one with gcc and one with Forte (i.e. 'cc' or 'gcc'). I believe Solaris 10, by the time it hits FCS, will have gcc bundled by default. So, in some ways, this problem will resolve itself for future releases.
I don't know what other maintainers (such as AIX or HP-UX) do with their binary builds?
What are the issues specifically with C++ libraries that causes a problem?
Namespace mangling has never really been standardized. Although I believe current releases of Forte can decode the g++ mangling, but I'm fairly sure it doesn't work the opposite way. -- justin
