URL:
<https://savannah.gnu.org/support/?110532>
Summary: AC_CHECK_LIB no longer works with a C++ compiler
Project: Autoconf
Submitted by: vinc17
Submitted on: mer. 25 août 2021 23:47:51 UTC
Category: None
Priority: 5 - Normal
Severity: 3 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Operating System: None
_______________________________________________________
Details:
With Autoconf 2.71 (and the current git version), when I want to build MPFR
with g++, I get an error in the AC_CHECK_LIB test (undefined reference)
because the 3 lines
#ifdef __cplusplus
extern "C"
#endif
are now missing at the beginning of the generated test program. The cause is
commit 326c9a547423d25c621bc5c0ef76edbf6eda8c92, which removed these 3 lines
(among other things). This commit says: "(AC_LANG_CALL(C)): Remove #ifdef
__cplusplus, this macro is no longer used to generate C++ code." But this is
actually C code compiled with a C++ compiler, not C++ code.
I've submitted a patch that re-adds these 3 lines:
https://lists.gnu.org/archive/html/autoconf-patches/2021-08/msg00005.html
This makes the error disappear for me.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/support/?110532>
_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/