summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m410
1 files changed, 8 insertions, 2 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 0fafaf3..7af0c0c 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -361,8 +361,14 @@ AC_DEFUN(SC_ENABLE_THREADS, [
else
AC_CHECK_LIB(c,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
if test "$tcl_ok" = "no"; then
- TCL_THREADS=0
- AC_MSG_WARN("Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...")
+ AC_CHECK_LIB(c_r,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREADS_LIBS=" -pthread"
+ else
+ TCL_THREADS=0
+ AC_MSG_WARN("Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...")
+ fi
fi
fi
fi