bug-autoconf
[Top][All Lists]
Advanced

[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

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/




reply via email to

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