Home GnuPG
Diffusion nPth 6629a4b8015c

build: Fix detecting pthread library.

Description

build: Fix detecting pthread library.

* configure.ac: Use pthread_cancel to detect pthread library.

In GNU C library, its routines support threading by changing its
behavior at runtime, based on whether or not an application links to
-lpthread. Some pthreads functions are in libc, others are in
libpthread.

Here, we try to detect the libpthread by testing a symbol which is
only available in libpthread (not libc). But, what symbol should be
tested may vary by GNU C library implementations.

So far, pthread_cancel is best one.

Details

Provenance
gniibeAuthored on May 14 2021, 2:15 AM
Parents
rPTH7e45b50a4034: m4: Update with newer autoconf constructs.
Branches
Unknown
Tags
Unknown