This file is part of MXE. See LICENSE.md for licensing information.

--- a/configure.ac	2012-12-03 08:59:14.540462389 +0100
+++ b/configure.ac	2012-12-03 09:14:00.188485595 +0100
@@ -586,70 +586,6 @@
   ## Change to the C++ language
   AC_LANG_PUSH(C++)
 
-  AC_MSG_CHECKING([if $CXX needs old style header files in includes])
-  AC_TRY_RUN([
-#include <iostream>
-
-int main(void) { return 0; }
-  ], [
-    echo no
-  ], [
-    echo yes
-    CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME"
-    AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME"
-  ])
-
-  AC_MSG_CHECKING([if $CXX can handle namespaces])
-  AC_TRY_RUN([
-namespace H5 {
-int fnord;
-}
-
-int main(void) {
-   using namespace H5;
-   fnord = 37;
-   return 0;
-} 
-  ], [
-     echo yes
-  ], [
-     echo no
-     CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE"
-     AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE"
-  ])
-
-  AC_MSG_CHECKING([if $CXX supports std])
-  AC_TRY_RUN([
-#include <string>
-
-using namespace std;
-
-int main(void) {
-   string myString("testing namespace std");
-   return 0;
-}
-  ], [
-     echo yes
-  ], [
-     echo no
-     CXXFLAGS="${CXXFLAGS} -DH5_NO_STD"
-     AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_STD"
-  ])
-
-  AC_MSG_CHECKING([if $CXX supports bool types])
-  AC_TRY_RUN([
-int main(void) {
-   bool flag;
-   return 0;
-}
-  ], [
-     echo yes
-  ], [
-     echo no
-     CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED"
-     AM_CXXFLAGS="${AM_CXXFLAGS} -DBOOL_NOTDEFINED"
-  ])
-
   AC_MSG_CHECKING([if $CXX has offsetof extension])
     AC_TRY_COMPILE([
   #include <stdio.h>
@@ -671,22 +607,6 @@
     AC_MSG_RESULT([yes]),
     AC_MSG_RESULT([no]))
 
-  AC_MSG_CHECKING([if $CXX can handle static cast])
-  AC_TRY_RUN([
-int main(void) {
-   float test_float;
-   int test_int;
-   test_float = 37.0;
-   test_int = static_cast <int> (test_float);
-   return 0;
-}
-  ], [
-    echo yes
-  ], [
-    echo no
-    CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST"
-    AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST"
-  ])
 else
   echo "no"
   CXX="no"
@@ -1424,24 +1344,7 @@
   ## Now actually test to see if we can create large files after we've
   ## checked for any needed defines.
   AC_MSG_CHECKING([if large (64-bit) files are supported on this system.])
-  AC_CACHE_VAL([hdf5_cv_have_lfs],
-    [AC_TRY_RUN([
-      #include <stdio.h>
-      #include <unistd.h>
-      #include <stdlib.h>
-      #include <fcntl.h>
-      #define BIG_FILE (off_t)0x80000000UL 
-      int main(void) {
-        int fd;
-        if ((fd=open("test.conf", O_RDWR|O_TRUNC|O_CREAT, 0666)) < 0) exit(1);
-        if (lseek(fd, BIG_FILE, SEEK_SET)!=BIG_FILE) exit(1);
-        if (5!=write(fd, "hello", (size_t)5)) exit(1);
-        if (lseek(fd, 2*BIG_FILE, SEEK_SET) != 2*BIG_FILE) exit(1);
-        if (5!=write(fd, "hello", (size_t)5)) exit(1);
-        if (unlink("test.conf") < 0) exit(1);
-        exit(0);
-      }
-    ],[hdf5_cv_have_lfs=yes],[hdf5_cv_have_lfs=no],)])
+  AC_CACHE_VAL([hdf5_cv_have_lfs], [hdf5_cv_have_lfs=yes])
 
   if test "X${hdf5_cv_have_lfs}" = "Xyes"; then
     AC_MSG_RESULT([yes])
@@ -2119,24 +2022,7 @@
 
 if test "$have_gettime" = "yes" -a "$have_struct_tz" = "yes"; then
    AC_MSG_CHECKING(whether gettimeofday() gives timezone)
-   AC_CACHE_VAL([hdf5_cv_gettimeofday_tz],
-       [AC_TRY_RUN([
-          #include <time.h>
-          #include <sys/time.h>
-          int main(void)
-          {
-             struct timeval tv;
-             struct timezone tz;
-             tz.tz_minuteswest = 7777;  /* Initialize to an unreasonable number */
-             tz.tz_dsttime = 7;
-             gettimeofday(&tv, &tz);
-                /* Check whether the function returned any value at all */
-             if(tz.tz_minuteswest == 7777 && tz.tz_dsttime == 7)
-                exit(1);
-             else exit (0);
-          }], 
-          [hdf5_cv_gettimeofday_tz=yes], 
-          [hdf5_cv_gettimeofday_tz=no])])
+   AC_CACHE_VAL([hdf5_cv_gettimeofday_tz], [hdf5_cv_gettimeofday_tz=no])
 
    if test ${hdf5_cv_gettimeofday_tz} = "yes"; then
       AC_MSG_RESULT([yes])
@@ -2221,30 +2107,7 @@
     ##                 return (-1)
     AC_MSG_CHECKING([if vsnprintf returns correct value])
 
-    AC_CACHE_VAL([hdf5_cv_vsnprintf_works],
-        AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-
-int test_vsnprintf(const char *fmt,...)
-{
-    va_list     ap;
-    char *s = malloc(16);
-    int ret;
-
-    va_start(ap, fmt);
-    ret=vsnprintf(s,16,"%s",ap);
-    va_end(ap);
-
-    return(ret!=42 ? 1 : 0);
-}
-
-int main(void)
-{
-    exit(test_vsnprintf("%s","A string that is longer than 16 characters"));
-}
-   ],[hdf5_cv_vsnprintf_works=yes],[hdf5_cv_vsnprintf_works=no],))
+    AC_CACHE_VAL([hdf5_cv_vsnprintf_works], [hdf5_cv_vsnprintf_works=yes])
 
        if test ${hdf5_cv_vsnprintf_works} = "yes"; then
           AC_MSG_RESULT([yes])
