Bram Stolk <[EMAIL PROTECTED]> writes:
> I want to check for simple global C++ func. However, even if I set
> the language to C++, the conftest.C is created in such a way, that
> the func I am looking for is prototyped in "extern C", thereby
> causing the check to fail.
You're probably running into one or both of these problems:
* the function name in the library is mangled
* the C++ compiler and/or linker doesn't like trying to link
your function against the default "int func(void)" signature
that AC_CHECK_LIB tries to do (I know this happens with SGI
MIPSpro v7.30 at least)
In short, the AC_CHECK_LIB macro doesn't really work with C++
libraries, and might not even work with C libraries if the current
language has been set to C++.
The simple workaround is to replace your use of AC_CHECK_LIB with
AC_TRY_LINK, where you supply a code snippet that tries to use some
functionality of the library _properly_.
Regards,
Morten