autoconf
[Top][All Lists]
Advanced

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

Re: Objections? Re: Checking for CXX libraries -- AC_CXX_CHECK_LIB ?


From: Allan Clark (Reply to List Only)
Subject: Re: Objections? Re: Checking for CXX libraries -- AC_CXX_CHECK_LIB ?
Date: Mon, 30 Sep 2002 13:06:04 -0400

Sebastian;

> AC_CXX_CHECK_LIB (LIBRARY, DECLARATION-SECTION,CALL-SECTION,
>         [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], [OTHER-LIBRARIES])

You've added a "declaration section" to my sample.

Is this a re-statement without further reinforcement or justification
that you want to have a #include section there, or how else would you
use it?  Can you provide an example usage?

Is this a way to avoid something like:

        AC_CXX_CHECK_LIB(foo, [Foo *f = makeMeAFoo();], , , )

... ie having the declaration (Foo *f) inline with the function call
itself?

Allan


Sebastian Huber wrote:
> 
> Hello,
> I think that AC_CXX_CHECK_LIB fits not very good into the AC_LANG_PUSH ...
> concept but I suppose there is no chance to avoid a new function. The problem
> with AC_CHECK_LIB is that it uses C linkage for C++ libraries. I think the
> interface to a C++ library check should look like:
> 
> AC_CXX_CHECK_LIB (LIBRARY, DECLARATION-SECTION,CALL-SECTION,
>         [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], [OTHER-LIBRARIES])
> 
> If someone uses header files in the DECLARATION-SECTION he is responsible to
> check them. If header files are not availible, she can write the necessary
> declarations explicitly.
> 
> An alternative is to write no new function, but place a hint into the
> documentation that you cannot use AC_CHECK_LIB for C++ an should use
> AC_TRY_LINK.
> 
> Ciao
>         Sebastian




reply via email to

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