-AC_MSG_CHECKING(if you want to allow EINTR in wgetch with pthreads)
-AC_ARG_ENABLE(pthreads-eintr,
- [ --enable-pthreads-eintr enable EINTR in wgetch with pthreads],
- [use_pthreads_eintr=$enableval],
- [use_pthreads_eintr=no])
-AC_MSG_RESULT($use_pthreads_eintr)
-if test $use_pthreads_eintr = yes ; then
- AC_DEFINE(USE_PTHREADS_EINTR)
-fi
-
-AC_MSG_CHECKING(if you want to use weak-symbols for pthreads)
-AC_ARG_ENABLE(weak-symbols,
- [ --enable-weak-symbols enable weak-symbols for pthreads],
- [use_weak_symbols=$enableval],
- [use_weak_symbols=no])
-AC_MSG_RESULT($use_weak_symbols)
-if test "$use_weak_symbols" = yes ; then
- CF_WEAK_SYMBOLS
-else
- cf_cv_weak_symbols=no
-fi
+if test "x$with_pthread" != xno; then
+ AC_CHECK_FUNC(pthread_kill,[
+ AC_MSG_CHECKING(if you want to allow EINTR in wgetch with pthreads)
+ AC_ARG_ENABLE(pthreads-eintr,
+ [ --enable-pthreads-eintr enable EINTR in wgetch with pthreads],
+ [use_pthreads_eintr=$enableval],
+ [use_pthreads_eintr=no])
+ AC_MSG_RESULT($use_pthreads_eintr)
+ if test $use_pthreads_eintr = yes ; then
+ AC_DEFINE(USE_PTHREADS_EINTR)
+ fi])
+
+ AC_MSG_CHECKING(if you want to use weak-symbols for pthreads)
+ AC_ARG_ENABLE(weak-symbols,
+ [ --enable-weak-symbols enable weak-symbols for pthreads],
+ [use_weak_symbols=$enableval],
+ [use_weak_symbols=no])
+ AC_MSG_RESULT($use_weak_symbols)
+ if test "$use_weak_symbols" = yes ; then
+ CF_WEAK_SYMBOLS
+ else
+ cf_cv_weak_symbols=no
+ fi