diff options
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r-- | unix/tcl.m4 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 40cb6eb..d7fdbe1 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -366,8 +366,14 @@ AC_DEFUN(SC_ENABLE_THREADS, [ # The space is needed THREADS_LIBS=" -lpthread" 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...") + AC_CHECK_LIB(pthreads,pthread_mutex_init,tcl_ok=yes,tcl_ok=no) + if test "$tcl_ok" = "yes"; then + # The space is needed + THREADS_LIBS=" -lpthreads" + 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 else TCL_THREADS=0 |