summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-11-12 14:18:11 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-11-12 14:18:11 (GMT)
commitd6a522034dba3eed8776e4752ea99295ac8a936c (patch)
tree3da6e42a4bf5f540d3f8dd95e9cf8a4a73587a15 /unix/tcl.m4
parent930c71f59cc7d70f7ba18e8db3015b438694b097 (diff)
downloadtcl-d6a522034dba3eed8776e4752ea99295ac8a936c.zip
tcl-d6a522034dba3eed8776e4752ea99295ac8a936c.tar.gz
tcl-d6a522034dba3eed8776e4752ea99295ac8a936c.tar.bz2
* unix/tcl.m4, unix/tclUnixPort.h: Check for pthread_attr_get_np
in <pthread.h> before forcing the use of <pthread_np.h> to make things work on NetBSD 2.0. [Bug 1064882]
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m435
1 files changed, 26 insertions, 9 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index d7a4f8b..55175ad 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -476,15 +476,32 @@ AC_DEFUN(SC_ENABLE_THREADS, [
ac_saved_libs=$LIBS
LIBS="$LIBS $THREADS_LIBS"
AC_CHECK_FUNCS(pthread_attr_setstacksize)
- AC_CHECK_FUNCS(pthread_attr_get_np pthread_getattr_np)
- AC_MSG_CHECKING([for pthread_getattr_np declaration])
- AC_CACHE_VAL(tcl_cv_grep_pthread_getattr_np,
- AC_EGREP_HEADER(pthread_getattr_np, pthread.h,
- tcl_cv_grep_pthread_getattr_np=present,
- tcl_cv_grep_pthread_getattr_np=missing))
- AC_MSG_RESULT($tcl_cv_grep_pthread_getattr_np)
- if test $tcl_cv_grep_pthread_getattr_np = missing ; then
- AC_DEFINE(GETATTRNP_NOT_DECLARED)
+ AC_CHECK_FUNC(pthread_attr_get_np,tcl_ok=yes,tcl_ok=no)
+ if test $tcl_ok = yes ; then
+ AC_DEFINE(HAVE_PTHREAD_ATTR_GET_NP)
+ AC_MSG_CHECKING([for pthread_attr_get_np declaration])
+ AC_CACHE_VAL(tcl_cv_grep_pthread_attr_get_np,
+ AC_EGREP_HEADER(pthread_attr_get_np, pthread.h,
+ tcl_cv_grep_pthread_attr_get_np=present,
+ tcl_cv_grep_pthread_attr_get_np=missing))
+ AC_MSG_RESULT($tcl_cv_grep_pthread_attr_get_np)
+ if test $tcl_cv_grep_pthread_attr_get_np = missing ; then
+ AC_DEFINE(ATTRGETNP_NOT_DECLARED)
+ fi
+ else
+ AC_CHECK_FUNC(pthread_getattr_np,tcl_ok=yes,tcl_ok=no)
+ if test $tcl_ok = yes ; then
+ AC_DEFINE(HAVE_PTHREAD_GETATTR_NP)
+ AC_MSG_CHECKING([for pthread_getattr_np declaration])
+ AC_CACHE_VAL(tcl_cv_grep_pthread_getattr_np,
+ AC_EGREP_HEADER(pthread_getattr_np, pthread.h,
+ tcl_cv_grep_pthread_getattr_np=present,
+ tcl_cv_grep_pthread_getattr_np=missing))
+ AC_MSG_RESULT($tcl_cv_grep_pthread_getattr_np)
+ if test $tcl_cv_grep_pthread_getattr_np = missing ; then
+ AC_DEFINE(GETATTRNP_NOT_DECLARED)
+ fi
+ fi
fi
LIBS=$ac_saved_libs
AC_CHECK_FUNCS(readdir_r)