summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>1999-12-20 20:23:33 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>1999-12-20 20:23:33 (GMT)
commit96f3c024918c6d777d941090472b7f34e2d75205 (patch)
tree3f1ed826bf4757e0cd1cc02e9857bcc43d2162bd /configure.in
parentaaca4e658ba65c801205eead5579e2c306a41aad (diff)
downloadhdf5-96f3c024918c6d777d941090472b7f34e2d75205.zip
hdf5-96f3c024918c6d777d941090472b7f34e2d75205.tar.gz
hdf5-96f3c024918c6d777d941090472b7f34e2d75205.tar.bz2
[svn-r1918] configure.in:
Added --with-pthread option to configure pthread library. Default is no pthread. configure: Derived from configure.in by autoconf.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in40
1 files changed, 40 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 0fe4391..a11819b 100644
--- a/configure.in
+++ b/configure.in
@@ -568,6 +568,46 @@ AC_CHECK_LIB(silo,lite_PD_open)
AC_CHECK_HEADERS(pdb.h,PDB2HDF=pdb2hdf)
dnl ----------------------------------------------------------------------
+dnl Is the Pthreads library present? It has a header file `pthread.h' and
+dnl a library `-lpthread' and their locations might be specified with the
+dnl `--with-pthread' command-line switch. The value is an include path
+dnl and/or a library path. If the library path is specified then it must
+dnl be preceded by a comma.
+dnl
+
+AC_ARG_WITH(pthread,[ --with-pthread=INC,LIB Use the Pthreads library],
+ ,withval=no)
+case $withval in
+ yes)
+ AC_CHECK_HEADERS(pthread.h)
+ AC_CHECK_LIB(pthread, pthread_create)
+ ;;
+ no)
+ AC_MSG_CHECKING(for pthread)
+ AC_MSG_RESULT(suppressed)
+ ;;
+ *)
+ pthread_inc="`echo $withval |cut -f1 -d,`"
+ if test "X" != "$pthread_inc"; then
+ saved_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I$pthread_inc"
+ AC_CHECK_HEADERS(pthread.h,,CPPFLAGS="$saved_CPPFLAGS")
+ else
+ AC_CHECK_HEADERS(pthread.h)
+ fi
+
+ pthread_lib="`echo $withval |cut -f2 -d, -s`"
+ if test "X" != "$pthread_lib"; then
+ saved_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$pthread_lib"
+ AC_CHECK_LIB(pthread, pthread_create,,LDFLAGS="$saved_LDFLAGS")
+ else
+ AC_CHECK_LIB(pthread, pthread_create)
+ fi
+ ;;
+esac
+
+dnl ----------------------------------------------------------------------
dnl How does one figure out the local time zone? Anyone know of a
dnl Posix way to do this?
dnl