AutoConf;

This may be a Question from the FAQ -- I'd read it if I knew where it
was.

How do I make a AC_CHECK_LIB for a C++ library?

My example looks for cgi_base::configureForServer on different systems
like this:
> AC_CHECK_LIB(cgi, configureForServer__8cgi_basePci)
> AC_CHECK_LIB(cgi, configureForServer__8cgi_baseFPci)

...and this often fails on other systems simply because the C compiler
causes the linker not to include various C++ libraries while checking.

I've tried:
> save_CC=$CC
> CC=$CXX 
> AC_CHECK_LIB(cgi, configureForServer__8cgi_basePci)
> AC_CHECK_LIB(cgi, configureForServer__8cgi_baseFPci)
> AC_CHECK_LIB(cgi, gnu_get_libc_version)
>[...]
> CC=$save_CC

...but with no consistent success, and the AC_CHECK_LIB still has to
guess at the mangled C++ name.  Is there no better way?

Allan

Reply via email to