summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-03-09 12:50:27 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-03-09 12:50:27 (GMT)
commit2f77d8c5ea924237758a1b35e52e4ba1f86d447b (patch)
treeb7107b3548017f3f77898ffb6fbe9826af9bc80e /configure.ac
parent42eee37a261902ebb2bf65b291512a0dddd6b081 (diff)
downloadhdf5-2f77d8c5ea924237758a1b35e52e4ba1f86d447b.zip
hdf5-2f77d8c5ea924237758a1b35e52e4ba1f86d447b.tar.gz
hdf5-2f77d8c5ea924237758a1b35e52e4ba1f86d447b.tar.bz2
[svn-r26399] Converted an AC_TRY_RUN macro to an AC_RUN_IFELSE macro.
Used with checking Pthread scope. Part of: HDFFV-9087 Tested on: Local Linux w/ thread-safety enabled
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac36
1 files changed, 19 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index eacc078..3eb6ec2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1721,7 +1721,7 @@ if test "X$THREADSAFE" = "Xyes"; then
## Check if pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM)
## is supported on this system
##
- ## Unfortunately, this probably needs to be an AC_TRY_RUN since
+ ## Unfortunately, this probably needs to be an AC_RUN_IFELSE since
## it's impossible to determine if PTHREAD_SCOPE_SYSTEM is
## supported a priori. POSIX.1-2001 requires that a conformant
## system need only support one of SYSTEM or PROCESS scopes.
@@ -1730,22 +1730,24 @@ if test "X$THREADSAFE" = "Xyes"; then
## hand-hack the config file if you know otherwise.
AC_MSG_CHECKING([Pthreads supports system scope])
AC_CACHE_VAL([hdf5_cv_system_scope_threads],
- [AC_TRY_RUN([
- #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);
- }
- ], [hdf5_cv_system_scope_threads=yes], [hdf5_cv_system_scope_threads=no], [hdf5_cv_system_scope_threads=no])])
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([
+ #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);
+ }
+ ])]
+ , [hdf5_cv_system_scope_threads=yes], [hdf5_cv_system_scope_threads=no], [hdf5_cv_system_scope_threads=no])])
if test ${hdf5_cv_system_scope_threads} = "yes"; then
AC_DEFINE([SYSTEM_SCOPE_THREADS], [1],