From 2845400b6d74c9ab48ea8d875f3873445aa55d38 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Fri, 27 Mar 2015 21:21:32 -0500 Subject: [svn-r26639] Description: Switch AC_TRY_RUN macros to AC_RUN_IFELSE macros. Tested on: MacOSX/64 10.10.2 (amazon) w/serial & parallel (h5committest not required on this branch) --- configure.ac | 50 +++++++++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/configure.ac b/configure.ac index fb1bbb9..8dd3a78 100644 --- a/configure.ac +++ b/configure.ac @@ -1409,18 +1409,18 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then AC_SUBST([LL_PATH]) LL_PATH="$LD_LIBRARY_PATH" AC_CACHE_VAL([hdf5_cv_szlib_can_encode], - [AC_TRY_RUN([ - #include - - int main(void) - { + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM([ + #include "szlib.h" + ],[[ /* SZ_encoder_enabled returns 1 if encoder is present */ - if(SZ_encoder_enabled() == 1) - exit(0); - else - exit(1); - } - ], [hdf5_cv_szlib_can_encode=yes], [hdf5_cv_szlib_can_encode=no],)]) + if(SZ_encoder_enabled() == 1) + exit(0); + else + exit(1); + ]])] + , [hdf5_cv_szlib_can_encode=yes], [hdf5_cv_szlib_can_encode=no],)] + ) AC_DEFINE([HAVE_FILTER_SZIP], [1], [Define if support for szip filter is enabled]) @@ -1601,15 +1601,12 @@ if test "X$THREADSAFE" = "Xyes"; then #include #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])]) @@ -1804,19 +1801,18 @@ AC_MSG_CHECKING([how to print long long]) AC_CACHE_VAL([hdf5_cv_printf_ll], [ for hdf5_cv_printf_ll in l ll L q unknown; do - AC_TRY_RUN([ - #include - #include - #include - - int main(void) - { - char *s = malloc(128); - long long x = (long long)1048576 * (long long)1048576; - sprintf(s,"%${hdf5_cv_printf_ll}d",x); - exit(strcmp(s,"1099511627776")); - } - ], [break],,[continue]) + AC_RUN_IFELSE( + [AC_LANG_PROGRAM([ + #include + #include + #include + ],[[ + char *s = malloc(128); + long long x = (long long)1048576 * (long long)1048576; + sprintf(s,"%${hdf5_cv_printf_ll}d",x); + exit(strcmp(s,"1099511627776")); + ]])] + , [break],,[continue]) done]) AC_MSG_RESULT([%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u]) -- cgit v0.12