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
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.
- Reported-by: Khem Raj
- Fixes-commit: 3a9d32eb59194b989656548755066ccd9feb36ac
- Signed-off-by: NIIBE Yutaka <email@example.com>