qnx doesn't need any pthread flags when linking

This commit is contained in:
Bill Currie 2004-01-22 06:36:59 +00:00
parent 43f68ba10c
commit 60cb2a7494

View file

@ -173,14 +173,19 @@ fi
if test "x$ac_cv_header_pthread_h" = "xyes"; then
save_ldflags="$LDFLAGS"
LDFLAGS="$LDFLAGS -lpthread"
AC_TRY_LINK(
[#include <pthread.h>],
[pthread_attr_t type;
pthread_attr_setstacksize(&type, 0x100000);],
[PTHREAD_LDFLAGS=-lpthread],
[PTHREAD_LDFLAGS=-pthread]
)
case "$host_os" in
*qnx*) dnl qnx have all pthread* functions in the libc.
;;
*) LDFLAGS="$LDFLAGS -lpthread"
AC_TRY_LINK(
[#include <pthread.h>],
[pthread_attr_t type;
pthread_attr_setstacksize(&type, 0x100000);],
[PTHREAD_LDFLAGS=-lpthread],
[PTHREAD_LDFLAGS=-pthread]
)
;;
esac
LDFLAGS="$save_ldflags"
PTHREAD_CFLAGS=-D_REENTRANT
fi