autoconf
[Top][All Lists]
Advanced

[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: Paul Eggert
Subject: Re: autoconf-2.61's AC_LINK_IFELSE with MinGW cross-compilers
Date: Sun, 01 Apr 2007 10:23:41 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

>> >   if test -x / >/dev/null 2>&1; then
>> >     as_test_x='test -x'
>> >   else
>> >     # do something frighteningly complicated and barely
>> > comprehensible # (my comment, not in actual code)...
>> >
>> as_test_x is intended to mimic test -x.  Since 'test -x' succeeds
>> on searchable directories, as_test_x should too.
>
> Sure, but on Unix `test -x' plays two distinct roles.  You test for it's 
> applicability in one of these roles, namely testing for the ability to 
> search within a specific directory, then deploy it in its other role, 
> namely to test if a specific file is executable.

Perhaps we can adjust the code above so that MSYS doesn't
set as_test_x to 'test -x', but sets it to something else (since
'test -x' doesn't do the desired thing on your system).

What can you suggest as a substitute for 'test -x /' on MSYS?
We need a substitute that will behave differently on MSYS, but
will behave the same on ordinary systems where the above code works
fine.  We would like a test that is short and efficient and doesn't
require the use of a compiler, since this code has to be run in
environments where there may not be a compiler.

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; }




reply via email to

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