From 1ae2e46dd862643bda6ab41351adbde68238222f Mon Sep 17 00:00:00 2001 From: Antti Harri Date: Sat, 4 Jun 2011 18:08:56 +0300 Subject: [PATCH] Use -pthread instead of -lpthread on OpenBSD. --- config.d/pthread.m4 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config.d/pthread.m4 b/config.d/pthread.m4 index ec60e91d2..1e70c3a11 100644 --- a/config.d/pthread.m4 +++ b/config.d/pthread.m4 @@ -3,6 +3,16 @@ if test "x$ac_cv_header_pthread_h" = "xyes"; then case "$host_os" in *qnx*) dnl qnx have all pthread* functions in the libc. ;; + *openbsd*) + LIBS="$LIBS -pthread" + AC_TRY_LINK( + [#include ], + [pthread_attr_t type; + pthread_attr_setstacksize(&type, 0x100000);], + [PTHREAD_LDFLAGS=-pthread], + [PTHREAD_LDFLAGS=-lpthread] + ) + ;; *) LIBS="$LIBS -lpthread" AC_TRY_LINK( [#include ],