[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers
From: |
Keith Marshall |
Subject: |
Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers |
Date: |
Sun, 1 Apr 2007 19:50:52 +0100 |
User-agent: |
KMail/1.8.2 |
On Sunday 01 April 2007 18:23, Paul Eggert wrote:
> For example, will this test work? If not, why not?
>
> test -x / && { { test -x /bin/sh && test ! -f /bin/sh.exe; } ||
> test ! -f /bin/sh; }
It might. I don't have a Win32 box here, so can't verify this until I
return to work in the morning, but I'm fairly confident that:--
test -x / --> true
test -x /bin/sh --> true, because /bin/sh.exe exists and MSYS
appends the registered executable file type
extensions, when matching bare file names
test -f /bin/sh.exe --> true
I'm less certain, but I also believe that:--
test -f /bin/sh --> true, because /bin/sh.exe exists, and causes
/bin/sh to *appear* to exist as an executable
file, although its real name is /bin/sh.exe
Thus, because of the negation in the final two tests, I would expect the
proposed expression to evaluate as false on MSYS, and I suspect also on
Cygwin. Is that what you want to achieve?
Regards,
Keith.