summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2000-05-19 14:50:48 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2000-05-19 14:50:48 (GMT)
commitf4b618e5e101924e2f39e21adbbcf077ba918c36 (patch)
tree8831a74145cde574fbb75f6abe0857d8087d1858 /configure.in
parent670770900a0f44915650290ce6d51f7161fd5982 (diff)
downloadhdf5-f4b618e5e101924e2f39e21adbbcf077ba918c36.zip
hdf5-f4b618e5e101924e2f39e21adbbcf077ba918c36.tar.gz
hdf5-f4b618e5e101924e2f39e21adbbcf077ba918c36.tar.bz2
[svn-r2274] Hacked to detect pthreads on FreeBSD and add correct compilation options.
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)