diff options
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r-- | unix/tcl.m4 | 35 |
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) |