summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-09-22 16:04:54 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-09-22 16:04:54 (GMT)
commita2236b4e89e2736e0080064aef0835e19709842a (patch)
tree7902ae9acda94d2bda3980653c760c6e9c950741 /configure.ac
parent57d670faa68f1ce52d82652be5f88ee02f862545 (diff)
downloadhdf5-a2236b4e89e2736e0080064aef0835e19709842a.zip
hdf5-a2236b4e89e2736e0080064aef0835e19709842a.tar.gz
hdf5-a2236b4e89e2736e0080064aef0835e19709842a.tar.bz2
[svn-r27855] Merged revisions:
27509, 27515, 27517, 27521, 27524, 27525, 27537, 27555, 27570, 27575, 27585, 27586, 27590, 27591, 27592 from the trunk. Minor CMake and Fortran changes Tested on: jam (w/ gcc/gfortran 4.9.3)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac40
1 files changed, 17 insertions, 23 deletions
diff --git a/configure.ac b/configure.ac
index 813e24f..f115014 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,16 +28,6 @@ AC_PREREQ([2.69])
##
AC_INIT([HDF5], [1.9.223-swmr1], [help@hdfgroup.org])
-## PLACE CHECKS FOR REQUIRED PACKAGES NEEDED TO INSTALL HDF5 AT THE BEGINNING
-## --------------------------------------------------------------------------
-## Requirement #1: Check if Perl is installed.
-##
-AC_SUBST([PERL]) PERL=""
-AC_CHECK_PROG([PERL], [perl],, [$PATH])
-if test "x$PERL" = "xfalse"; then
- AC_MSG_ERROR([*** Perl is required for installing HDF5, but Perl could not be found!])
-fi
-
AC_CONFIG_SRCDIR([src/H5.c])
AC_CONFIG_HEADERS([src/H5config.h])
@@ -575,28 +565,32 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
dnl get the largest sizeof for REAL kinds
-
- max_real_fortran_sizeof="`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -ne '/,(\d+)\}/; print $1'`"
- max_real_fortran_kind="`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -ne '/,(\d+)\}/; print $1'`"
+ max_real_fortran_sizeof="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -ne 's/.*,\([[0-9]]*\)\}/\1/p'`"
+ max_real_fortran_kind="`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | sed -ne 's/.*,\([[0-9]]*\)\}/\1/p'`"
dnl remove the invalid kind from the list
if test "$ac_cv_sizeof___float128" != 0;then
- if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" && test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof"; then
- AC_MSG_WARN([
- Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size
- !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!!
- ])
- PAC_FC_ALL_REAL_KINDS="`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/,\d+}/}/g;'`"
- PAC_FC_ALL_REAL_KINDS_SIZEOF="`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/,\d+}/}/g;'`"
+ if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" &&
+ test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof" &&
+ dnl account for the fact that the C compiler can have 16-byte __float128 and the Fortran compiler only has 8-byte doubles,
+ dnl so we don't want to remove the 8-byte Fortran doubles. This is sometimes the case if different C and Fortran vendors
+ dnl are used (for example gnu and pgi).
+ test "${ac_cv_sizeof_double}" != "$max_real_fortran_sizeof" ; then
+ AC_MSG_WARN([
+ Fortran REAL(KIND=$max_real_fortran_kind) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size
+ !!! Fortran interfaces will not be generated for REAL(KIND=$max_real_fortran_kind) !!!
+ ])
+ PAC_FC_ALL_REAL_KINDS="`echo $PAC_FC_ALL_REAL_KINDS | sed -e 's/,[[0-9]]\+}/}/g'`"
+ PAC_FC_ALL_REAL_KINDS_SIZEOF="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/,[[0-9]]\+}/}/g'`"
fi
fi
AC_MSG_CHECKING([for Fortran interoperable KINDS with C])
AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS])
dnl count the number of real kinds
- H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -e '$count = (<STDIN> =~ tr/,//);print $count+1'`"
- H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo \"[$]PAC_FC_ALL_REAL_KINDS\" | perl -pe 's/{//g' | perl -pe 's/}//g' | perl -pe 's/ /,/g'`/)"
- H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo \"[$]PAC_FC_ALL_REAL_KINDS_SIZEOF\" | perl -pe 's/{//g' | perl -pe 's/}//g'| perl -pe 's/ /,/g'`/)"
+ H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo \"[$]PAC_FC_ALL_REAL_KINDS\" | tr -d -c ',\n' | awk '{ print length + 1; }'`"
+ H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $PAC_FC_ALL_REAL_KINDS | sed -e 's/{//g' | sed -e 's/}//g' | sed -e 's/ /,/g'`/)"
+ H5CONFIG_F_RKIND_SIZEOF="INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/{//g' | sed -e 's/}//g'| sed -e 's/ /,/g'`/)"
AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs])
AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs])