autoconf
[Top][All Lists]
Advanced

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

Re: conditionally compiling C++ code [#7938]


From: Keith Bostic
Subject: Re: conditionally compiling C++ code [#7938]
Date: Wed, 23 Apr 2003 15:12:57 -0400 (EDT)

> AC_PROG_CXX checks whether it can find a working C++ compiler. Is it a 
> problem to *know* this if you're not going to use it?

Yes, it's a problem.

As far as I can tell, including AC_PROG_CXX in configure.ac
results in configure testing for a working C++ pre-processor,
and when one isn't found, configure fails.

As I Akim Demaille pointed out in one posting on this topic,
autoconf has no notion of "unavailable" language support.

For example, it might make sense to have AC_PROG_CXX have a
no-such-compiler value for CXX, which would then be tested
before dependent tests, like for a C++ preprocessor, are done.
(That was the first workaround we tried -- see if AC_PROG_CXX
has failed, and wrap the tests that fail in if/else of CXX's
"failed" value.

That doesn't work because there is no CXX failure value.  If
AC_PROG_CXX can't find a compiler, it sets CXX to "g++" (that
makes no sense to me, but I don't know enough about autoconf
to have the right to an opinion.)

Regards,
--keith

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Keith Bostic                    address@hidden
Sleepycat Software Inc.         keithbosticim (ymsgid)
118 Tower Rd.                   +1-781-259-3139
Lincoln, MA 01773               http://www.sleepycat.com




reply via email to

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