Another option would be to use check for default compiler path if found use
it. If don't find then use the compiler in PATH. For example on Solaris 10, it
should be :

DEFAULT_STUDIO_LOCATION=/opt/SUNWspro

Is $DEFAULT_STUDIO_LOCATION/bin/cc present : 
Yes : use it.
No : Check for cc in PATH, found it then use it else give error.

DEFAULT_STUDIO_LOCATION could be customized separately for Solaris/OpenSolaris.

There is a small drawback of this approach, if user want to specifically use a
cc in his PATH and one version of compiler is already installed in default
location then PATH will not get precedence. 

Script will always look for default localtion first. But it is still better
user experience than forcing all users to add studio compiler in PATH.
-- 
This message posted from opensolaris.org

Reply via email to