autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-users] MSYS_PREFIX_HACK


From: Keith MARSHALL
Subject: Re: [Mingw-users] MSYS_PREFIX_HACK
Date: Thu, 31 Mar 2005 10:34:45 +0100

Bob Friesenhahn wrote:
>>  ac_default_prefix=`exec 2>/dev/null;cd /usr/local;pwd -W` ||\
>>    ac_default_prefix=/usr/local
>>
>> I have tested this alternative initialisation on every system
>> available to me.  On SunOS 5.5.1 with `sh', `ksh' and `bash', on
>
> I am sure that this works great if the real Windows path represented 
> by prefix contains embedded spacess. ;-)

Actually, there is no reason why it shouldn't; it is properly quoted,
(by the backquotes), to ensure that `ac_default_prefix' will be correctly
assigned, even if there *are* spaces embedded in the path.  If that breaks
something else, later in the configure script, then that later statement
is improperly quoted, and should be fixed.

However, there is one small, but very significant flaw which you didn't
notice, or at least you didn't point it out, perhaps because you were
more interested in delivering your sarcastic put down, than offering
any constructive criticism;  ah well, it *is* said that sarcasm is the
final resort of the incompetent ...

So, the flaw: the above *should* be written as ...

  ac_default_prefix=`exec 2>/dev/null;cd /usr/local && pwd -W` ||\
    ac_default_prefix=/usr/local

My earlier formulation of this *will* break, on any system on which
`pwd -W` does not fail, if /usr/local either does not exist, or is
not accessible by the user running the configure script.  SunOS 5.5.1
with its standard `sh' is one such system, Cygwin with `sh' is another,
and, oh dear, MSYS, the very system it is intended to help out, is yet
another. (There are undoubtedly others besides these three, which I am
unable to ascertain definitively, since I have no access to suitable
test platforms).

> Many/most packages will bomb as soon as they encounter spaces in 
> paths.

Spaces in path names are a Microsoft conspiracy to maximise the
user hostility of their grossly overrated operating system.  Smart
admins don't use them.  Smart users don't.  Why do you?  (Don't
answer; it's a rhetorical question; I'm not really interested).

In any case, when you install MSYS, the installer offers to put it
in `C:\MSYS\1.0'.  If you changed anything other than the drive
letter assignment, then, borrowing a quotation from an explanation
by Alejandro López-Valencia, of how to build a Win32 native groff
using Cygwin, "you are trying to be too clever for your own good;
remove it, and reinstall properly".  With a correct MSYS install,
and the corrected version of my `ac_default_prefix' assignment,
you would never see any embedded space in the assigned path.

Regards,
Keith.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]