autoconf-patches
[Top][All Lists]
Advanced

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

Re: AC_OBJEXT again


From: Earnie Boyd
Subject: Re: AC_OBJEXT again
Date: Thu, 30 Nov 2000 06:40:40 -0800 (PST)

--- "Lars J. Aas" <address@hidden> wrote:
> On Thu, Nov 30, 2000 at 10:15:32AM +0100, Akim Demaille wrote:
> : +    AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
> : +    if AC_TRY_EVAL(ac_link); then
> : +      for ac_file in `ls conftest conftest.exe conftest.* 2>/dev/null`; do
> : +           case $ac_file in
> : +             *.$ac_ext | *.o | *.obj | *.xcoff | *.tds) ;;
> : +             *) ac_cv_exeext=`expr "$ac_file" : 'conftest\(.*\)'`
> : +                break;;
> : +           esac
> : +      done
> : +      rm -f conftest.$ac_objext conftest.$ac_ext
> : +    else
> : +      AC_MSG_ERROR([cannot compile and link])
> : +    fi
> : +    ;;
> 
> This test will report `' on Cygwin caused by some Cygwin magic.  Even though
> the file is named `conftest.exe', doing `ls conftest' will return `conftest',
> and doing `test -f conftest' will return true.  Doing a plain `ls' will not
> return that virtual file, though.  You therefore need to "test for" (read:
> ls)
> the .exe extension first.
> 

And to further clarify:
  `ls conftest' will be true for conftest.exe
  `rm conftest' will error even though `test -f conftest' is true

HTH,

=====
Earnie Boyd
mailto:address@hidden

---         <http://earniesystems.safeshopper.com>         ---
--- Cygwin: POSIX on Windows <http://gw32.freeyellow.com/> ---
---   Minimalist GNU for Windows <http://www.mingw.org/>   ---

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/



reply via email to

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