summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in21
1 files changed, 6 insertions, 15 deletions
diff --git a/configure.in b/configure.in
index b0dabd0..90628ab 100644
--- a/configure.in
+++ b/configure.in
@@ -965,13 +965,7 @@ AC_ARG_WITH(pthread,
case "$withval" in
yes)
AC_CHECK_HEADERS(pthread.h)
- if test `uname` != "FreeBSD"; then
- AC_CHECK_LIB(pthread, pthread_create,,unset PTHREAD)
- else
- CFLAGS="$CFLAGS -pthread -D_THREAD_SAFE"
- LDFLAGS="$LDFLAGS -pthread"
- LIBS="$LIBS -lcipher"
- fi
+ AC_CHECK_LIB(pthread, pthread_create,,unset PTHREAD)
;;
no)
AC_MSG_CHECKING(for pthread)
@@ -1012,7 +1006,7 @@ case "$withval" in
esac
dnl ----------------------------------------------------------------------
-dnl Enable thread-safe version of library. It requires pthread on.
+dnl Enable thread-safe version of library. It requires Pthreads support.
dnl
AC_MSG_CHECKING(for thread safe support)
AC_ARG_ENABLE(threadsafe,
@@ -1024,13 +1018,10 @@ case "X-$THREADSAFE" in
AC_MSG_RESULT(no)
;;
X-yes)
- if test -n "$PTHREAD"; then
- AC_MSG_RESULT(yes)
- THREADSAFE=yes
- else
- AC_MSG_RESULT(error)
- AC_MSG_ERROR(needed pthread library not available)
- fi
+ dnl Check that we can link a simple Pthread program.
+ AC_TRY_LINK(,pthread_create(),
+ AC_MSG_RESULT(yes); THREADSAFE=yes,
+ AC_MSG_ERROR(needed pthread library not available))
;;
*)
AC_MSG_RESULT(error)