summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-02-10 15:38:52 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-02-10 15:38:52 (GMT)
commit738661ab9f409b8d961ba1402d6c4dd5f99ecb43 (patch)
tree01f97a9d10bc3bbe519366197b475efdae2cc8d5 /configure
parent168d67dbd20923feef30fb76c6b569ef2e5add4a (diff)
downloadhdf5-738661ab9f409b8d961ba1402d6c4dd5f99ecb43.zip
hdf5-738661ab9f409b8d961ba1402d6c4dd5f99ecb43.tar.gz
hdf5-738661ab9f409b8d961ba1402d6c4dd5f99ecb43.tar.bz2
[svn-r6386] Purpose:
Bug fix Description: The "system scope" for threads isn't supported on all platforms. Solution: Add detection of this feature to the configure script and check for "H5_HAVE_SYSTEM_SCOPE_THREADS" in the appropriate places. Platforms tested: modi4 w/threadsafe
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure67
1 files changed, 67 insertions, 0 deletions
diff --git a/configure b/configure
index c0a7674..7a1ebdf 100755
--- a/configure
+++ b/configure
@@ -29493,6 +29493,73 @@ else
echo "${ECHO_T}no" >&6
fi
+echo "$as_me:$LINENO: checking Threads support system scope" >&5
+echo $ECHO_N "checking Threads support system scope... $ECHO_C" >&6
+if test "${hdf5_cv_system_scope_threads+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <pthread.h>
+#endif
+
+int main(void)
+{
+ pthread_attr_t attribute;
+ int ret;
+
+ pthread_attr_init(&attribute);
+ ret=pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM);
+ exit(ret==0 ? 0 : 1);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ hdf5_cv_system_scope_threads=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+hdf5_cv_system_scope_threads=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+
+
+if test ${hdf5_cv_system_scope_threads} = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define SYSTEM_SCOPE_THREADS 1
+_ACEOF
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
for ac_header in gpfs.h
do