[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sr #110532] AC_CHECK_LIB no longer works with a C++ compiler

From: Vincent Lefèvre
Subject: [sr #110532] AC_CHECK_LIB no longer works with a C++ compiler
Date: Wed, 25 Aug 2021 19:47:53 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0


                 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



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"

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:


This makes the error disappear for me.


Reply to this item at:


  Message posté via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]