[Top][All Lists]

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

Re[2]: AC_PROG_CXX does not work correctly after AC_PROG_CC

From: Tim Van Holder
Subject: Re[2]: AC_PROG_CXX does not work correctly after AC_PROG_CC
Date: Mon, 22 Apr 2002 18:36:54 +0200

[CC: fixed - should've been djgpp-workers, not djgpp]

> TVH> Now as a side-effect, the first compiler check (PROG_CC 
> or PROG_CXX)
> TVH> will also try to determine the executable extension 
> using that compiler.
> TVH> It is that test that bombs out if you only use PROG_CXX 
> (or use it
> TVH> first)
> TVH> on a system without a C++ compiler.
> TVH> The other effects are as documented: it defaults to g++ 
> if nothing is
> TVH> found.
> OK, so this is not a bug, but IMHO a misfeature - isn't the 
> whole point
> of using AC_PROG_CXX to get a _working_ compiler?  Is there any
> explanation for current behaviour?

I think the idea is to allow people to install g++ after
configuring (or to set up a symlink to the actual compiler as
g++, if their compiler is not one in the regular list).
But I agree - perhaps it should bomb out if none
is found (or at least set CXX to 'none' so the script can
actually see that none was found, and react appropriately).
After all, AC_PROG_CC will always bomb out (even though it
only bombs out due to the EXEEXT test).

My suggestion would probably be to
  a) have the EXEEXT tests fail graciously (i.e. have them
     give a 'warning: cannot determine executable extension
     using the <LANG> compiler', and not set any findings (so
     possible following AC_PROG_<COMPILER> calls can find it
     out properly).
  b) have the AC_PROG_<compiler> either bomb out if the
     requested compiler is not available, or set the respective
     variable to 'none', so scripts can decide what to do.

Your thoughts, Akim? (Besides bugward compatibility, which is
obviously an issue).

reply via email to

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