AC_CHECK_LIB failures with AC_LANG(C++)

Jani Välimaa <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.bugs
Organization Mageia.org
Message-ID <[email protected]>
Hello,

Looks like AC_CHECK_LIB(foo, main, [foo="yes"]) calls fails after
https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=326c9a547423d25c621bc5c0ef76edbf6eda8c92
if AC_LANG(C++) is also used.

Running configure fails to find libraries and config.log shows the
following.

conftest.cpp:38:14: error: '::main' must return 'int'
   38 |   extern "C" void main ();
      |              ^~~~       

Problem disappears if I revert the commit. gcc version is 10.2.0.
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE1etK5oBNfP8PS+FJcwecnDtSwOAFAl+dubMACgkQcwecnDtS
wOAe+Q/+MWj4jLhTYKblnqZ7Bd5WrSaF47QlEKTkU91dycSENim25qIlkUVhIHoz
bLh+dIho81r2Hry9qpl5DLc2Sff1ro+JTNexefK59W+9kf7o01VSyKcavX/eBoH8
z7pKtXfP1fmftFl/aclGmCyma5r9JFbwqY0Qa8rNn4wVbsYtI32lphB3A7wXVbBd
p+4nPrKiDz2laJbCRCiz6D/aH87zlVl/E2Jhg4/y1xRha0BUgV3iWxFL7EMtFs28
4Oakb2oZW20C+RisU/B/krGtiN9U0bf3oOSis/bZu1ImcVva4QlPhNXtrFIExSLz
dKZdLGxXcB2DKmL88hmH66ZujHPv1y88Svf9+WfrItqLI89wPS0Zzw4h7/XNzi+T
Ta4gS9+TM2acTGv3k7wvnmDvq3Y71G59vwG60HaRU4mIO0QJHtvY+Jf7iDuV0kwe
y9qFUDsS4jTJ6pANABKoOS6glh1s7CYtdBQneH3LKqI1fUJkqDN8XW1D5EL7pohD
dBQmdmmySOn/thMogqpfAr9ri6h2ZK7z2C4G39E1WjiU5NXHJpDTwF5+YlhXSXRE
cMq7GUYUDsrv6E+XJZqykI+WGF/Ijp4Q3cWsMXy3GYFC+kdVrbba4hixMlaFad1/
ZoapjqQSZo/SHfhQsXGIAOlTrRVgT1+C89maaJbPqSlC1y1VmOU=
=6H4U
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.