mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[svn-r2274] Hacked to detect pthreads on FreeBSD and add correct compilation options.
This commit is contained in:
parent
670770900a
commit
f4b618e5e1
13
configure.in
13
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)
|
||||
|
Loading…
Reference in New Issue
Block a user