$NetBSD: patch-aa,v 1.8 2010/09/10 20:28:03 joerg Exp $ Include pthread.h as thread stubs might be macros like on NetBSD. Define conditional for cross-compiling support. Also, don't look for keysmydef.h, as this could break cross builds (from GIT). --- configure.ac.orig 2009-02-17 14:38:52.000000000 +0000 +++ configure.ac @@ -215,7 +215,7 @@ xyes) ;; esac -AC_CHECK_LIB(c, pthread_self, [thrstubs="no"], [thrstubs="yes"]) +AC_CHECK_DECLS([pthread_self], [thrstubs="no"], [thrstubs="yes"], [[#include ]]) AM_CONDITIONAL(THRSTUBS, test x$thrstubs = xyes) dnl XXX incomplete, please fill this in @@ -224,8 +224,8 @@ if test x$xthreads = xyes ; then linux*|openbsd*|gnu*|k*bsd*-gnu) XTHREADLIB=-lpthread ;; netbsd*) - XTHREAD_CFLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS" - XTHREADLIB="-lpthread" ;; + XTHREAD_CFLAGS="-D_REENTRANT" + XTHREADLIB="-pthread" ;; freebsd*) XTHREAD_CFLAGS="-D_THREAD_SAFE" XTHREADLIB="-pthread" ;;