@@ -2330,26 +2193,7 @@
 ## LD_LIBRARY_PATH along with LDFLAGS or do it with the AC_TRY_RUN macro.
 ##
 AC_MSG_CHECKING([how to print long long])
-AC_CACHE_VAL([hdf5_cv_printf_ll], [
-LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $AM_LDFLAGS $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`"
-export LD_LIBRARY_PATH
-
-for hdf5_cv_printf_ll in l ll L q unknown; do
-   AC_TRY_RUN([
-     #include <stdio.h>
-     #include <stdlib.h>
-     #include <string.h>
-
-     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])
-done])
-
+AC_CACHE_VAL([hdf5_cv_printf_ll], [hdf5_cv_printf_ll=I64])
 AC_MSG_RESULT([%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u])
 AC_DEFINE_UNQUOTED([PRINTF_LL_WIDTH], ["$hdf5_cv_printf_ll"], 
                    [Width for printf() for type `long long' or `__int64', use `ll'])
@@ -2359,24 +2203,7 @@
 ## is supported on this system
 ##
 AC_MSG_CHECKING([Threads support 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],)])
-
+AC_CACHE_VAL([hdf5_cv_system_scope_threads], [hdf5_cv_system_scope_threads=yes])
 if test ${hdf5_cv_system_scope_threads} = "yes"; then
   AC_DEFINE([SYSTEM_SCOPE_THREADS], [1],
             [Define if your system supports pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM) call.])
@@ -3236,30 +3063,7 @@
 if test ${ac_cv_sizeof_long_double} = 0; then
    hdf5_cv_ldouble_to_integer_works=${hdf5_cv_ldouble_to_integer_works=no}
 else
-   AC_CACHE_VAL([hdf5_cv_ldouble_to_integer_works],
-        [AC_TRY_RUN([
-        int main(void)
-        {
-            void *align;
-            long double ld= 9701917572145405952.00L;
-            unsigned char v1;
-            short v2;
-            unsigned int v3;
-            int  ret = 0;
-
-            align = (void*)malloc(sizeof(long double));
-            memcpy(align, &ld, sizeof(long double));
-
-            /*For HU-UX11.00, there's floating exception(core dump) when doing some of casting
-             *from 'long double' to integers*/
-            v1=(unsigned char)(*((long double*)align));
-            v2=(short)(*((long double*)align));
-            v3=(unsigned int)(*((long double*)align));
-
-    done:
-            exit(ret);
-        }
-        ], [hdf5_cv_ldouble_to_integer_works=yes], [hdf5_cv_ldouble_to_integer_works=no],)])
+   AC_CACHE_VAL([hdf5_cv_ldouble_to_integer_works], [hdf5_cv_ldouble_to_integer_works=yes])
 fi
 
 if test ${hdf5_cv_ldouble_to_integer_works} = "yes"; then
@@ -3303,36 +3107,7 @@
 ##
 AC_MSG_CHECKING([if accurately converting unsigned long to float values])
 
-AC_CACHE_VAL([hdf5_cv_ulong_to_float_accurate],
-    [AC_TRY_RUN([
-    int main(void)
-    {
-        int           ret = 0;
-        unsigned long l1;
-        unsigned long l2;
-        unsigned long l3;
-        float f1;
-        float f2;
-        float f3;
-
-
-        if(sizeof(unsigned long)==8) {
-            l1 = 0xffffffffffffffffUL;
-            l2 = 0xffffffffffff0000UL;
-            l3 = 0xf000000000000000UL;
-
-            f1 = (float)l1;
-            f2 = (float)l2;
-            f3 = (float)l3;
-
-            if((f1 < 0) || (f2 < 0) || (f3 < 0))
-                ret = 1;
-        }
-
-done:
-        exit(ret);
-    }
-    ], [hdf5_cv_ulong_to_float_accurate=yes], [hdf5_cv_ulong_to_float_accurate=no],)])
+AC_CACHE_VAL([hdf5_cv_ulong_to_float_accurate], [hdf5_cv_ulong_to_float_accurate=yes])
 
 if test ${hdf5_cv_ulong_to_float_accurate} = "yes"; then
   AC_DEFINE([ULONG_TO_FLOAT_ACCURATE], [1],
@@ -3353,71 +3128,7 @@
 ##
 AC_MSG_CHECKING([if accurately converting unsigned long long to floating-point values])
 
-if test ${host_os_novers} = "solaris2.x"; then
-    AC_CACHE_VAL([hdf5_cv_ulong_to_fp_bottom_bit_accurate],
-    [AC_TRY_RUN([
-    int main(void)
-    {
-        unsigned long l1;
-        unsigned long l2;
-        unsigned long l3;
-        unsigned long l4;
-        unsigned long long ld1;
-        unsigned long long ld2;
-        unsigned long long ld3;
-        unsigned long long ld4;
-        double        d1, d2, d3, d4;
-        unsigned char s[8];
-        int           ret = 0;
-
-        if(sizeof(unsigned long)==8) {
-            l1 = 0xf000000000000b00UL; /*Round-down case*/
-            l2 = 0xf000000000000401UL; /*Round-up case*/
-            l3 = 0xf000000000000400UL; /*Round-down case*/
-            l4 = 0xf000000000000c00UL; /*Round-up case*/
-            
-            d1 = (double)l1;
-            d2 = (double)l2;
-            d3 = (double)l3;
-            d4 = (double)l4;
-        } else if(sizeof(unsigned long long)==8) { 
-            ld1 = 0xf000000000000b00ULL; /*Round-down case*/
-            ld2 = 0xf000000000000401ULL; /*Round-up case*/
-            ld3 = 0xf000000000000400ULL; /*Round-down case*/
-            ld4 = 0xf000000000000c00ULL; /*Round-up case*/
-            
-            d1 = (double)ld1;
-            d2 = (double)ld2;
-            d3 = (double)ld3;
-            d4 = (double)ld4;
-        } else {
-            ret = 1;
-            goto done;
-        }
-        
-        memcpy(s, &d1, 8);
-        if(s[7]!=1)
-            ret = 1;
-
-        memcpy(s, &d2, 8);
-        if(s[7]!=1)
-            ret = 1;
-
-        memcpy(s, &d3, 8);
-        if(s[7]!=0)
-            ret = 1;
-
-        memcpy(s, &d4, 8);
-        if(s[7]!=2)
-            ret = 1;
-
-done:
-        exit(ret);
-    }
-    ], [hdf5_cv_ulong_to_fp_bottom_bit_accurate=yes], [hdf5_cv_ulong_to_fp_bottom_bit_accurate=no],)])
-else
-    AC_CACHE_VAL([hdf5_cv_ulong_to_fp_bottom_bit_accurate], [hdf5_cv_ulong_to_fp_bottom_bit_accurate=yes])
-fi
+AC_CACHE_VAL([hdf5_cv_ulong_to_fp_bottom_bit_accurate], [hdf5_cv_ulong_to_fp_bottom_bit_accurate=yes])
 
 if test ${hdf5_cv_ulong_to_fp_bottom_bit_accurate} = "yes"; then
   AC_DEFINE([ULONG_TO_FP_BOTTOM_BIT_ACCURATE], [1],
@@ -3436,25 +3147,7 @@
 ##
 AC_MSG_CHECKING([if accurately roundup converting floating-point to unsigned long long values])
 
-AC_CACHE_VAL([hdf5_cv_fp_to_ullong_accurate],
-    [AC_TRY_RUN([
-    int main(void)
-    {
-        float  f = 111.60f;
-        double d = 222.55L;
-        unsigned long long l1 = (unsigned long long)f;
-        unsigned long long l2 = (unsigned long long)d;
-        int           ret = 0;
-
-        if(l1 == 112) 
-            ret = 1;
-        if(l2 == 223) 
-            ret = 1;
-
-done:
-        exit(ret);
-    }
-    ], [hdf5_cv_fp_to_ullong_accurate=yes], [hdf5_cv_fp_to_ullong_accurate=no],)])
+AC_CACHE_VAL([hdf5_cv_fp_to_ullong_accurate], [hdf5_cv_fp_to_ullong_accurate=yes])
 
 if test ${hdf5_cv_fp_to_ullong_accurate} = "yes"; then
   AC_DEFINE([FP_TO_ULLONG_ACCURATE], [1],
@@ -3473,32 +3166,7 @@
 ##
 AC_MSG_CHECKING([if right maximum converting floating-point to unsigned long long values])
 
-AC_CACHE_VAL([hdf5_cv_fp_to_ullong_right_maximum],
-    [AC_TRY_RUN([
-    int main(void)
-    {
-        float  f = 9701917572145405952.00f;
-        double d1 = 9701917572145405952.00L;
-        long double d2 = 9701917572145405952.00L;
-        double d3 = 2e40L;
-        unsigned long long l1 = (unsigned long long)f;
-        unsigned long long l2 = (unsigned long long)d1;
-        unsigned long long l3 = (unsigned long long)d2;
-        unsigned long long l4;
-        unsigned long long l5 = 0x7fffffffffffffffULL;
-        int           ret = 0;
-
-        if(l1 <= l5 || l2 <= l5 || l3 <= l5) 
-            ret = 1;
-
-        l4 = (unsigned long long)d3;
-        if(l4 <= l5)
-            ret = 1;
-
-done:
-        exit(ret);
-    }
-    ], [hdf5_cv_fp_to_ullong_right_maximum=yes], [hdf5_cv_fp_to_ullong_right_maximum=no],)])
+AC_CACHE_VAL([hdf5_cv_fp_to_ullong_right_maximum], [hdf5_cv_fp_to_ullong_right_maximum=yes])
 
 if test ${hdf5_cv_fp_to_ullong_right_maximum} = "yes"; then
   AC_DEFINE([FP_TO_ULLONG_RIGHT_MAXIMUM], [1],
@@ -3518,22 +3186,7 @@
 if test ${ac_cv_sizeof_long_double} = 0; then
    hdf5_cv_ldouble_to_uint_accurate=${hdf5_cv_ldouble_to_uint_accurate=no}
 else
-   AC_CACHE_VAL([hdf5_cv_ldouble_to_uint_accurate],
-        [AC_TRY_RUN([
-        int main(void)
-        {
-            long double ld = 2733248032.9183987530L;
-            unsigned int i;
-            int           ret = 0;
-
-            i = (unsigned int)ld;
-            if(i!=2733248032 && i!=2733248031 && i!=2733248033)
-                ret = 1;
-
-    done:
-            exit(ret);
-        }
-        ], [hdf5_cv_ldouble_to_uint_accurate=yes], [hdf5_cv_ldouble_to_uint_accurate=no],)])
+   AC_CACHE_VAL([hdf5_cv_ldouble_to_uint_accurate], [hdf5_cv_ldouble_to_uint_accurate=yes])
 fi
 
 if test ${hdf5_cv_ldouble_to_uint_accurate} = "yes"; then
@@ -3592,82 +3245,7 @@
 if test ${ac_cv_sizeof_long_double} = 0; then
    hdf5_cv_ullong_to_ldouble_precision=${hdf5_cv_ullong_to_ldouble_precision=no}
 else
-   AC_CACHE_VAL([hdf5_cv_ullong_to_ldouble_precision],
-        [AC_TRY_RUN([
-        #include <stdlib.h>
-        #include <string.h>
-
-        int main(void)
-        {
-            /* General variables */
-            int endian;
-            int tst_value = 1; 
-            int ret = 0;
-
-            /* For FreeBSD */
-            unsigned long long l = 0xa601e80bda85fcefULL;
-            long double ld;
-            unsigned char *c1, *c2;
-            size_t size;
-
-            /* For Cygwin */
-            unsigned long long l_cyg = 0xfffffffffffffff0ULL;
-            long double ld_cyg;
-            unsigned char *c2_cyg;
-            size_t size_cyg;
-            
-            
-            /* Determine this system's endianess */
-            c1 = (unsigned char*)calloc(1, sizeof(int));
-            memcpy((void*)c1, &tst_value, sizeof(int));
-            if(c1[0]==1)
-                endian = 0;  /* little endian */
-            else 
-                endian = 1;  /* big endian */
-            
-            /* For FreeBSD */     
-            size = sizeof(long double);
-            memset(&ld, 0, size); 
-            ld = (long double)l;
-
-            c2 = (unsigned char*)calloc(1, size);
-            memcpy((void*)c2, &ld, size);
-
-            /* Test if the last 2 bytes of mantissa are lost.  Mainly for FreeBSD on Intel
-             * architecture(sleipnir) where it happens. */        
-            /*if(endian==0 && c2[0]==0 && c2[1]==0)*/ /*little endian*/
-            if(endian==0 && c2[0]==0) { /*little endian*/
-                ret = 1;
-                goto done;
-            }
-
-            /* For Cygwin */
-            size_cyg = sizeof(long double);
-            memset(&ld_cyg, 0, size); 
-            ld_cyg = (long double)l_cyg;
-
-            c2_cyg = (unsigned char*)calloc(1, size_cyg);
-            memcpy((void*)c2_cyg, &ld_cyg, size_cyg);
-
-            /* Test if the last 4 bytes(roughly) of mantissa are rounded up.  Mainly for Cygwin
-             * where the values like 0xffffffffffffffff,  0xfffffffffffffffe, ..., 
-             * 0xfffffffffffff000 ... are rounded up as 0x0000403f8000000000000000 
-             * instead of 0x0000403effffffffffffffff, 0x0000403efffffffffffffffe, ..., 
-             * 0x0000403efffffffffffff000 ...
-             */    
-            if(endian==0 && c2_cyg[0]==0 && c2_cyg[1]==0 && c2_cyg[2]==0 && c2_cyg[3]==0)
-                ret = 1;
-
-    done:
-            if(c1)
-                free(c1);
-            if(c2)
-                free(c2);
-            if(c2_cyg)
-                free(c2_cyg);
-            exit(ret);
-        }
-        ], [hdf5_cv_ullong_to_ldouble_precision=yes], [hdf5_cv_ullong_to_ldouble_precision=no],)])
+   AC_CACHE_VAL([hdf5_cv_ullong_to_ldouble_precision], [hdf5_cv_ullong_to_ldouble_precision=yes])
 fi
 
 if test ${hdf5_cv_ullong_to_ldouble_precision} = "yes"; then
@@ -3687,19 +3265,7 @@
 ##
 AC_MSG_CHECKING([if overflows normally converting floating-point to integer values])
 
-AC_CACHE_VAL([hdf5_cv_fp_to_integer_overflow_works],
-    [AC_TRY_RUN([
-    int main(void)
-    {
-        float  f = 2147483648.0f;
-        int    i;
-
-        i = (int)f;
-
-done:
-        exit(0);
-    }
-    ], [hdf5_cv_fp_to_integer_overflow_works=yes], [hdf5_cv_fp_to_integer_overflow_works=no],)])
+AC_CACHE_VAL([hdf5_cv_fp_to_integer_overflow_works], [hdf5_cv_fp_to_integer_overflow_works=yes])
 
 if test ${hdf5_cv_fp_to_integer_overflow_works} = "yes"; then
   AC_DEFINE([FP_TO_INTEGER_OVERFLOW_WORKS], [1],
@@ -3723,62 +3289,7 @@
 if test ${ac_cv_sizeof_long_double} = 0; then
    hdf5_cv_ldouble_to_long_special=${hdf5_cv_ldouble_to_long_special=no}
 else
-   AC_CACHE_VAL([hdf5_cv_ldouble_to_long_special],
-        [AC_TRY_RUN([
-        int main(void)
-        {
-            long double         ld = 20041683600089727.779961L;
-            long                ll;
-            unsigned long       ull;
-            unsigned char       s[16];
-            unsigned char       s2[8];
-            int                 ret = 1;
-            
-            if(sizeof(long double) == 16 && sizeof(long) == 8) {
-                /*make sure the long double type has 16 bytes in size and 
-                 * 11 bits of exponent.  If it is,
-                 *the bit sequence should be like below.  It's not 
-                 *a decent way to check but this info isn't available. */   
-                memcpy(s, &ld, 16);
-                if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 &&
-                    s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 &&
-                    s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) {
-
-                    /* Assign the hexadecimal value of long double type. */
-                    s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3;
-                    s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0;
-                    s[8]=0xbf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c;
-                    s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20;
-
-                    memcpy(&ld, s, 16);
-
-                    ll = (long)ld;
-                    memcpy(s2, &ll, 8);
-
-                    /* The library's algorithm converts it to 0x 00 47 33 ce 17 af 22 82
-                     * and gets wrong value 20041683600089730 on the IBM Power6 Linux.
-                     * But the IBM Power6 Linux converts it to 0x00 47 33 ce 17 af 22 7f
-                     * and gets the correct value 20041683600089727.  It uses some special
-                     * algorithm.  We're going to define the macro and skip the test until
-                     * we can figure out how they do it. */
-                    if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce &&
-                       s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f)
-                        ret = 0;
-
-                    ull = (unsigned long)ld;
-                    memcpy(s2, &ull, 8);
-
-                    /* The unsigned long is the same as signed long. */
-                    if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce &&
-                       s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f)
-                        ret = 0;
-                }    
-            }   
-            
-    done:
-            exit(ret);
-        }
-        ], [hdf5_cv_ldouble_to_long_special=yes], [hdf5_cv_ldouble_to_long_special=no],)])
+   AC_CACHE_VAL([hdf5_cv_ldouble_to_long_special], [hdf5_cv_ldouble_to_long_special=no])
 fi
 
 if test ${hdf5_cv_ldouble_to_long_special} = "yes"; then
@@ -3802,64 +3313,7 @@
 if test ${ac_cv_sizeof_long_double} = 0; then
    hdf5_cv_long_to_ldouble_special=${hdf5_cv_long_to_ldouble_special=no}
 else
-   AC_CACHE_VAL([hdf5_cv_long_to_ldouble_special],
-        [AC_TRY_RUN([
-        int main(void)
-        {
-            long double         ld;
-            long                ll;
-            unsigned long       ull;
-            unsigned char       s[16];
-            int                 flag=0, ret=1;
-        
-            /*Determine if long double has 16 byte in size, 11 bit exponent, and
-             *the bias is 0x3ff */ 
-            if(sizeof(long double) == 16) { 
-                ld = 1.0L;
-                memcpy(s, &ld, 16);
-                if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
-                    s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00) 
-                    flag = 1; 
-            }
-             
-            if(flag==1 && sizeof(long)==8) {
-                ll = 0x003fffffffffffffL;
-                ld = (long double)ll;
-                memcpy(s, &ld, 16);
-                /* The library converts the value to 0x434fffffffffffff8000000000000000.
-                 * In decimal it is 18014398509481982.000000, one value short of the original.
-                 * The IBM Power6 Linux converts it to 0x4350000000000000bff0000000000000.
-                 * The value is correct in decimal. It uses some special
-                 * algorithm.  We're going to define the macro and skip the test until
-                 * we can figure out how they do it. */
-                if(s[0]==0x43 && s[1]==0x50 && s[2]==0x00 && s[3]==0x00 &&
-                    s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 &&
-                    s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
-                    s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
-                    ret = 0;
-            }        
-            if(flag==1 && sizeof(unsigned long)==8) {
-                ull = 0xffffffffffffffffUL;
-                ld = (long double)ull;
-                memcpy(s, &ld, 16);
-                /* Use a different value from signed long to test. The problem is the same
-                 * for both long and unsigned long. The value is 18446744073709551615.
-                 * The library converts the value to 0x43effffffffffffffe000000000000000.
-                 * In decimal it's 18446744073709548544.000000, very different from the original.
-                 * The IBM Power6 Linux converts it to 0x43f0000000000000bff0000000000000.
-                 * The value is correct in decimal. It uses some special
-                 * algorithm.  We're going to define the macro and skip the test until
-                 * we can figure out how they do it. */
-                if(s[0]==0x43 && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
-                    s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 &&
-                    s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
-                    s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
-                    ret = 0;
-            }        
-    done:
-            exit(ret);
-        }
-        ], [hdf5_cv_long_to_ldouble_special=yes], [hdf5_cv_long_to_ldouble_special=no],)])
+   AC_CACHE_VAL([hdf5_cv_long_to_ldouble_special], [hdf5_cv_long_to_ldouble_special=no])
 fi
 
 if test ${hdf5_cv_long_to_ldouble_special} = "yes"; then
@@ -3884,45 +3338,7 @@
 if test ${ac_cv_sizeof_long_double} = 0; then
    hdf5_cv_ldouble_to_llong_accurate=${hdf5_cv_ldouble_to_llong_accurate=no}
 else
-   AC_CACHE_VAL([hdf5_cv_ldouble_to_llong_accurate],
-        [AC_TRY_RUN([
-        int main(void)
-        {
-            long double         ld = 20041683600089727.779961L;
-            long long           ll;
-            unsigned long long  ull;
-            unsigned char       s[16];
-            int                 ret = 0;
-            
-            if(sizeof(long double) == 16) {
-                /*make sure the long double type is the same as the failing type 
-                 *which has 16 bytes in size and 11 bits of exponent.  If it is,
-                 *the bit sequence should be like below.  It's not 
-                 *a decent way to check but this info isn't available. */   
-                memcpy(s, &ld, 16);
-                if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 &&
-                    s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 &&
-                    s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) {
-
-                    /*slightly adjust the bit sequence (s[8]=0xdf).  The converted
-                     *values will go wild on Mac OS 10.4 and IRIX64 6.5.*/ 
-                    s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3;
-                    s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0;
-                    s[8]=0xdf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c;
-                    s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20;
-
-                    memcpy(&ld, s, 16);
-                    ll = (long long)ld;
-                    ull = (unsigned long long)ld;
-                    
-                    if(ll != 20041683600089728 || ull != 20041683600089728)
-                        ret = 1;
-                }    
-            }    
-    done:
-            exit(ret);
-        }
-        ], [hdf5_cv_ldouble_to_llong_accurate=yes], [hdf5_cv_ldouble_to_llong_accurate=no],)])
+   AC_CACHE_VAL([hdf5_cv_ldouble_to_llong_accurate], [hdf5_cv_ldouble_to_llong_accurate=yes])
 fi
 
 if test ${hdf5_cv_ldouble_to_llong_accurate} = "yes"; then
@@ -3946,49 +3362,7 @@
 if test ${ac_cv_sizeof_long_double} = 0; then
    hdf5_cv_llong_to_ldouble_correct=${hdf5_cv_llong_to_ldouble_correct=no}
 else
-   AC_CACHE_VAL([hdf5_cv_llong_to_ldouble_correct],
-        [AC_TRY_RUN([
-        int main(void)
-        {
-            long double         ld;
-            long long           ll;
-            unsigned long long  ull;
-            unsigned char       s[16];
-            int                 flag=0, ret=0;
-        
-            /*Determine if long double has 16 byte in size, 11 bit exponent, and
-             *the bias is 0x3ff */ 
-            if(sizeof(long double) == 16) { 
-                ld = 1.0L;
-                memcpy(s, &ld, 16);
-                if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
-                    s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00) 
-                    flag = 1; 
-            }
-             
-            if(flag==1 && sizeof(long long)==8) {
-                ll = 0x01ffffffffffffffLL;
-                ld = (long double)ll;
-                memcpy(s, &ld, 16);
-                /*Check if the bit sequence is as supposed to be*/
-                if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff ||
-                    s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff ||
-                    s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00)
-                    ret = 1;
-            }        
-            if(flag==1 && sizeof(unsigned long long)==8) {
-                ull = 0x01ffffffffffffffULL;
-                ld = (long double)ull;
-                memcpy(s, &ld, 16);
-                if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff ||
-                    s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff ||
-                    s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00)
-                    ret = 1;
-            }        
-    done:
-            exit(ret);
-        }
-        ], [hdf5_cv_llong_to_ldouble_correct=yes], [hdf5_cv_llong_to_ldouble_correct=no],)])
+   AC_CACHE_VAL([hdf5_cv_llong_to_ldouble_correct], [hdf5_cv_llong_to_ldouble_correct=yes])
 fi
 
 if test ${hdf5_cv_llong_to_ldouble_correct} = "yes"; then