summaryrefslogtreecommitdiffstats
path: root/src/hdf5-1-disable-configure-try-run.patch
blob: ec2b06d24631edf0fbb4af8c67496b43776f9ea8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
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