[Top][All Lists]

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

Re: The AC_LANG_COMPILER problems

From: Akim Demaille
Subject: Re: The AC_LANG_COMPILER problems
Date: 06 Feb 2001 11:21:43 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Crater Lake)

"Lars J. Aas" <address@hidden> writes:

> On Mon, Feb 05, 2001 at 06:28:46PM +0100, Akim Demaille wrote:
> : My idea is to check first for the default executable (a.out or a.exe),
> : and use *this* output to check if the compiler works (i.e., produces
> : valid executables).
> How will this work?  What I mean is, which $CC options will you use to
> produce the "default" executable instead of a named executable?  I'm
> curious, because I don't know if I can make cl.exe create an executable
> without giving it the -o<progname> option...

The current CVS Autoconf already does this:

# ---------------------------
# Check for the extension used for the default name for executables.
# Beware of `expr' that may return `0' or `'.
[# Try without -o first, disregard a.out.
ac_link_default=`echo "$ac_link" | sed ['s/ -o *conftest[^ ]*//']`
[for ac_file in `ls a.exe conftest.exe a.* conftest conftest.* 2>/dev/null`; do
  case $ac_file in
    *.$ac_ext | *.out | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']`
          export ac_cv_exeext
    * ) break;;
      [echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD])
rm -f a.out a.exe conftest$ac_cv_exeext

I'm just talking about swapping and using this place to catch broken

> : So, any problems with running _AC_COMPILER_EXEEXT first?
> None that I see, except that you will probably also have object files
> in the current directory which you will have to avoid thinking is the
> executable, but since the current mechanism is to use knowledge about
> what's most common and let those findings supersede any other findings,
> it should not be a problem.

OK, let's go.

reply via email to

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