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: Steven G. Johnson
Subject: Re: Objections? Re: Checking for CXX libraries -- AC_CXX_CHECK_LIB ?
Date: Mon, 28 Oct 2002 00:18:41 -0400
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.1) Gecko/20020826

Sorry to come (very) late to this thread, I was just reading back through the archives...

Allan Clark wrote:
This almost argues for a change to a generic function in AC_CHECK_LIB. Do we ever have a need for an AC_CHECK_LIB() to check C libraries using
a raw code snippet?  AC_CHECK_LIB(<foo>,functioncall(),...) might have
some use, but I haven't seen it yet.

I think there is definitely such a need. What happens is that in some library checks (for example, pthreads), you don't know whether the function you are testing might be a macro. In this case, you need to #include a header file and write an actual code snippet with the correct number (at least) of arguments. Currently, this means using AC_TRY_LINK, which has the disadvantage of requiring manual fiddling with $LIBS (and not being cached).

So, rather than doing something specifically for C++, I would advocate a more generalized version of AC_CHECK_LIB that, like AC_TRY_LINK, takes INCLUDES and FUNCTION-BODY arguments instead of FUNCTION. (And works with whatever the current language is. This could also be useful for Fortran.)

Cordially,
Steven G. Johnson







reply via email to

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