[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: conditionally compiling C++ code
From: |
Ronald Landheer-Cieslak |
Subject: |
Re: conditionally compiling C++ code |
Date: |
Fri, 25 Apr 2003 11:46:38 +0200 (CEST) |
On Thu, 24 Apr 2003, Steve M. Robbins wrote:
> On Thu, Apr 24, 2003 at 01:53:54PM +0200, Ronald Landheer-Cieslak wrote:
> > Other than that, the mere knowledge of a compiler being available should
> > not, IMHO, have any impact on the behaviour of any program
> One wouldn't expect that it change the behaviour of a program.
> But it is convenient to build optional C++ modules of a project when
> C++ is available, and not otherwise. Isn't that what this discussion
> is about?
As I understood it, the user has the option to not use the C++ compiler,
even if available (hence the need to run AC_PROG_CXX optionnaly). The algo
would look like this:
? do we want to know whether we can compiler C++
+ * AC_PROG_CXX
? do we have a C++ compiler (can only be true if AC_PROG_CXX ran)
+ * compile C++ files
IMHO, it should be this:
? do we want to know whether we can compiler C++
+ * AC_PROG_CXX
? do we have a C++ compiler (can only be true if AC_PROG_CXX ran)
+ ? do we want to use it
| + * compile C++ files
or, as AC_PROG_CXX can't be run optionally:
* AC_PROG_CXX
? do we have a C++ compiler
+ ? do we want to use it
| + * compile C++ files
The first algorithm won't work if AC_PROG_CXX can't be run optionally, or
if the CXX environment variable is set & overrides the CXX found by the
configure script. Hence, the mere knowledge of having a C++ compiler
overrides user preference - which is a bug, IMHO.
But, of course, the third algorithm just works around a bug in autoconf
and does a check that might never be used.
rlc
- conditionally compiling C++ code, Keith Bostic, 2003/04/21
- Re: conditionally compiling C++ code, Ronald Landheer-Cieslak, 2003/04/23
- Re: conditionally compiling C++ code, Thomas Dickey, 2003/04/23
- Re: conditionally compiling C++ code, Ronald Landheer-Cieslak, 2003/04/24
- Re: conditionally compiling C++ code, Thomas E. Dickey, 2003/04/24
- Re: conditionally compiling C++ code, Steve M. Robbins, 2003/04/24
- Re: conditionally compiling C++ code,
Ronald Landheer-Cieslak <=
- Re: conditionally compiling C++ code, Steve M. Robbins, 2003/04/26
- Re: conditionally compiling C++ code, Ronald Landheer-Cieslak, 2003/04/28
- Re: conditionally compiling C++ code, Peter Eisentraut, 2003/04/28
- Re: conditionally compiling C++ code, Thomas Dickey, 2003/04/28
- Re: conditionally compiling C++ code, Bob Proulx, 2003/04/28
- Re: conditionally compiling C++ code, Thomas E. Dickey, 2003/04/29
- Re: conditionally compiling C++ code, Patrick Welche, 2003/04/29
- Re: conditionally compiling C++ code, Sander Niemeijer, 2003/04/29
- Re: conditionally compiling C++ code, Ronald Landheer-Cieslak, 2003/04/29
- Re: conditionally compiling C++ code, Thomas E. Dickey, 2003/04/29