diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-03-09 12:50:27 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-03-09 12:50:27 (GMT) |
commit | 2f77d8c5ea924237758a1b35e52e4ba1f86d447b (patch) | |
tree | b7107b3548017f3f77898ffb6fbe9826af9bc80e | |
parent | 42eee37a261902ebb2bf65b291512a0dddd6b081 (diff) | |
download | hdf5-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
-rw-r--r-- | configure.ac | 36 |
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], |