summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2013-10-21 12:16:46 +0900
committerAkira TAGOH <akira@tagoh.org>2013-10-21 12:16:46 +0900
commit5e029db4971e37437cfe6147d52d00136dfb8cb5 (patch)
tree31cf7545168557191b07ee063e16a6acc423806f /m4
parentff0e0d17b254f71592dfa29a988a82efefff8913 (diff)
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
Diffstat (limited to 'm4')
-rw-r--r--m4/ax_pthread.m45
1 files changed, 5 insertions, 0 deletions
diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4
index d383ad5c..e77541ce 100644
--- a/m4/ax_pthread.m4
+++ b/m4/ax_pthread.m4
@@ -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