[Xcb] pthread-stubs pthread_* declaration conflict [was: passing -lpthread for pthread-stubs]

Vincent Torri vtorri at univ-evry.fr
Mon Apr 18 06:17:15 PDT 2011



On Mon, 18 Apr 2011, Samuel Thibault wrote:

> Vincent Torri, le Mon 18 Apr 2011 14:48:42 +0200, a écrit :
>> ok. Though i was thinking that we needed to check if pthread was available
>> in configure stuff to decide what to do:
>>
>> AC_CHECK_FUNCS(funclist, [], [PKG_CONFIG_LIBS='-L${libdir}
>> -lpthread-stubs'])
>>
>> funclist being he funtions described in list.m4. If you want to check
>> these functions, you have to provide:
>>  * the path for the header pthread.h
>>  * the path and the name for the library.
>
> Again, the whole point of pthread-stubs is not to detect what is
> available through linking normally with libpthread, but to detect what
> is not available *without* linking with libpthread.

is available with foo

is equivalent to

! (is not available without foo)

If you don't pass -lpthread, then there will be *always* undef ref when 
using AC_CHECK_FUNCS(), unless pthread stuff is in the libc.

Vincent


More information about the Xcb mailing list