summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in13
1 files changed, 9 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index ecc8d49..049734c 100644
--- a/configure.in
+++ b/configure.in
@@ -716,7 +716,12 @@ AC_ARG_WITH(pthread,[ --with-pthread=INC,LIB Use the Pthreads library],
case $withval in
yes)
AC_CHECK_HEADERS(pthread.h)
- AC_CHECK_LIB(pthread, pthread_create,,unset PTHREAD)
+ if test `uname` != "FreeBSD"; then
+ AC_CHECK_LIB(pthread, pthread_create,,unset PTHREAD)
+ else
+ CFLAGS="$CFLAGS -D_THREAD_SAFE"
+ LDFLAGS="$LDFLAGS -pthread"
+ fi
;;
no)
AC_MSG_CHECKING(for pthread)
@@ -725,16 +730,16 @@ case $withval in
;;
*)
pthread_inc="`echo $withval |cut -f1 -d,`"
- if test "X" != "$pthread_inc"; then
+ if test "X-" != "X-$pthread_inc"; then
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$pthread_inc"
AC_CHECK_HEADERS(pthread.h,,CPPFLAGS="$saved_CPPFLAGS"; unset PTHREAD)
- else
+ else
AC_CHECK_HEADERS(pthread.h,,unset PTHREAD)
fi
pthread_lib="`echo $withval |cut -f2 -d, -s`"
- if test "X" != "$pthread_lib"; then
+ if test "X-" != "X-$pthread_lib"; then
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$pthread_lib"
AC_CHECK_LIB(pthread, pthread_create,,LDFLAGS="$saved_LDFLAGS"; unset PTHREAD)