autoconf
[Top][All Lists]
Advanced

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

Re: FAQ? C++-based AC_CHECK_LIB?


From: John Levon
Subject: Re: FAQ? C++-based AC_CHECK_LIB?
Date: Fri, 29 Mar 2002 10:41:18 +0000
User-agent: Mutt/1.3.25i

On Thu, Mar 28, 2002 at 07:13:14PM -0500, Allan Clark wrote:

> 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)

First do AC_LANG_CPLUSPLUS (or the equivalent) to switch to compiling in
C++).

Then you can simply do :

AC_CHECK_LIB(cgi, main)

(yes, using "main" works - it's a special value in this context).

I don't know if an unmangled name would work now - if it doesn't and you
really do need to check for a particular symbol, you can use
AC_TRY_COMPILE to build your own test.

There's probably other ways, but this is the sort of thing I do.

regards
john

-- 
"Please crack down on the Chinaman's friends and Hitler's commander.  Mother is
the best bet and don't let Satan draw you too fast.  A boy has never wept ...
nor dashed a thousand kim. Did you hear me?"
        - Dutch Schultz



reply via email to

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