[PATCH v2] configure: better check for the C++ compiler

Emil Velikov emil.l.velikov at gmail.com
Mon Apr 3 17:32:24 UTC 2017


On 2 April 2017 at 15:11, Yann E. MORIN <yann.morin.1998 at free.fr> wrote:
> Hello,
>
> On 2017-03-08 18:23 +0100, Yann E. MORIN spake thusly:
>> When a C++ compiler is not found, then AC_PROG_CXX will set CXX to
>> 'false'.
>>
>> However, we test that we can find $CXX, and indeed false exists in
>> the PATH, for virtually all systems we have a chance to be compiled
>> on. So we conclude that we do have a C++ compiler, when this is
>> clearly wrong.
>>
>> Improve our hack by trying to run the C++ compiler with a benign call,
>> that should succeed if the CXX is really a C++ compiler: tell it to dump
>> its pre-defined macros.
>>
>> Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
>> Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
>
> Ping? ;-)
>
Renamed g++ and c++ and CXX and ends up being set to g++ :-\
Perhaps there's something broken on my end ?

An alternative solutions is drop the "which" all together and make
this a configure toggle. Default to disabled and toggle at make
distcheck via AM_DISTCHECK_CONFIGURE_FLAGS.
This way the release manager will ensure that tarballs with 'broken'
headers are not shipped.

That should also work if CXX is set to "false", is and empty string or
set to the wrong value.

-Emil


More information about the wayland-devel mailing list