Fix the dynamic loading issue on NetBSD

On NetBSD, it is not supported to load a library linked against
libpthread into a program that wasn't (since the C library provides
stubs for some pthread-functions, which might have already been called
before libpthread is loaded, leading to problems).

Patch from Matthias Drochner
This commit is contained in:
Akira TAGOH 2013-10-21 12:16:46 +09:00
parent ff0e0d17b2
commit 5e029db497
1 changed files with 5 additions and 0 deletions

View File

@ -162,6 +162,11 @@ case ${host_os} in
darwin*)
ax_pthread_flags="-pthread $ax_pthread_flags"
;;
netbsd*)
# use libc stubs, don't link against libpthread, to allow
# dynamic loading
ax_pthread_flags=""
;;
esac
# Clang doesn't consider unrecognized options an error unless we specify