Use -pthread instead of -lpthread on OpenBSD.

This commit is contained in:
Antti Harri 2011-06-04 18:08:56 +03:00
parent d88c09a033
commit 1ae2e46dd8

View file

@ -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.h>],
[pthread_attr_t type;
pthread_attr_setstacksize(&type, 0x100000);],
[PTHREAD_LDFLAGS=-pthread],
[PTHREAD_LDFLAGS=-lpthread]
)
;;
*) LIBS="$LIBS -lpthread"
AC_TRY_LINK(
[#include <pthread.h>],