unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* configure on master checks for C++ compiler
@ 2023-08-10 11:15 Eli Zaretskii
  2023-08-10 11:38 ` Andreas Schwab
  2023-08-10 12:19 ` Po Lu
  0 siblings, 2 replies; 4+ messages in thread
From: Eli Zaretskii @ 2023-08-10 11:15 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: configure on master checks for C++ compiler
  2023-08-10 11:15 configure on master checks for C++ compiler Eli Zaretskii
@ 2023-08-10 11:38 ` Andreas Schwab
  2023-08-10 12:19 ` Po Lu
  1 sibling, 0 replies; 4+ messages in thread
From: Andreas Schwab @ 2023-08-10 11:38 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Po Lu, emacs-devel

On Aug 10 2023, Eli Zaretskii wrote:

> 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?

The configure script does not complain if it doesn't find a C++
compiler.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: configure on master checks for C++ compiler
  2023-08-10 11:15 configure on master checks for C++ compiler Eli Zaretskii
  2023-08-10 11:38 ` Andreas Schwab
@ 2023-08-10 12:19 ` Po Lu
  2023-08-12  2:46   ` Richard Stallman
  1 sibling, 1 reply; 4+ messages in thread
From: Po Lu @ 2023-08-10 12:19 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: configure on master checks for C++ compiler
  2023-08-10 12:19 ` Po Lu
@ 2023-08-12  2:46   ` Richard Stallman
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2023-08-12  2:46 UTC (permalink / raw)
  To: Po Lu; +Cc: eliz, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > 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.

Since the failure of the check for a C++ compiler causes no problem
on platforms which don't need a C++ compiler, I think we can
live with this.  It is inelegant but no worse.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-12  2:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-10 11:15 configure on master checks for C++ compiler Eli Zaretskii
2023-08-10 11:38 ` Andreas Schwab
2023-08-10 12:19 ` Po Lu
2023-08-12  2:46   ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).