[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: configure on master checks for C++ compiler
From: |
Po Lu |
Subject: |
Re: configure on master checks for C++ compiler |
Date: |
Thu, 10 Aug 2023 20:19:59 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
> I've noticed that the configure script now checks for a C++ compiler:
>
> checking for g++... g++
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++ accepts -g... yes
> checking for g++ option to enable C++11 features... none needed
> checking how to run the C++ preprocessor... g++ -E
>
> However, AFAIU the C++ compiler is really needed only for two builds:
> Android and Haiku. If that is correct, could we please limit these
> tests only to those two builds, so that people who build for other
> configurations won't need to have a C++ compiler installed?
>
> Thanks.
A C++ compiler isn't required unless you are actually building for
Haiku, or Android with C++ dependencies (such as icu4c, a prerequisite
of libxml2.)
And unfortunately this is because of a well-known limitation in
Autoconf: the two distinct checks for C++ compilers both AC_REQUIRE a
C++ compiler, leading M4 to place the check at the top of the macro
expansion stack. The result of the check remains unused unless one of
the two conditions above are satisfied.