X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f From: "Tim Van Holder" To: "'Laurynas Biveinis'" Cc: , , "'Akim Demaille'" Subject: Re[2]: AC_PROG_CXX does not work correctly after AC_PROG_CC Date: Mon, 22 Apr 2002 18:36:54 +0200 Message-ID: <000d01c1ea1b$e9bd2bf0$918ce0d5@zastaixp> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 In-Reply-To: <169217484.20020421131518@softhome.net> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk [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 compiler', and not set any findings (so possible following AC_PROG_ calls can find it out properly). b) have the AC_PROG_ 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).