Source
87
87
AC_CANONICAL_HOST
88
88
AC_SUBST([CPPFLAGS])
89
89
90
90
dnl H5_CFLAGS (and company) are for CFLAGS that should be used on HDF5, but
91
91
dnl not exported to h5cc (or h5fc, etc.)
92
92
AC_SUBST([H5_CFLAGS])
93
93
AC_SUBST([H5_CPPFLAGS])
94
94
AC_SUBST([H5_FCFLAGS])
95
95
AC_SUBST([H5_CXXFLAGS])
96
96
97
+
dnl AM_CFLAGS (and company) are for CFLAGS that should be used on HDF5,
98
+
dnl and WILL be exported to h5cc (or h5fc, etc) if set by configure.
99
+
AC_SUBST([AM_CFLAGS])
100
+
AC_SUBST([AM_FCFLAGS])
101
+
AC_SUBST([AM_CXXFLAGS])
102
+
AC_SUBST([AM_CPPFLAGS])
103
+
AC_SUBST([AM_LDFLAGS])
104
+
97
105
dnl Make sure flags are set to something (otherwise macros may set them later).
106
+
AM_CFLAGS="${AM_CFLAGS}"
107
+
AM_CXXFLAGS="${AM_CXXFLAGS}"
108
+
AM_FCFLAGS="${AM_FCFLAGS}"
109
+
AM_CPPFLAGS="${AM_CPPFLAGS}"
110
+
AM_LDFLAGS="${AM_LDFLAGS}"
98
111
CFLAGS="${CFLAGS}"
99
-
CPPFLAGS="${CPPFLAGS}"
100
112
CXXFLAGS="${CXXFLAGS}"
101
113
FCFLAGS="${FCFLAGS}"
114
+
CPPFLAGS="${CPPFLAGS}"
115
+
LDFLAGS="${LDFLAGS}"
116
+
117
+
dnl Configure will need to alter LDFLAGS and CPPFLAGS in order for
118
+
dnl various checks to work correctly. Save the user's value here so it
119
+
dnl can be restored once all configure checks are complete.
120
+
saved_user_LDFLAGS="$LDFLAGS"
121
+
saved_user_CPPFLAGS="$CPPFLAGS"
102
122
103
123
dnl Different compilers may need default libraries. They are specified in
104
124
dnl the config/* files, so we put this statement here so that it'll be
105
125
dnl set by the code which follows...
106
126
dnl
107
127
DEFAULT_LIBS=""
108
128
109
129
dnl Support F9X variable to define Fortran compiler if FC variable is
110
130
dnl not used. This should be deprecated in the future.
111
131
if test "x" = "x$FC"; then
335
355
AC_SUBST([HADDR_T])
336
356
AC_SUBST([HSIZE_T])
337
357
AC_SUBST([HSSIZE_T])
338
358
AC_SUBST([HID_T])
339
359
AC_SUBST([SIZE_T])
340
360
AC_SUBST([OBJECT_NAMELEN_DEFAULT_F])
341
361
342
362
dnl --------------------------------------------------------------------
343
363
dnl General Fortran flags
344
364
dnl
345
-
FCFLAGS="${FCFLAGS} ${FFLAGS}"
365
+
AM_FCFLAGS="${AM_FCFLAGS} ${AM_FFLAGS}"
346
366
347
367
dnl --------------------------------------------------------------------
348
368
dnl Fortran source extention
349
369
dnl
350
370
AC_FC_SRCEXT([f90])
351
371
352
372
AC_SUBST([F9XSUFFIXFLAG])
353
373
AC_SUBST([FSEARCH_DIRS])
354
374
355
375
dnl --------------------------------------------------------------------
367
387
AC_LANG_PUSH(Fortran)
368
388
369
389
dnl --------------------------------------------------------------------
370
390
dnl Define wrappers for the C compiler to use Fortran function names
371
391
dnl
372
392
AC_FC_WRAPPERS
373
393
374
394
dnl --------------------------------------------------------------------
375
395
dnl See if the compiler will support the "-I." option
376
396
dnl
377
-
dnl FCFLAGS_saved=$FCFLAGS
378
-
dnl FCFLAGS="${FCFLAGS} -I."
397
+
dnl AM_FCFLAGS_saved=$AM_FCFLAGS
398
+
dnl AM_FCFLAGS="${AM_FCFLAGS} -I."
379
399
380
400
dnl AC_MSG_CHECKING(if compiler supports -I. option)
381
401
dnl AC_TRY_FCOMPILE([
382
402
dnl program conftest
383
403
dnl end
384
404
dnl ], AC_MSG_RESULT(yes),
385
405
dnl AC_MSG_RESULT(no)
386
-
dnl FCFLAGS="$FCFLAGS_saved")
406
+
dnl AM_FCFLAGS="$AM_FCFLAGS_saved")
387
407
388
408
dnl --------------------------------------------------------------------
389
409
dnl See if the fortran compiler supports the intrinsic function "SIZEOF"
390
410
391
411
AC_MSG_CHECKING([if Fortran compiler supports intrinsic SIZEOF])
392
412
AC_TRY_RUN([
393
413
PROGRAM main
394
414
i = sizeof(x)
395
415
END PROGRAM
396
416
], [AC_MSG_RESULT(yes)
464
484
465
485
AC_MSG_CHECKING([if $CXX needs old style header files in includes])
466
486
AC_TRY_RUN([
467
487
#include <iostream>
468
488
469
489
int main(void) { return 0; }
470
490
], [
471
491
echo no
472
492
], [
473
493
echo yes
474
-
CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME"
494
+
AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME"
475
495
])
476
496
477
497
AC_MSG_CHECKING([if $CXX can handle namespaces])
478
498
AC_TRY_RUN([
479
499
namespace H5 {
480
500
int fnord;
481
501
}
482
502
483
503
int main(void) {
484
504
using namespace H5;
485
505
fnord = 37;
486
506
return 0;
487
507
}
488
508
], [
489
509
echo yes
490
510
], [
491
511
echo no
492
-
CXXFLAGS="${CXXFLAGS} -DH5_NO_NAMESPACE"
512
+
AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_NAMESPACE"
493
513
])
494
514
495
515
AC_MSG_CHECKING([if $CXX supports std])
496
516
AC_TRY_RUN([
497
517
#include <string>
498
518
499
519
using namespace std;
500
520
501
521
int main(void) {
502
522
string myString("testing namespace std");
503
523
return 0;
504
524
}
505
525
], [
506
526
echo yes
507
527
], [
508
528
echo no
509
-
CXXFLAGS="${CXXFLAGS} -DH5_NO_STD"
529
+
AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_STD"
510
530
])
511
531
512
532
AC_MSG_CHECKING([if $CXX supports bool types])
513
533
AC_TRY_RUN([
514
534
int main(void) {
515
535
bool flag;
516
536
return 0;
517
537
}
518
538
], [
519
539
echo yes
520
540
], [
521
541
echo no
522
-
CXXFLAGS="${CXXFLAGS} -DBOOL_NOTDEFINED"
542
+
AM_CXXFLAGS="${AM_CXXFLAGS} -DBOOL_NOTDEFINED"
523
543
])
524
544
525
545
AC_MSG_CHECKING([if $CXX has offsetof extension])
526
546
AC_TRY_COMPILE([
527
547
#include <stdio.h>
528
548
#include <stddef.h>
529
549
],[
530
550
struct index_st
531
551
{
532
552
unsigned char type;
549
569
float test_float;
550
570
int test_int;
551
571
test_float = 37.0;
552
572
test_int = static_cast <int> (test_float);
553
573
return 0;
554
574
}
555
575
], [
556
576
echo yes
557
577
], [
558
578
echo no
559
-
CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST"
579
+
AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST"
560
580
])
561
581
else
562
582
echo "no"
563
583
CXX="no"
564
584
fi
565
585
566
586
dnl Change back to the C language
567
587
AC_LANG_POP(C++)
568
588
569
589
dnl ----------------------------------------------------------------------
867
887
868
888
if (${FC} -V 2>&1 | grep '^pgf90') > /dev/null; then
869
889
H5_FORTRAN_SHARED="no"
870
890
fi
871
891
872
892
if (${FC} -V 2>&1 | grep '^Intel(R) Fortran') > /dev/null; then
873
893
if (${FC} -v 2>&1 | grep '^Version 8.') > /dev/null; then
874
894
H5_FORTRAN_SHARED="no"
875
895
else
876
896
dnl echo 'adding fortran compiler flag needed for building shared libraries'
877
-
FCFLAGS="${FCFLAGS} -fPIC"
897
+
AM_FCFLAGS="${AM_FCFLAGS} -fPIC"
878
898
fi
879
899
fi
880
900
if (${FC} +version 2>&1 | grep '^HP F90') > /dev/null; then
881
901
H5_FORTRAN_SHARED="no"
882
902
fi
883
903
884
904
if (${FC} -V 2>&1 | grep '^Absoft') > /dev/null; then
885
905
H5_FORTRAN_SHARED="no"
886
906
fi
887
907
1269
1289
1270
1290
if test ${MAJOR_VER} -gt 2 -o ${MAJOR_VER} -eq 2 -a ${MINOR_VER} -ge 4; then
1271
1291
LINUX_LFS="yes"
1272
1292
fi
1273
1293
;;
1274
1294
esac
1275
1295
1276
1296
AC_MSG_CHECKING([for large file support mode on Linux])
1277
1297
if test "X$LINUX_LFS" = "Xyes"; then
1278
1298
AC_MSG_RESULT([enabled])
1279
-
CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS"
1299
+
AM_CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $AM_CPPFLAGS"
1280
1300
else
1281
1301
AC_MSG_RESULT([disabled])
1282
1302
fi
1283
1303
1284
1304
dnl Add POSIX support on Linux systems, so <features.h> defines
1285
1305
dnl __USE_POSIX, which is required to get the prototype for fdopen
1286
1306
dnl defined correctly in <stdio.h>
1287
-
CPPFLAGS="-D_POSIX_SOURCE $CPPFLAGS"
1307
+
AM_CPPFLAGS="-D_POSIX_SOURCE $AM_CPPFLAGS"
1288
1308
1289
1309
dnl Also add BSD support on Linux systems, so <features.h> defines
1290
1310
dnl __USE_BSD, which is required to get the prototype for strdup
1291
1311
dnl defined correctly in <string.h> and snprintf & vsnprintf defined
1292
1312
dnl correctly in <stdio.h>
1293
-
CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS"
1313
+
AM_CPPFLAGS="-D_BSD_SOURCE $AM_CPPFLAGS"
1294
1314
;;
1295
1315
esac
1296
1316
1317
+
dnl Need to add AM_CPPFLAGS into CPPFLAGS to make them visible for configure checks.
1318
+
dnl Note: CPPFLAGS will be restored by the end of configure.
1319
+
CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
1320
+
1297
1321
AC_TRY_COMPILE([#include <sys/types.h>],
1298
1322
[off64_t n = 0;],
1299
1323
[AC_CHECK_FUNCS([lseek64 fseek64 ftruncate64])],
1300
1324
[AC_MSG_RESULT([skipping test for lseek64(), fseek64(), ftruncate64()])])
1301
1325
AC_CHECK_FUNCS(fseeko ftello)
1302
1326
AC_TRY_COMPILE([
1303
1327
#include <sys/types.h>
1304
1328
#include <sys/stat.h>],
1305
1329
[struct stat64 sb;],
1306
1330
[AC_CHECK_FUNCS([stat64 fstat64])],
1460
1484
dmalloc_lib=""
1461
1485
fi
1462
1486
1463
1487
saved_CPPFLAGS="$CPPFLAGS"
1464
1488
saved_LDFLAGS="$LDFLAGS"
1465
1489
1466
1490
if test -n "$dmalloc_inc"; then
1467
1491
CPPFLAGS="$CPPFLAGS -I$dmalloc_inc"
1468
1492
fi
1469
1493
1470
-
AC_CHECK_HEADERS(dmalloc.h,, CPPFLAGS="$saved_CPPFLAGS")
1494
+
AC_CHECK_HEADERS(dmalloc.h, AM_CPPFLAGS="$AM_CPPFLAGS -I$dmalloc_inc",CPPFLAGS="$saved_CPPFLAGS")
1471
1495
1472
1496
if test -n "$dmalloc_lib"; then
1473
1497
LDFLAGS="$LDFLAGS -L$dmalloc_lib"
1474
1498
fi
1475
1499
1476
1500
AC_CHECK_LIB(dmalloc, dmalloc_shutdown,, LDFLAGS="$saved_LDFLAGS"; unset HAVE_DMALLOC)
1477
1501
1502
+
if test -n "$HAVE_DMALLOC"; then
1503
+
AM_LDFLAGS="$AM_LDFLAGS -L$dmalloc_lib"
1504
+
fi
1505
+
1478
1506
if test -z "$HAVE_DMALLOC" -a -n "$HDF5_CONFIG_ABORT"; then
1479
1507
AC_MSG_ERROR(couldn't find dmalloc library)
1480
1508
fi
1481
1509
;;
1482
1510
esac
1483
1511
1484
1512
dnl ----------------------------------------------------------------------
1485
1513
dnl Is the GNU zlib present? It has a header file `zlib.h' and a library
1486
1514
dnl `-lz' and their locations might be specified with the `--with-zlib'
1487
1515
dnl command-line switch. The value is an include path and/or a library path.
1535
1563
fi
1536
1564
1537
1565
saved_CPPFLAGS="$CPPFLAGS"
1538
1566
saved_LDFLAGS="$LDFLAGS"
1539
1567
1540
1568
if test -n "$zlib_inc"; then
1541
1569
CPPFLAGS="$CPPFLAGS -I$zlib_inc"
1542
1570
fi
1543
1571
1544
1572
AC_CHECK_HEADERS([zlib.h],
1545
-
[HAVE_ZLIB_H="yes"],
1573
+
[HAVE_ZLIB_H="yes"; AM_CPPFLAGS="$AM_CPPFLAGS -I$zlib_inc"],
1546
1574
[CPPFLAGS="$saved_CPPFLAGS"])
1547
1575
1548
1576
if test -n "$zlib_lib"; then
1549
1577
LDFLAGS="$LDFLAGS -L$zlib_lib"
1550
1578
fi
1551
1579
1552
1580
AC_CHECK_LIB([z], [compress2],,
1553
1581
[LDFLAGS="$saved_LDFLAGS"; unset HAVE_ZLIB])
1554
1582
AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"])
1555
1583
1584
+
if test -n "$HAVE_ZLIB"; then
1585
+
AM_LDFLAGS="$AM_LDFLAGS -L$zlib_lib"
1586
+
fi
1587
+
1556
1588
if test -z "$HAVE_ZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
1557
1589
AC_MSG_ERROR([couldn't find zlib library])
1558
1590
fi
1559
1591
;;
1560
1592
esac
1561
1593
1562
1594
if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes" -a "x$HAVE_COMPRESS2" = "xyes"; then
1563
1595
AC_DEFINE([HAVE_FILTER_DEFLATE], [1], [Define if support for deflate (zlib) filter is enabled])
1564
1596
USE_FILTER_DEFLATE="yes"
1565
1597
1624
1656
fi
1625
1657
1626
1658
saved_CPPFLAGS="$CPPFLAGS"
1627
1659
saved_LDFLAGS="$LDFLAGS"
1628
1660
1629
1661
if test -n "$szlib_inc"; then
1630
1662
CPPFLAGS="$CPPFLAGS -I$szlib_inc"
1631
1663
fi
1632
1664
1633
1665
AC_CHECK_HEADERS([szlib.h],
1634
-
[HAVE_SZLIB_H="yes"],
1666
+
[HAVE_SZLIB_H="yes"; AM_CPPFLAGS="$AM_CPPFLAGS -I$szlib_inc"],
1635
1667
[CPPFLAGS="$saved_CPPFLAGS"])
1636
-
1668
+
1637
1669
if test -n "$szlib_lib"; then
1638
1670
LDFLAGS="$LDFLAGS -L$szlib_lib"
1639
1671
fi
1640
1672
1641
1673
AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],,
1642
1674
[LDFLAGS="$saved_LDFLAGS"; unset HAVE_SZLIB])
1643
-
1675
+
1676
+
if test -n "$HAVE_SZLIB"; then
1677
+
AM_LDFLAGS="$AM_LDFLAGS -L$szlib_lib"
1678
+
fi
1679
+
1644
1680
if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
1645
1681
AC_MSG_ERROR([couldn't find szlib library])
1646
1682
fi
1647
1683
;;
1648
1684
esac
1649
1685
1650
1686
if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
1651
1687
dnl SZLIB library is available. Check if it can encode
1652
1688
AC_MSG_CHECKING([for szlib encoder])
1653
1689
1750
1786
if test "X$pthread_inc" = "X/usr/include"; then
1751
1787
pthread_inc=""
1752
1788
fi
1753
1789
if test "X$pthread_lib" = "X/usr/lib"; then
1754
1790
pthread_lib=""
1755
1791
fi
1756
1792
1757
1793
if test -n "$pthread_inc"; then
1758
1794
saved_CPPFLAGS="$CPPFLAGS"
1759
1795
CPPFLAGS="$CPPFLAGS -I$pthread_inc"
1760
-
AC_CHECK_HEADERS([pthread.h],, [CPPFLAGS="$saved_CPPFLAGS"; unset PTHREAD])
1796
+
AC_CHECK_HEADERS([pthread.h],AM_CPPFLAGS="$AM_CPPFLAGS -I$pthread_inc", [unset PTHREAD])
1797
+
CPPFLAGS="$saved_CPPFLAGS"
1761
1798
else
1762
1799
AC_CHECK_HEADERS([pthread.h],, [unset PTHREAD])
1763
1800
fi
1764
1801
1765
1802
if test -n "$pthread_lib"; then
1766
1803
saved_LDFLAGS="$LDFLAGS"
1767
1804
LDFLAGS="$LDFLAGS -L$pthread_lib"
1768
1805
AC_CHECK_LIB([pthread], [pthread_create],,
1769
1806
[LDFLAGS="$saved_LDFLAGS"; unset PTHREAD])
1807
+
1808
+
if test -n "$PTHREAD"; then
1809
+
AM_LDFLAGS="$AM_LDFLAGS -L$pthread_lib"
1810
+
fi
1811
+
1770
1812
else
1771
1813
AC_CHECK_LIB([pthread], [pthread_create],, [unset PTHREAD])
1772
1814
fi
1773
1815
;;
1774
1816
esac
1775
1817
1776
1818
dnl ----------------------------------------------------------------------
1777
1819
dnl Enable thread-safe version of library. It requires Pthreads support.
1778
1820
dnl
1779
1821
AC_MSG_CHECKING([for thread safe support])
2065
2107
dnl ----------------------------------------------------------------------
2066
2108
dnl Try to figure out how to print `long long'. Some machines use `%lld'
2067
2109
dnl and others use `%qd'. There may be more! The final `l' is a
2068
2110
dnl default in case none of the others work.
2069
2111
dnl Need to patch up LD_LIBRARY_PATH so that the execution can find all
2070
2112
dnl the dynamic library. The correct way to do it should be updating
2071
2113
dnl LD_LIBRARY_PATH along with LDFLAGS or do it with the AC_TRY_RUN macro.
2072
2114
dnl
2073
2115
AC_MSG_CHECKING([how to print long long])
2074
2116
AC_CACHE_VAL([hdf5_cv_printf_ll],
2075
-
LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`"
2117
+
LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $AM_LDFLAGS $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`"
2076
2118
export LD_LIBRARY_PATH
2077
2119
2078
2120
for hdf5_cv_printf_ll in l ll L q unknown; do
2079
2121
AC_TRY_RUN([
2080
2122
#include <stdio.h>
2081
2123
#include <stdlib.h>
2082
2124
#include <string.h>
2083
2125
2084
2126
int main(void)
2085
2127
{
2606
2648
if test "X$mpe_inc" = "X/usr/include"; then
2607
2649
mpe_inc=""
2608
2650
fi
2609
2651
if test "X$mpe_lib" = "X/usr/lib"; then
2610
2652
mpe_lib=""
2611
2653
fi
2612
2654
2613
2655
if test -n "$mpe_inc"; then
2614
2656
saved_CPPFLAGS="$CPPFLAGS"
2615
2657
CPPFLAGS="$CPPFLAGS -I$mpe_inc"
2616
-
AC_CHECK_HEADERS([mpe.h],, [CPPFLAGS="$saved_CPPFLAGS"; unset MPE])
2658
+
AC_CHECK_HEADERS([mpe.h],AM_CPPFLAGS="$AM_CPPFLAGS -I$mpe_inc", [unset MPE])
2659
+
CPPFLAGS="$saved_CPPFLAGS"
2617
2660
else
2618
2661
AC_CHECK_HEADERS([mpe.h],, [unset MPE])
2619
2662
fi
2620
2663
2621
2664
if test -n "$mpe_lib"; then
2622
2665
saved_LDFLAGS="$LDFLAGS"
2623
2666
LDFLAGS="$LDFLAGS -L$mpe_lib"
2624
2667
AC_CHECK_LIB([mpe], [MPE_Init_log],,
2625
2668
[LDFLAGS="$saved_LDFLAGS"; unset MPE])
2626
2669
AC_CHECK_LIB([lmpe], [CLOG_Init],,
2627
2670
[LDFLAGS="$saved_LDFLAGS"; unset MPE])
2671
+
2672
+
if test -n "$MPE"; then
2673
+
AM_LDFLAGS="$AM_LDFLAGS -L$mpe_lib"
2674
+
fi
2675
+
2628
2676
else
2629
2677
AC_CHECK_LIB([mpe], [MPE_Init_log],, [unset MPE])
2630
2678
AC_CHECK_LIB([lmpe], [CLOG_Init],, [unset MPE])
2631
2679
fi
2632
2680
;;
2633
2681
esac
2634
2682
2635
2683
if test "X-$MPE" = "X-yes"; then
2636
2684
AC_DEFINE([HAVE_MPE], [1], [Define if we have MPE support])
2637
2685
fi
3697
3745
dnl
3698
3746
LIBS="$DEFAULT_LIBS $LIBS"
3699
3747
3700
3748
dnl ----------------------------------------------------------------------
3701
3749
dnl Determine the runtime libraries we may need to include in the
3702
3750
dnl libtools command so that executables will find the correct dynamic
3703
3751
dnl libraries.
3704
3752
dnl
3705
3753
AC_SUBST([DYNAMIC_DIRS]) DYNAMIC_DIRS=""
3706
3754
3707
-
if test -n "$LDFLAGS"; then
3708
-
for d in $LDFLAGS ; do
3755
+
if test -n "$AM_LDFLAGS $LDFLAGS"; then
3756
+
for d in $AM_LDFLAGS $LDFLAGS ; do
3709
3757
case "$d" in
3710
3758
-L*)
3711
3759
d="`echo $d | sed -e 's/-L//g'`"
3712
3760
case "$d" in
3713
3761
.*)
3714
3762
dnl If the path isn't absolute, make it so by
3715
3763
dnl prepending the ROOT directory to it.
3716
3764
d=${ROOT}/$d
3717
3765
;;
3718
3766
esac
3719
3767
DYNAMIC_DIRS="-R${d} $DYNAMIC_DIRS"
3720
3768
;;
3721
3769
esac
3722
3770
done
3723
3771
fi
3724
3772
3725
-
if test -n "$CPPFLAGS"; then
3773
+
if test -n "$AM_CPPFLAGS"; then
3726
3774
TEMP_CPPFLAGS=""
3727
-
for d in $CPPFLAGS ; do
3775
+
for d in $AM_CPPFLAGS ; do
3728
3776
case "$d" in
3729
3777
-I.*)
3730
3778
dnl If the path isn't absolute, make it so by prepending
3731
3779
dnl the ROOT directory to it.
3732
3780
d="`echo $d | sed -e 's/-I//g'`"
3733
3781
d="-I${ROOT}/${d}"
3734
3782
;;
3735
3783
esac
3736
3784
TEMP_CPPFLAGS="$d $TEMP_CPPFLAGS"
3737
3785
done
3738
-
CPPFLAGS=$TEMP_CPPFLAGS
3786
+
AM_CPPFLAGS=$TEMP_CPPFLAGS
3739
3787
fi
3740
3788
3741
3789
dnl ----------------------------------------------------------------------
3742
3790
dnl Check if they would like the High Level library compiled
3743
3791
dnl
3744
3792
3745
3793
AC_SUBST(HL) HL=""
3746
3794
# name of fortran folder inside "hl", if FORTRAN compile is requested
3747
3795
AC_SUBST(HL_FOR) HL_FOR=""
3748
3796
AC_MSG_CHECKING([if high level library is enabled])
3931
3979
])
3932
3980
], [
3933
3981
AC_DEFINE([NO_ALIGNMENT_RESTRICTIONS], [1], [Define if we can violate pointer alignment restrictions])
3934
3982
AC_MSG_RESULT([no])
3935
3983
], [
3936
3984
AC_MSG_RESULT([yes])
3937
3985
], [
3938
3986
AC_MSG_RESULT([unknown, assuming yes])
3939
3987
])
3940
3988
3989
+
3990
+
dnl ------------------------------------
3991
+
dnl Restore user's CPPFLAGS and LDFLAGS.
3992
+
CPPFLAGS="$saved_user_CPPFLAGS"
3993
+
LDFLAGS="$saved_user_LDFLAGS"
3994
+
3995
+
3941
3996
dnl ----------------------------------------------------------------------
3942
3997
dnl Create automake conditionals to tell automake makefiles which directories
3943
3998
dnl need to be compiled
3944
3999
3945
4000
AM_CONDITIONAL([BUILD_CXX_CONDITIONAL], [test "X$HDF_CXX" = "Xyes"])
3946
4001
AM_CONDITIONAL([BUILD_PARALLEL_CONDITIONAL], [test -n "$TESTPARALLEL"])
3947
4002
AM_CONDITIONAL([BUILD_FORTRAN_CONDITIONAL], [test "X$HDF_FORTRAN" = "Xyes"])
3948
4003
AM_CONDITIONAL([BUILD_HDF5_HL_CONDITIONAL], [test "X$HDF5_HL" = "Xyes"])
3949
4004
3950
4005