On 11/5/07, Bill Sommerfeld <[EMAIL PROTECTED]> wrote:
> On Sun, 2007-11-04 at 10:24 -0600, Shawn Walker wrote:
> > Admittedly, I am somewhat fuzzy on what software is supposed to do if
> > it needs a specific version of a utility.
>
> It should set PATH to reflect the environment it expects.

> > For example, if a configure script decides that it wants to and needs
> > to use only gnu versions of utilities on an "OpenSolaris" environment;
> > should it assume that it should explicitly reference all utilities via
> > the /usr/gnu/ path?
>
> No.  It should set PATH to reflect the environment it expects.

However, if the configure script is intended to run across Solaris 8,
HP-UX 9, RHEL 4, and OpenSolaris, and some other platform that does
not yet exist, it should check for the features it needs in each of
the same named commands in $PATH and/or well-known locations.  Once it
finds a suitable version, it should use the full path to the command.
This is the same approach that is used for headers, and libraries.

For example, a software product written two years that only knows how
to install with GNU install would not know to look in /usr/gnu and if
Solaris was an afterthought (or not considered) /usr/sfw and /opt/sfw
would not be in the PATH set in the script.

If you have a script that is supposed to run on a small number of
well-defined platforms (and configurations thereof) and it will be not
see "production runs" on any other platform prior to testing, setting
$PATH is sufficient (and arguably desirable for readability).

In other words, configure scripts are a special type of script with a
special purpose.  When written properly, they are a lot better than
the schemes that preceded autoconf.  Treating every script like a
configure script would be an ugly mess.

-- 
Mike Gerdts
http://mgerdts.blogspot.com/
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to