summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.in5
-rw-r--r--c++/Makefile.in5
-rw-r--r--c++/examples/Makefile.in5
-rw-r--r--c++/src/Makefile.in5
-rw-r--r--c++/test/Makefile.in5
-rwxr-xr-xconfigure302
-rw-r--r--configure.ac91
-rw-r--r--examples/Makefile.in5
-rw-r--r--fortran/Makefile.in5
-rw-r--r--fortran/examples/Makefile.in5
-rw-r--r--fortran/src/H5_f.c24
-rw-r--r--fortran/src/H5config_f.inc.in15
-rw-r--r--fortran/src/H5fort_type_defines.h.in1
-rw-r--r--fortran/src/H5match_types.c53
-rw-r--r--fortran/src/H5test_kind.F90158
-rw-r--r--fortran/src/Makefile.in5
-rw-r--r--fortran/test/Makefile.in5
-rw-r--r--fortran/testpar/Makefile.in5
-rw-r--r--hl/Makefile.in5
-rw-r--r--hl/c++/Makefile.in5
-rw-r--r--hl/c++/examples/Makefile.in5
-rw-r--r--hl/c++/src/Makefile.in5
-rw-r--r--hl/c++/test/Makefile.in5
-rw-r--r--hl/examples/Makefile.in5
-rw-r--r--hl/fortran/Makefile.in5
-rw-r--r--hl/fortran/examples/Makefile.in5
-rw-r--r--hl/fortran/src/H5LTff.F9014
-rw-r--r--hl/fortran/src/Makefile.in5
-rw-r--r--hl/fortran/test/Makefile.in5
-rw-r--r--hl/src/Makefile.in5
-rw-r--r--hl/test/Makefile.in5
-rw-r--r--hl/tools/Makefile.in5
-rw-r--r--hl/tools/gif2h5/Makefile.in5
-rw-r--r--m4/aclocal_fc.m440
-rw-r--r--src/H5config.h.in18
-rw-r--r--src/Makefile.in5
-rw-r--r--test/Makefile.in5
-rw-r--r--testpar/Makefile.in5
-rw-r--r--tools/Makefile.in5
-rw-r--r--tools/h5copy/Makefile.in5
-rw-r--r--tools/h5diff/Makefile.in5
-rw-r--r--tools/h5dump/Makefile.in5
-rw-r--r--tools/h5import/Makefile.in5
-rw-r--r--tools/h5jam/Makefile.in5
-rw-r--r--tools/h5ls/Makefile.in5
-rw-r--r--tools/h5repack/Makefile.in5
-rw-r--r--tools/h5stat/Makefile.in5
-rw-r--r--tools/lib/Makefile.in5
-rw-r--r--tools/misc/Makefile.in5
-rw-r--r--tools/perform/Makefile.in5
50 files changed, 672 insertions, 244 deletions
diff --git a/Makefile.in b/Makefile.in
index 34dfa99..ce0c833 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -299,6 +299,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/c++/Makefile.in b/c++/Makefile.in
index 50f5b31..2315cc2 100644
--- a/c++/Makefile.in
+++ b/c++/Makefile.in
@@ -459,6 +459,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in
index 115c118..6b0f894 100644
--- a/c++/examples/Makefile.in
+++ b/c++/examples/Makefile.in
@@ -407,6 +407,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in
index 3ca4f55..42c7a86 100644
--- a/c++/src/Makefile.in
+++ b/c++/src/Makefile.in
@@ -470,6 +470,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in
index feb6054..0da1d86 100644
--- a/c++/test/Makefile.in
+++ b/c++/test/Makefile.in
@@ -461,6 +461,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/configure b/configure
index c79ee83..456b846 100755
--- a/configure
+++ b/configure
@@ -710,7 +710,6 @@ PARALLEL
TIME
TR
AR
-PERL
HL_FOR
HL
CXXCPP
@@ -719,6 +718,11 @@ am__fastdepCXX_TRUE
CXXDEPMODE
ac_ct_CXX
CXXFLAGS
+H5CONFIG_F_IKIND
+H5CONFIG_F_NUM_IKIND
+H5CONFIG_F_RKIND_SIZEOF
+H5CONFIG_F_RKIND
+H5CONFIG_F_NUM_RKIND
FORTRAN_SIZEOF_LONG_DOUBLE
FORTRAN_C_LONG_DOUBLE_IS_UNIQUE
FORTRAN_HAVE_C_LONG_DOUBLE
@@ -837,6 +841,7 @@ am__isrc
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
+PERL
target_alias
host_alias
build_alias
@@ -3011,6 +3016,60 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+## PLACE CHECKS FOR REQUIRED PACKAGES NEEDED TO INSTALL HDF5 AT THE BEGINNING
+## --------------------------------------------------------------------------
+## Check if they have Perl installed on their system. We only need Perl
+## if they're using a GNU compiler.
+##
+ PERL=""
+##if test "X$GCC" = "Xyes"; then
+ for ac_prog in perl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PERL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PERL"; then
+ ac_cv_prog_PERL="$PERL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PERL="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PERL=$ac_cv_prog_PERL
+if test -n "$PERL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
+$as_echo "$PERL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$PERL" && break
+done
+
+##fi
+
+
ac_config_headers="$ac_config_headers src/H5config.h"
@@ -5542,6 +5601,46 @@ _ACEOF
+## Check for __FLOAT128 extension
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __float128" >&5
+$as_echo_n "checking size of __float128... " >&6; }
+if ${ac_cv_sizeof___float128+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__float128))" "ac_cv_sizeof___float128" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type___float128" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (__float128)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof___float128=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___float128" >&5
+$as_echo "$ac_cv_sizeof___float128" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF___FLOAT128 $ac_cv_sizeof___float128
+_ACEOF
+
+
+if test "$ac_cv_sizeof___float128" != 0; then
+
+$as_echo "#define HAVE_FLOAT128 1" >>confdefs.h
+
+fi
+
## ----------------------------------------------------------------------
## Check if they would like the Fortran interface compiled
##
@@ -6974,7 +7073,6 @@ rm -f core conftest.err conftest.$ac_objext \
-
## Set the sizeof function for use later in the fortran tests
if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes";then
FC_SIZEOF_A="STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)"
@@ -7032,12 +7130,15 @@ else
PROGRAM main
IMPLICIT NONE
INTEGER :: ik, k, lastkind, max_decimal_prec
+ INTEGER :: num_rkinds, num_ikinds
+ num_ikinds = 0
lastkind=SELECTED_INT_KIND(1)
OPEN(8, FILE='pac_fconftest.out', form='formatted')
WRITE(8,'(A)',ADVANCE='NO') 'A' ! Find integer KINDs
DO ik=2,36
k = SELECTED_INT_KIND(ik)
IF (k .NE. lastkind) THEN
+ num_ikinds = num_ikinds + 1
WRITE(8,'(I0)',ADVANCE='NO') lastkind
lastkind = k
IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' '
@@ -7045,16 +7146,19 @@ else
IF (k .LE. 0) EXIT
ENDDO
IF (lastkind.NE.-1) THEN
+ num_ikinds = num_ikinds + 1
WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'B '
ELSE
WRITE(8,'(A)',ADVANCE='NO') 'B '
ENDIF
WRITE(8,'(A)',ADVANCE='NO') 'C' ! Find real KINDs
+ num_rkinds = 0
lastkind=SELECTED_REAL_KIND(1)
max_decimal_prec = 1
DO ik=2,36
k = SELECTED_REAL_KIND(ik)
IF (k .NE. lastkind) THEN
+ num_rkinds = num_rkinds + 1
WRITE(8,'(I0)',ADVANCE='NO') lastkind
lastkind = k
IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' '
@@ -7063,12 +7167,16 @@ else
IF (k .LE. 0) EXIT
ENDDO
IF (lastkind.NE.-1)THEN
+ num_rkinds = num_rkinds + 1
WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'D'
ELSE
WRITE(8,'(A)',ADVANCE='NO') 'D'
ENDIF
WRITE(8,'(A,I0,A)',ADVANCE='NO') ' E',max_decimal_prec,'F'
+ WRITE(8,'(A,I0,A)',ADVANCE='NO') ' a',num_ikinds,'b'
+ WRITE(8,'(A,I0,A)',ADVANCE='NO') ' c',num_rkinds,'d'
+
END
@@ -7087,8 +7195,24 @@ cat >>confdefs.h <<_ACEOF
#define PAC_FC_MAX_REAL_PRECISION $PAC_FC_MAX_REAL_PRECISION
_ACEOF
+
PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}"
PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}"
+
+ H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `echo $tmp | sed -e 's/.*a\(.*\)b.*/\1/'`"
+ H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds | sed -e 's/ /,/g'`/)"
+
+
+cat >>confdefs.h <<_ACEOF
+#define H5CONFIG_F_NUM_IKIND $H5CONFIG_F_NUM_IKIND
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define H5CONFIG_F_IKIND $H5CONFIG_F_IKIND
+_ACEOF
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran INTEGER KINDs" >&5
$as_echo_n "checking for Fortran INTEGER KINDs... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS" >&5
@@ -7215,12 +7339,15 @@ else
PROGRAM main
IMPLICIT NONE
INTEGER :: ik, k, lastkind, max_decimal_prec
+ INTEGER :: num_rkinds, num_ikinds
+ num_ikinds = 0
lastkind=SELECTED_INT_KIND(1)
OPEN(8, FILE='pac_fconftest.out', form='formatted')
WRITE(8,'(A)',ADVANCE='NO') 'A' ! Find integer KINDs
DO ik=2,36
k = SELECTED_INT_KIND(ik)
IF (k .NE. lastkind) THEN
+ num_ikinds = num_ikinds + 1
WRITE(8,'(I0)',ADVANCE='NO') lastkind
lastkind = k
IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' '
@@ -7228,16 +7355,19 @@ else
IF (k .LE. 0) EXIT
ENDDO
IF (lastkind.NE.-1) THEN
+ num_ikinds = num_ikinds + 1
WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'B '
ELSE
WRITE(8,'(A)',ADVANCE='NO') 'B '
ENDIF
WRITE(8,'(A)',ADVANCE='NO') 'C' ! Find real KINDs
+ num_rkinds = 0
lastkind=SELECTED_REAL_KIND(1)
max_decimal_prec = 1
DO ik=2,36
k = SELECTED_REAL_KIND(ik)
IF (k .NE. lastkind) THEN
+ num_rkinds = num_rkinds + 1
WRITE(8,'(I0)',ADVANCE='NO') lastkind
lastkind = k
IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' '
@@ -7246,12 +7376,16 @@ else
IF (k .LE. 0) EXIT
ENDDO
IF (lastkind.NE.-1)THEN
+ num_rkinds = num_rkinds + 1
WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'D'
ELSE
WRITE(8,'(A)',ADVANCE='NO') 'D'
ENDIF
WRITE(8,'(A,I0,A)',ADVANCE='NO') ' E',max_decimal_prec,'F'
+ WRITE(8,'(A,I0,A)',ADVANCE='NO') ' a',num_ikinds,'b'
+ WRITE(8,'(A,I0,A)',ADVANCE='NO') ' c',num_rkinds,'d'
+
END
@@ -7270,8 +7404,24 @@ cat >>confdefs.h <<_ACEOF
#define PAC_FC_MAX_REAL_PRECISION $PAC_FC_MAX_REAL_PRECISION
_ACEOF
+
PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}"
PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}"
+
+ H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `echo $tmp | sed -e 's/.*a\(.*\)b.*/\1/'`"
+ H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds | sed -e 's/ /,/g'`/)"
+
+
+cat >>confdefs.h <<_ACEOF
+#define H5CONFIG_F_NUM_IKIND $H5CONFIG_F_NUM_IKIND
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define H5CONFIG_F_IKIND $H5CONFIG_F_IKIND
+_ACEOF
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran INTEGER KINDs" >&5
$as_echo_n "checking for Fortran INTEGER KINDs... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS" >&5
@@ -7363,7 +7513,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
done
-PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{ $pack_int_sizeof }"
+PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{`echo $pack_int_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_INTEGER_KINDS_SIZEOF" >&5
$as_echo "$PAC_FC_ALL_INTEGER_KINDS_SIZEOF" >&6; }
ac_ext=${ac_fc_srcext-f}
@@ -7425,7 +7575,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
done
-PAC_FC_ALL_REAL_KINDS_SIZEOF="{ $pack_real_sizeof }"
+PAC_FC_ALL_REAL_KINDS_SIZEOF="{`echo $pack_real_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS_SIZEOF" >&5
$as_echo "$PAC_FC_ALL_REAL_KINDS_SIZEOF" >&6; }
ac_ext=${ac_fc_srcext-f}
@@ -7452,6 +7602,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+
+
+
+
## Setting definition if there is a 16 byte fortran integer
if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then
HAVE_Fortran_INTEGER_SIZEOF_16="1"
@@ -7584,6 +7739,50 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+
+
+ 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'`"
+
+ if test "$ac_cv_sizeof___float128" != "$max_real_fortran_sizeof" && test "${ac_cv_sizeof_long_double}" != "$max_real_fortran_sizeof"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+ 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) !!!
+ " >&5
+$as_echo "$as_me: WARNING:
+ 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) !!!
+ " >&2;}
+ 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;'`"
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran interoperable KINDS with C" >&5
+$as_echo_n "checking for Fortran interoperable KINDS with C... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS" >&5
+$as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; }
+
+ 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 | 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'`/)"
+
+
+cat >>confdefs.h <<_ACEOF
+#define H5CONFIG_F_NUM_RKIND $H5CONFIG_F_NUM_RKIND
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define H5CONFIG_F_RKIND $H5CONFIG_F_RKIND
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define H5CONFIG_F_RKIND_SIZEOF $H5CONFIG_F_RKIND_SIZEOF
+_ACEOF
+
+
+
+
## Change back to the C language
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -7601,10 +7800,16 @@ rm -f pac_Cconftest.out
#include <float.h>
#include <stdio.h>
- #if __STDC_VERSION__ >= 199901L
- #define C_LDBL_DIG DECIMAL_DIG
+ #define CHECK_FLOAT128 $ac_cv_sizeof___float128
+ #if CHECK_FLOAT128!=0
+ #include <quadmath.h>
+ #define C_LDBL_DIG FLT128_DIG
#else
+ # if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define C_LDBL_DIG DECIMAL_DIG
+ # else
#define C_LDBL_DIG LDBL_DIG
+ # endif
#endif
#ifdef FC_DUMMY_MAIN
@@ -8425,56 +8630,6 @@ fi
## ----------------------------------------------------------------------
-## Check if they have Perl installed on their system. We only need Perl
-## if they're using a GNU compiler.
-##
- PERL=""
-if test "X$GCC" = "Xyes"; then
- for ac_prog in perl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_PERL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$PERL"; then
- ac_cv_prog_PERL="$PERL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_PERL="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-PERL=$ac_cv_prog_PERL
-if test -n "$PERL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
-$as_echo "$PERL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$PERL" && break
-done
-
-fi
-
-## ----------------------------------------------------------------------
## Check which archiving tool to use. This needs to be done before
## the AM_PROG_LIBTOOL macro.
##
@@ -24940,41 +25095,6 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
rm -f confcache
-## Check for __FLOAT128 extension
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __float128" >&5
-$as_echo_n "checking for __float128... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
- extern "C"
-# endif
- int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-__float128 x;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-$as_echo "#define HAVE_FLOAT128 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
## ----------------------------------------------------------------------
## Check if the dev_t type is a scalar type (must come after the check for
## sys/types.h)
diff --git a/configure.ac b/configure.ac
index 96c43f9..9272c99 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,19 @@ AC_PREREQ([2.69])
## release!!!
##
AC_INIT([HDF5], [1.9.222], [help@hdfgroup.org])
+
+
+
+## PLACE CHECKS FOR REQUIRED PACKAGES NEEDED TO INSTALL HDF5 AT THE BEGINNING
+## --------------------------------------------------------------------------
+## Check if they have Perl installed on their system. We only need Perl
+## if they're using a GNU compiler.
+##
+AC_SUBST([PERL]) PERL=""
+##if test "X$GCC" = "Xyes"; then
+ AC_CHECK_PROGS([PERL], [perl],, [$PATH])
+##fi
+
AC_CONFIG_SRCDIR([src/H5.c])
AC_CONFIG_HEADER([src/H5config.h])
@@ -346,6 +359,12 @@ esac
AC_CHECK_SIZEOF([long double], [8])
+## Check for __FLOAT128 extension
+AC_CHECK_SIZEOF([__float128])
+if test "$ac_cv_sizeof___float128" != 0; then
+ AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available])
+fi
+
## ----------------------------------------------------------------------
## Check if they would like the Fortran interface compiled
##
@@ -429,7 +448,6 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE"
PAC_PROG_FC_STORAGE_SIZE
-
## Set the sizeof function for use later in the fortran tests
if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes";then
FC_SIZEOF_A="STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)"
@@ -471,6 +489,11 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
AC_SUBST([FORTRAN_HAVE_C_LONG_DOUBLE])
AC_SUBST([FORTRAN_C_LONG_DOUBLE_IS_UNIQUE])
AC_SUBST([FORTRAN_SIZEOF_LONG_DOUBLE])
+ AC_SUBST([H5CONFIG_F_NUM_RKIND])
+ AC_SUBST([H5CONFIG_F_RKIND])
+ AC_SUBST([H5CONFIG_F_RKIND_SIZEOF])
+ AC_SUBST([H5CONFIG_F_NUM_IKIND])
+ AC_SUBST([H5CONFIG_F_IKIND])
## Setting definition if there is a 16 byte fortran integer
if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then
@@ -524,6 +547,54 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
FORTRAN_SIZEOF_LONG_DOUBLE=${ac_cv_sizeof_long_double}
AC_DEFINE_UNQUOTED([FORTRAN_SIZEOF_LONG_DOUBLE], ["${ac_cv_sizeof_long_double}"], [Determine the size of C long double])
+
+ dnl get the largest sizeof for REAL kinds
+ dnl max_real_fortran_sizeof="`echo $pack_real_sizeof | sed -e 's/, *$//g' | sed -e [0-9]*$`"
+ dnl max_real_fortran_sizeof="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/, }//g' | sed -e [0-9]*$`"
+ dnl max_real_fortran_sizeof="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/\(, \}\)//g' | sed -e 's/.* //g'`"
+
+ 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'`"
+
+ 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;'`"
+ 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 | 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'`/)"
+
+ 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])
+ AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND_SIZEOF], $H5CONFIG_F_RKIND_SIZEOF, [Define valid Fortran REAL KINDs Sizeof])
+
+ dnl remove the invalid kind from the list
+ dnl AC_MSG_WARN([...$PAC_FC_ALL_REAL_KINDS_SIZEOF...$PAC_FC_ALL_REAL_KINDS...])
+ dnl PAC_FC_ALL_REAL_KINDS="{4,8,16}"
+ dnl tmp3="`echo $PAC_FC_ALL_REAL_KINDS | perl -pe 's/,[0-9]*\}$/\}/g'`"
+ dnl tmp1="`echo "${PAC_FC_ALL_REAL_KINDS}" | sed -e 's/,[0-9]*\}*\$/}/g'`"
+ dnl tmp1="`echo $pac_validRealKinds | sed s/'w*$'//`"
+ dnl tmp2="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/[0-9]*, \}*$/}/g'`"
+ dnl tmp3="$PAC_FC_ALL_REAL_KINDS_SIZEOF"
+ dnl echo "$tmp3"
+ dnl tmp2=`echo $tmp3 | sed -e 's/[0-9]//'`
+ dnl AC_MSG_WARN([here $tmp2....])
+
+ dnl PAC_FC_ALL_REAL_KINDS="{4,8,16}"
+ dnl echo "$PAC_FC_ALL_REAL_KINDS"
+ dnl tmp1="`echo "${PAC_FC_ALL_REAL_KINDS}" | sed -e 's/,[0-9]*\}*\$/}/g'`"
+ dnl tmp1="`echo $pac_validRealKinds | sed s/'w*$'//`"
+ dnl tmp2="`echo $PAC_FC_ALL_REAL_KINDS_SIZEOF | sed -e 's/[0-9]*, \}*$/}/g'`"
+ dnl tmp3="$PAC_FC_ALL_REAL_KINDS_SIZEOF"
+
## Change back to the C language
AC_LANG_POP(Fortran)
PAC_LDBL_DIG
@@ -600,15 +671,6 @@ fi
## ----------------------------------------------------------------------
-## Check if they have Perl installed on their system. We only need Perl
-## if they're using a GNU compiler.
-##
-AC_SUBST([PERL]) PERL=""
-if test "X$GCC" = "Xyes"; then
- AC_CHECK_PROGS([PERL], [perl],, [$PATH])
-fi
-
-## ----------------------------------------------------------------------
## Check which archiving tool to use. This needs to be done before
## the AM_PROG_LIBTOOL macro.
##
@@ -1154,15 +1216,6 @@ AC_CHECK_SIZEOF([off64_t], [8])
## Checkpoint the cache
AC_CACHE_SAVE
-## Check for __FLOAT128 extension
-AC_MSG_CHECKING([for __float128])
-AC_TRY_COMPILE([],
- [__float128 x;],
- [AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available])
- AC_MSG_RESULT([yes])],
- AC_MSG_RESULT([no])
-)
-
## ----------------------------------------------------------------------
## Check if the dev_t type is a scalar type (must come after the check for
## sys/types.h)
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 1ea46a2..79232ae 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -407,6 +407,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/fortran/Makefile.in b/fortran/Makefile.in
index 54465a8..8585623 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -463,6 +463,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index 0f6cb1a..f97fdc8 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -407,6 +407,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index f21528f..fa96ebe 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -227,27 +227,29 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes
/*
* FIND H5T_NATIVE_REAL_C_LONG_DOUBLE
*/
-#if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE
+#if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0
if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(float)) {
if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value;
} /*end if */
else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(double)) {
if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value;
} /*end if */
-# if FORTRAN_HAVE_C_LONG_DOUBLE!=0
+# if H5_FORTRAN_HAVE_C_LONG_DOUBLE!=0
else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(long double)) {
- if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value;
- } /*end else */
+ if ( H5_PAC_C_MAX_REAL_PRECISION >= H5_PAC_FC_MAX_REAL_PRECISION) {
+ if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value;
+ }
+ else {
+ if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value;
+ if ( H5Tset_precision (types[12], 128) < 0) return ret_value;
+ }
+ }
# else
- else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(long double)) {
- if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value;
- if ( H5Tset_precision (types[12], 128) < 0) return ret_value;
- } /*end else */
+ if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value;
+ if ( H5Tset_precision (types[12], 64) < 0) return ret_value;
# endif
-
#else
- if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value;
- if ( H5Tset_precision (types[12], 64) < 0) return ret_value;
+ if ((types[12] = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value;
#endif
/*
* FIND H5T_NATIVE_B_8
diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in
index d6909ed..b0de405 100644
--- a/fortran/src/H5config_f.inc.in
+++ b/fortran/src/H5config_f.inc.in
@@ -39,3 +39,18 @@
! Maximum decimal precision for C
#undef PAC_C_MAX_REAL_PRECISION
+! number of valid REAL KINDs
+#undef H5CONFIG_F_NUM_RKIND
+
+! valid REAL KINDs (need to have a matching C counter-part)
+#undef H5CONFIG_F_RKIND
+
+! valid REAL KINDs (need to have a matching C counter-part)
+#undef H5CONFIG_F_RKIND_SIZEOF
+
+! number of valid INTEGER KINDs
+#undef H5CONFIG_F_NUM_IKIND
+
+! valid INTEGER KINDs (need to have a matching C counter-part)
+#undef H5CONFIG_F_IKIND
+
diff --git a/fortran/src/H5fort_type_defines.h.in b/fortran/src/H5fort_type_defines.h.in
index 5511742..0e14e86 100644
--- a/fortran/src/H5fort_type_defines.h.in
+++ b/fortran/src/H5fort_type_defines.h.in
@@ -11,7 +11,6 @@
#define H5_FORTRAN_INTEGER_KINDS_SIZEOF @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
#define H5_FORTRAN_REAL_KINDS @PAC_FC_ALL_REAL_KINDS@
#define H5_FORTRAN_REAL_KINDS_SIZEOF @PAC_FC_ALL_REAL_KINDS_SIZEOF@
-#define H5_PAC_FC_MAX_REAL_PRECISION @PAC_FC_MAX_REAL_PRECISION@
#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@
#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @FORTRAN_HAVE_C_LONG_DOUBLE@
#define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c
index b0e682d..360f224 100644
--- a/fortran/src/H5match_types.c
+++ b/fortran/src/H5match_types.c
@@ -153,7 +153,6 @@ int main(void)
int FoundRealSizeKind[10];
int i, j,flag;
char chrA[32],chrB[32];
- int H5_C_HAS_REAL_NATIVE_16;
int IntKinds[] = H5_FORTRAN_INTEGER_KINDS;
int IntKinds_SizeOf[] = H5_FORTRAN_INTEGER_KINDS_SIZEOF;
@@ -169,9 +168,6 @@ int main(void)
c_header = fopen(CFILE, "w");
fort_header = fopen(FFILE, "w");
- /* Default is C has 16 byte float */
- H5_C_HAS_REAL_NATIVE_16 = 1;
-
/* Write copyright, boilerplate to both files */
initCfile();
initFfile();
@@ -208,30 +204,45 @@ int main(void)
/* (b) Define c_float_x */
for(i=0;i< H5_FORTRAN_NUM_REAL_KINDS;i++) {
-
if (sizeof(float) == RealKinds_SizeOf[i]) {
writeTypedef("float", "float", RealKinds[i]);
- strcpy(Real_C_TYPES[i], "C_FLOAT"); }
+ strcpy(Real_C_TYPES[i], "C_FLOAT");
+ }
else if(sizeof(double) == RealKinds_SizeOf[i]) {
writeTypedef("float", "double", RealKinds[i]);
- strcpy(Real_C_TYPES[i], "C_DOUBLE"); }
+ strcpy(Real_C_TYPES[i], "C_DOUBLE");
+ }
#if H5_FORTRAN_HAVE_C_LONG_DOUBLE!=0
else if(sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 0) {
writeTypedef("float", "long double", RealKinds[i]);
strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE");
- found_long_double = 1; }
-#endif
-#ifdef H5_HAVE_FLOAT128
+ found_long_double = 1;
+ }
+# ifdef H5_HAVE_FLOAT128
/* Don't select a higher precision than Fortran can support */
else if(sizeof(__float128) == RealKinds_SizeOf[i] && found_long_double == 1 && H5_PAC_FC_MAX_REAL_PRECISION > 28) {
writeTypedef("float", "__float128", RealKinds[i]);
strcpy(Real_C_TYPES[i], "C_FLOAT128");
}
-#else
+# else
else if(sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 1 && H5_PAC_FC_MAX_REAL_PRECISION > 28) {
writeTypedef("float", "long double", RealKinds[i]);
strcpy(Real_C_TYPES[i], "C_FLOAT128");
}
+# endif
+#else /* There is no C_LONG_DOUBLE intrinsic */
+# ifdef H5_HAVE_FLOAT128
+ /* Don't select a higher precision than Fortran can support */
+ else if(sizeof(__float128) == RealKinds_SizeOf[i] ) {
+ writeTypedef("float", "__float128", RealKinds[i]);
+ strcpy(Real_C_TYPES[i], "C_FLOAT128");
+ }
+# else
+ else if(sizeof(long double) == RealKinds_SizeOf[i] ) {
+ writeTypedef("float", "long double", RealKinds[i]);
+ strcpy(Real_C_TYPES[i], "C_FLOAT128");
+ }
+# endif
#endif
/* else { */
/* /\* Did not find the real type, use the next smallest *\/ */
@@ -246,10 +257,12 @@ int main(void)
/* writeTypedef("float", "long double", RealKinds[i]); */
/* strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); } */
else {
- printf(" **** HDF5 WARNING ****\n");
- printf("Fortran REAL is %d bytes, but no corresponding C floating type exists\n",RealKinds_SizeOf[i]);
- printf("Fortran Interface will create a custom datatype to store Fortran Real\n",RealKinds_SizeOf[i]);
+ printf("\n **** HDF5 WARNING ****\n");
+ printf("Fortran REAL(KIND=%d) is %d Bytes, but no corresponding C float type exists of that size\n",RealKinds[i],RealKinds_SizeOf[i]);
+ printf(" !!! Fortran interfaces will not be generated for REAL(KIND=%d) !!!\n\n",RealKinds[i]);
+ RealKinds_SizeOf[i] = -1;
+ RealKinds[i] = -1;
/* writeTypedef("float", "long double", RealKinds[i]); */
/* strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); } */
}
@@ -392,12 +405,14 @@ int main(void)
FoundRealSize[4] = -1;
for(i=0;i<H5_FORTRAN_NUM_REAL_KINDS;i++) {
- FoundRealSize[i] = (int)RealKinds[i];
- FoundRealSizeKind[i] = (int)RealKinds_SizeOf[i];
- sprintf(chrA, "Fortran_REAL_%s", Real_C_TYPES[i]);
+ if (RealKinds[i] > 0) {
+ FoundRealSize[i] = (int)RealKinds[i];
+ FoundRealSizeKind[i] = (int)RealKinds_SizeOf[i];
+ sprintf(chrA, "Fortran_REAL_%s", Real_C_TYPES[i]);
/* sprintf(chrB, "real_%d_f", FoundRealSize[i]); */
- sprintf(chrB, "real_%s_f", Real_C_TYPES[i]);
- writeToFiles("float",chrA, chrB, RealKinds[i], RealKinds_SizeOf[i]);
+ sprintf(chrB, "real_%s_f", Real_C_TYPES[i]);
+ writeToFiles("float",chrA, chrB, RealKinds[i], RealKinds_SizeOf[i]);
+ }
}
/* for(i=0;i<H5_FORTRAN_NUM_REAL_KINDS;i++) { */
diff --git a/fortran/src/H5test_kind.F90 b/fortran/src/H5test_kind.F90
index e83139a..f73f915 100644
--- a/fortran/src/H5test_kind.F90
+++ b/fortran/src/H5test_kind.F90
@@ -51,7 +51,15 @@
PROGRAM test_kind
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
- INTEGER :: i, j, k, ii, ir, last, ikind_numbers(10), rkind_numbers(10)
+
+! These values are valid REAL KINDs (with corresponding C float) found during configure
+ H5_H5CONFIG_F_NUM_RKIND
+ H5_H5CONFIG_F_RKIND
+! These values are valid INTEGER KINDs (with corresponding C float) found during configure
+ H5_H5CONFIG_F_NUM_IKIND
+ H5_H5CONFIG_F_IKIND
+
+ INTEGER :: i, j, k
INTEGER :: ji, jr, jd
#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
REAL(KIND=C_LONG_DOUBLE) :: c_longdble
@@ -85,38 +93,6 @@ PROGRAM test_kind
' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' &
/)
- last = -1
- ii = 0
-
- ikind_numbers = 0
- rkind_numbers = 0
-
- DO i = 1,100
- j = SELECTED_INT_KIND(i)
- IF(j .NE. last) THEN
- IF(last .NE. -1) THEN
- ii = ii + 1
- ikind_numbers(ii) = last
- ENDIF
- last = j
- IF(j .EQ. -1) EXIT
- ENDIF
- ENDDO
-
- last = -1
- ir = 0
- DO i = 1,100
- j = SELECTED_REAL_KIND(i)
- IF(j .NE. last) THEN
- IF(last .NE. -1) THEN
- ir = ir + 1
- rkind_numbers(ir) = last
- ENDIF
- last = j
- IF(j .EQ. -1) EXIT
- ENDIF
- ENDDO
-
GOTO 10
! Generate program information:
@@ -214,8 +190,8 @@ WRITE(*,'(40(A,/))') &
"//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)"
WRITE(*,*)" RETURN"
WRITE(*,*)"END SUBROUTINE"
- DO i = 1, ii
- j = ikind_numbers(i)
+ DO i = 1, num_ikinds
+ j = ikind(i)
WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j
WRITE(*,*)" IMPLICIT NONE"
WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a"
@@ -233,8 +209,8 @@ WRITE(*,'(40(A,/))') &
WRITE(*,*)" RETURN"
WRITE(*,*)"END SUBROUTINE"
ENDDO
- DO i = 1, ir
- j = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ j = rkind(i)
WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j
WRITE(*,*)" IMPLICIT NONE"
WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a"
@@ -267,12 +243,12 @@ WRITE(*,'(40(A,/))') &
WRITE(*, "("" CALL r"", i2.2,""()"")") jr
jd = 0
WRITE(*, "("" CALL d"", i2.2,""()"")") jd
- DO i = 1, ii
- j = ikind_numbers(i)
+ DO i = 1, num_ikinds
+ j = ikind(i)
WRITE(*, "("" CALL i"", i2.2,""()"")") j
ENDDO
- DO i = 1, ir
- j = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ j = rkind(i)
WRITE(*, "("" CALL r"", i2.2,""()"")") j
ENDDO
#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
@@ -373,8 +349,8 @@ WRITE(*,'(40(A,/))') &
! H5Awrite_f
!
WRITE(11,'(A)') " INTERFACE h5awrite_f"
- DO i = 1, ir
- j = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ j = rkind(i)
WRITE(chr2,'(I2)') j
DO k = 1, 8
WRITE(11,'(A)') " MODULE PROCEDURE h5awrite_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k)
@@ -384,8 +360,8 @@ WRITE(*,'(40(A,/))') &
! H5Aread_f
WRITE(11,'(A)') " INTERFACE h5aread_f"
- DO i = 1, ir
- j = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ j = rkind(i)
WRITE(chr2,'(I2)') j
DO k = 1, 8
WRITE(11,'(A)') " MODULE PROCEDURE h5aread_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k)
@@ -398,8 +374,8 @@ WRITE(*,'(40(A,/))') &
!
! H5Dwrite_f
WRITE(11,'(A)') " INTERFACE h5dwrite_f"
- DO i = 1, ir
- j = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ j = rkind(i)
WRITE(chr2,'(I2)') j
DO k = 1, 8
WRITE(11,'(A)') " MODULE PROCEDURE h5dwrite_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k)
@@ -409,8 +385,8 @@ WRITE(*,'(40(A,/))') &
! H5Dread_f
WRITE(11,'(A)') " INTERFACE h5dread_f"
- DO i = 1, ir
- j = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ j = rkind(i)
WRITE(chr2,'(I2)') j
DO k = 1, 8
WRITE(11,'(A)') " MODULE PROCEDURE h5dread_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k)
@@ -424,8 +400,8 @@ WRITE(*,'(40(A,/))') &
!
! H5Pset_fill_value_f
WRITE(11,'(A)') " INTERFACE h5pset_fill_value_f"
- DO i = 1, ir
- j = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ j = rkind(i)
WRITE(chr2,'(I2)') j
WRITE(11,'(A)') " MODULE PROCEDURE h5pset_fill_value_kind_"//TRIM(ADJUSTL(chr2))
END DO
@@ -433,8 +409,8 @@ WRITE(*,'(40(A,/))') &
! H5Pget_fill_value_f
WRITE(11,'(A)') " INTERFACE h5pget_fill_value_f"
- DO i = 1, ir
- j = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ j = rkind(i)
WRITE(chr2,'(I2)') j
WRITE(11,'(A)') " MODULE PROCEDURE h5pget_fill_value_kind_"//TRIM(ADJUSTL(chr2))
END DO
@@ -442,8 +418,8 @@ WRITE(*,'(40(A,/))') &
! H5Pset_f
WRITE(11,'(A)') " INTERFACE h5pset_f"
- DO i = 1, ir
- j = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ j = rkind(i)
WRITE(chr2,'(I2)') j
WRITE(11,'(A)') " MODULE PROCEDURE h5pset_kind_"//TRIM(ADJUSTL(chr2))
END DO
@@ -451,8 +427,8 @@ WRITE(*,'(40(A,/))') &
! H5Pget_f
WRITE(11,'(A)') " INTERFACE h5pget_f"
- DO i = 1, ir
- j = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ j = rkind(i)
WRITE(chr2,'(I2)') j
WRITE(11,'(A)') " MODULE PROCEDURE h5pget_kind_"//TRIM(ADJUSTL(chr2))
END DO
@@ -460,8 +436,8 @@ WRITE(*,'(40(A,/))') &
! H5Pregister_f
WRITE(11,'(A)') " INTERFACE h5pregister_f"
- DO i = 1, ir
- j = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ j = rkind(i)
WRITE(chr2,'(I2)') j
WRITE(11,'(A)') " MODULE PROCEDURE h5pregister_kind_"//TRIM(ADJUSTL(chr2))
END DO
@@ -469,8 +445,8 @@ WRITE(*,'(40(A,/))') &
! H5Pinsert_f
WRITE(11,'(A)') " INTERFACE h5pinsert_f"
- DO i = 1, ir
- j = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ j = rkind(i)
WRITE(chr2,'(I2)') j
WRITE(11,'(A)') " MODULE PROCEDURE h5pinsert_kind_"//TRIM(ADJUSTL(chr2))
END DO
@@ -483,8 +459,8 @@ WRITE(*,'(40(A,/))') &
!**********************
!
! H5Awrite_f
- DO i = 1, ir
- k = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ k = rkind(i)
WRITE(chr2,'(I2)') k
DO j = 1, 8
@@ -511,8 +487,8 @@ WRITE(*,'(40(A,/))') &
ENDDO
!
! H5Aread_f
- DO i = 1, ir
- k = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ k = rkind(i)
WRITE(chr2,'(I2)') k
DO j = 1, 8
! DLL definitions for windows
@@ -541,8 +517,8 @@ WRITE(*,'(40(A,/))') &
!**********************
!
! h5dread_f
- DO i = 1, ir
- k = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ k = rkind(i)
WRITE(chr2,'(I2)') k
DO j = 1, 8
! DLL definitions for windows
@@ -582,8 +558,8 @@ WRITE(*,'(40(A,/))') &
ENDDO
!
! h5dwrite_f
- DO i = 1, ir
- k = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ k = rkind(i)
WRITE(chr2,'(I2)') k
DO j = 1, 8
! DLL definitions for windows
@@ -626,8 +602,8 @@ WRITE(*,'(40(A,/))') &
!**********************
!
! H5Pset_fill_value_f
- DO i = 1, ir
- k = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ k = rkind(i)
WRITE(chr2,'(I2)') k
! DLL definitions for windows
WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)'
@@ -648,8 +624,8 @@ WRITE(*,'(40(A,/))') &
ENDDO
! H5Pget_fill_value_f
- DO i = 1, ir
- k = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ k = rkind(i)
WRITE(chr2,'(I2)') k
! DLL definitions for windows
WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)'
@@ -670,8 +646,8 @@ WRITE(*,'(40(A,/))') &
ENDDO
! H5Pset_f
- DO i = 1, ir
- k = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ k = rkind(i)
WRITE(chr2,'(I2)') k
! DLL definitions for windows
WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)'
@@ -695,8 +671,8 @@ WRITE(*,'(40(A,/))') &
ENDDO
! H5Pget_f
- DO i = 1, ir
- k = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ k = rkind(i)
WRITE(chr2,'(I2)') k
! DLL definitions for windows
WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)'
@@ -719,8 +695,8 @@ WRITE(*,'(40(A,/))') &
ENDDO
! H5Pregister_f
- DO i = 1, ir
- k = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ k = rkind(i)
WRITE(chr2,'(I2)') k
! DLL definitions for windows
WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)'
@@ -744,8 +720,8 @@ WRITE(*,'(40(A,/))') &
ENDDO
! H5Pinsert_f
- DO i = 1, ir
- k = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ k = rkind(i)
WRITE(chr2,'(I2)') k
! DLL definitions for windows
WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_DLL)'
@@ -812,13 +788,13 @@ WRITE(*,'(40(A,/))') &
! Interfaces for validating REALs, INTEGERs, CHARACTERs, LOGICALs
WRITE(11,'(A)') ' INTERFACE verify'
- DO i = 1, ir
- j = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ j = rkind(i)
WRITE(chr2,'(I2)') j
WRITE(11,'(A)') " MODULE PROCEDURE verify_real_kind_"//TRIM(ADJUSTL(chr2))
END DO
- DO i = 1, ii
- j = ikind_numbers(i)
+ DO i = 1, num_ikinds
+ j = ikind(i)
WRITE(chr2,'(I2)') j
WRITE(11,'(A)') " MODULE PROCEDURE verify_integer_kind_"//TRIM(ADJUSTL(chr2))
END DO
@@ -827,8 +803,8 @@ WRITE(*,'(40(A,/))') &
WRITE(11,'(A)') " END INTERFACE"
WRITE(11,'(A)') ' INTERFACE check_real_eq'
- DO i = 1, ir
- j = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ j = rkind(i)
WRITE(chr2,'(I2)') j
WRITE(11,'(A)') " MODULE PROCEDURE real_eq_kind_"//TRIM(ADJUSTL(chr2))
END DO
@@ -839,8 +815,8 @@ WRITE(*,'(40(A,/))') &
! ***************************
! VALIDATE INTEGERS
! ***************************
- DO i = 1, ii
- k = ikind_numbers(i)
+ DO i = 1, num_ikinds
+ k = ikind(i)
WRITE(chr2,'(I2)') k
! DLL definitions for windows
WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)'
@@ -863,8 +839,8 @@ WRITE(*,'(40(A,/))') &
! ***************************
! VALIDATE REALS
! ***************************
- DO i = 1, ir
- k = rkind_numbers(i)
+ DO i = 1, num_rkinds
+ k = rkind(i)
WRITE(chr2,'(I2)') k
! DLL definitions for windows
WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_TEST_DLL)'
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index 16be9d1..2b98af2 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -508,6 +508,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index 30f7c55..cadba68 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -519,6 +519,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index 31184b3..073194a 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -459,6 +459,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/hl/Makefile.in b/hl/Makefile.in
index a451c55..b5fbb46 100644
--- a/hl/Makefile.in
+++ b/hl/Makefile.in
@@ -463,6 +463,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in
index 8016029..831dadc 100644
--- a/hl/c++/Makefile.in
+++ b/hl/c++/Makefile.in
@@ -459,6 +459,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in
index c463f1d..67a14ca 100644
--- a/hl/c++/examples/Makefile.in
+++ b/hl/c++/examples/Makefile.in
@@ -406,6 +406,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in
index 1771c8b..b903231 100644
--- a/hl/c++/src/Makefile.in
+++ b/hl/c++/src/Makefile.in
@@ -462,6 +462,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in
index 116aac4..4f88242 100644
--- a/hl/c++/test/Makefile.in
+++ b/hl/c++/test/Makefile.in
@@ -459,6 +459,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in
index 95e6124..ccf2308 100644
--- a/hl/examples/Makefile.in
+++ b/hl/examples/Makefile.in
@@ -406,6 +406,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in
index a7a4a15..6d87e82 100644
--- a/hl/fortran/Makefile.in
+++ b/hl/fortran/Makefile.in
@@ -463,6 +463,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in
index c60a93e..71e70dd 100644
--- a/hl/fortran/examples/Makefile.in
+++ b/hl/fortran/examples/Makefile.in
@@ -406,6 +406,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90
index 7b24730..092cdd9 100644
--- a/hl/fortran/src/H5LTff.F90
+++ b/hl/fortran/src/H5LTff.F90
@@ -3411,7 +3411,7 @@ CONTAINS
f_ptr = C_LOC(buf(1:1))
-#if FORTRAN_HAVE_STORAGE_SIZE!=0
+#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0
SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)
#else
SizeOf_buf_type = SIZEOF(buf(1))
@@ -3461,7 +3461,7 @@ CONTAINS
INTEGER(size_t) :: SizeOf_buf_type
f_ptr = C_LOC(buf(1))
-#if FORTRAN_HAVE_STORAGE_SIZE!=0
+#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0
SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)
#else
SizeOf_buf_type = SIZEOF(buf(1))
@@ -3512,7 +3512,7 @@ CONTAINS
f_ptr = C_LOC(buf(1))
-#if FORTRAN_HAVE_STORAGE_SIZE!=0
+#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0
SizeOf_buf_type = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)
#else
SizeOf_buf_type = SIZEOF(buf(1))
@@ -3563,7 +3563,7 @@ CONTAINS
f_ptr = C_LOC(buf(1)(1:1))
-#if FORTRAN_HAVE_STORAGE_SIZE!=0
+#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0
SizeOf_buf_type = STORAGE_SIZE(buf(1)(1:1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)
#else
SizeOf_buf_type = SIZEOF(buf(1:1)(1:1))
@@ -3665,7 +3665,7 @@ CONTAINS
f_ptr = C_LOC(buf(1))
-#if FORTRAN_HAVE_STORAGE_SIZE!=0
+#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0
SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)
#else
SizeOf_buf = SIZEOF(buf(1))
@@ -3711,7 +3711,7 @@ CONTAINS
INTEGER(size_t) :: SizeOf_buf
f_ptr = C_LOC(buf(1))
-#if FORTRAN_HAVE_STORAGE_SIZE!=0
+#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0
SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)
#else
SizeOf_buf = SIZEOF(buf(1))
@@ -3757,7 +3757,7 @@ CONTAINS
INTEGER(size_t) :: SizeOf_buf
f_ptr = C_LOC(buf(1))
-#if FORTRAN_HAVE_STORAGE_SIZE!=0
+#if H5_FORTRAN_HAVE_STORAGE_SIZE!=0
SizeOf_buf = STORAGE_SIZE(buf(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)
#else
SizeOf_buf = SIZEOF(buf(1))
diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in
index 4f8052d..1d20370 100644
--- a/hl/fortran/src/Makefile.in
+++ b/hl/fortran/src/Makefile.in
@@ -483,6 +483,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in
index 0f2f2a5..ee4b206 100644
--- a/hl/fortran/test/Makefile.in
+++ b/hl/fortran/test/Makefile.in
@@ -474,6 +474,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in
index 47f32c8..b82e702 100644
--- a/hl/src/Makefile.in
+++ b/hl/src/Makefile.in
@@ -461,6 +461,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in
index 4919a52..4614152 100644
--- a/hl/test/Makefile.in
+++ b/hl/test/Makefile.in
@@ -498,6 +498,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in
index 5aaf85b..653c273 100644
--- a/hl/tools/Makefile.in
+++ b/hl/tools/Makefile.in
@@ -460,6 +460,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in
index 5d4e6e3..6ebf126 100644
--- a/hl/tools/gif2h5/Makefile.in
+++ b/hl/tools/gif2h5/Makefile.in
@@ -474,6 +474,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4
index 5ff22a8..e069560 100644
--- a/m4/aclocal_fc.m4
+++ b/m4/aclocal_fc.m4
@@ -327,12 +327,15 @@ AC_RUN_IFELSE([
PROGRAM main
IMPLICIT NONE
INTEGER :: ik, k, lastkind, max_decimal_prec
+ INTEGER :: num_rkinds, num_ikinds
+ num_ikinds = 0
lastkind=SELECTED_INT_KIND(1)
OPEN(8, FILE='pac_fconftest.out', form='formatted')
WRITE(8,'(A)',ADVANCE='NO') 'A' ! Find integer KINDs
DO ik=2,36
k = SELECTED_INT_KIND(ik)
IF (k .NE. lastkind) THEN
+ num_ikinds = num_ikinds + 1
WRITE(8,'(I0)',ADVANCE='NO') lastkind
lastkind = k
IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' '
@@ -340,16 +343,19 @@ AC_RUN_IFELSE([
IF (k .LE. 0) EXIT
ENDDO
IF (lastkind.NE.-1) THEN
+ num_ikinds = num_ikinds + 1
WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'B '
ELSE
WRITE(8,'(A)',ADVANCE='NO') 'B '
ENDIF
WRITE(8,'(A)',ADVANCE='NO') 'C' ! Find real KINDs
+ num_rkinds = 0
lastkind=SELECTED_REAL_KIND(1)
max_decimal_prec = 1
DO ik=2,36
k = SELECTED_REAL_KIND(ik)
IF (k .NE. lastkind) THEN
+ num_rkinds = num_rkinds + 1
WRITE(8,'(I0)',ADVANCE='NO') lastkind
lastkind = k
IF(k.GT.0) WRITE(8,'(A)',ADVANCE='NO') ' '
@@ -358,11 +364,15 @@ AC_RUN_IFELSE([
IF (k .LE. 0) EXIT
ENDDO
IF (lastkind.NE.-1)THEN
+ num_rkinds = num_rkinds + 1
WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, 'D'
ELSE
WRITE(8,'(A)',ADVANCE='NO') 'D'
ENDIF
WRITE(8,'(A,I0,A)',ADVANCE='NO') ' E',max_decimal_prec,'F'
+
+ WRITE(8,'(A,I0,A)',ADVANCE='NO') ' a',num_ikinds,'b'
+ WRITE(8,'(A,I0,A)',ADVANCE='NO') ' c',num_rkinds,'d'
END
])
@@ -370,9 +380,11 @@ AC_RUN_IFELSE([
if test -s pac_fconftest.out ; then
dnl The output from the above program will be something like
- dnl A1 4 8 16B C4 8 10D E30F where:
+ dnl A1 4 8 16B C4 8 10D E30F a#b c#d where:
dnl - valid integer kinds are the numbers between A and B
+ dnl - number of valid integer kinds are the numbers between a and b
dnl - valid real kinds are the numbers between A and B
+ dnl - number of valid real kinds are the numbers between c and d
dnl - max decimal precision for reals is the number between E and F
tmp="`cat pac_fconftest.out`"
@@ -380,8 +392,20 @@ AC_RUN_IFELSE([
pac_validRealKinds="`echo $tmp | sed -e 's/.*C\(.*\)D.*/\1/'`"
PAC_FC_MAX_REAL_PRECISION="`echo $tmp | sed -e 's/.*E\(.*\)F.*/\1/'`"
AC_DEFINE_UNQUOTED([PAC_FC_MAX_REAL_PRECISION], $PAC_FC_MAX_REAL_PRECISION, [Define Fortran Maximum Real Decimal Precision])
+
PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}"
PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}"
+
+ dnl H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `echo $tmp | sed -e 's/.*c\(.*\)d.*/\1/'`"
+ dnl H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds | sed -e 's/ /,/g'`/)"
+ H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `echo $tmp | sed -e 's/.*a\(.*\)b.*/\1/'`"
+ H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds | sed -e 's/ /,/g'`/)"
+
+ dnl AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs])
+ AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_IKIND], $H5CONFIG_F_NUM_IKIND, [Define number of valid Fortran INTEGER KINDs])
+ dnl AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs])
+ AC_DEFINE_UNQUOTED([H5CONFIG_F_IKIND], $H5CONFIG_F_IKIND, [Define valid Fortran INTEGER KINDs])
+
AC_MSG_CHECKING([for Fortran INTEGER KINDs])
AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS])
AC_MSG_CHECKING([for Fortran REAL KINDs])
@@ -438,7 +462,7 @@ for kind in $pac_validIntKinds; do
pack_int_sizeof="$2"
])
done
-PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{ $pack_int_sizeof }"
+PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{`echo $pack_int_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}"
AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS_SIZEOF])
AC_LANG_POP([Fortran])
])
@@ -476,7 +500,7 @@ for kind in $pac_validRealKinds; do
pack_real_sizeof="$2"
])
done
-PAC_FC_ALL_REAL_KINDS_SIZEOF="{ $pack_real_sizeof }"
+PAC_FC_ALL_REAL_KINDS_SIZEOF="{`echo $pack_real_sizeof | sed -e 's/,$//' | sed -e 's/ //g'`}"
AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS_SIZEOF])
AC_LANG_POP([Fortran])
])
@@ -534,10 +558,16 @@ rm -f pac_Cconftest.out
AC_LANG_PROGRAM([
#include <float.h>
#include <stdio.h>
- #if __STDC_VERSION__ >= 199901L
+ #define CHECK_FLOAT128 $ac_cv_sizeof___float128
+ #if CHECK_FLOAT128!=0
+ #include <quadmath.h>
+ #define C_LDBL_DIG FLT128_DIG
+ #else
+ # if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define C_LDBL_DIG DECIMAL_DIG
- #else
+ # else
#define C_LDBL_DIG LDBL_DIG
+ # endif
#endif
],[[
FILE * pFile;
diff --git a/src/H5config.h.in b/src/H5config.h.in
index a174c6a..d7d1487 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -48,6 +48,21 @@
/* Determine the size of C long double */
#undef FORTRAN_SIZEOF_LONG_DOUBLE
+/* Define valid Fortran INTEGER KINDs */
+#undef H5CONFIG_F_IKIND
+
+/* Define number of valid Fortran INTEGER KINDs */
+#undef H5CONFIG_F_NUM_IKIND
+
+/* Define number of valid Fortran REAL KINDs */
+#undef H5CONFIG_F_NUM_RKIND
+
+/* Define valid Fortran REAL KINDs */
+#undef H5CONFIG_F_RKIND
+
+/* Define valid Fortran REAL KINDs Sizeof */
+#undef H5CONFIG_F_RKIND_SIZEOF
+
/* Define to 1 if you have the `alarm' function. */
#undef HAVE_ALARM
@@ -548,6 +563,9 @@
/* The size of `unsigned', as computed by sizeof. */
#undef SIZEOF_UNSIGNED
+/* The size of `__float128', as computed by sizeof. */
+#undef SIZEOF___FLOAT128
+
/* The size of `__int64', as computed by sizeof. */
#undef SIZEOF___INT64
diff --git a/src/Makefile.in b/src/Makefile.in
index 9390993..ffa6fa9 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -522,6 +522,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/test/Makefile.in b/test/Makefile.in
index 5ca332b..d3f1b86 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -866,6 +866,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/testpar/Makefile.in b/testpar/Makefile.in
index 228d678..5797dfc 100644
--- a/testpar/Makefile.in
+++ b/testpar/Makefile.in
@@ -493,6 +493,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/tools/Makefile.in b/tools/Makefile.in
index feebdc4..0f5684d 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -460,6 +460,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in
index 8b07885..1b50662 100644
--- a/tools/h5copy/Makefile.in
+++ b/tools/h5copy/Makefile.in
@@ -468,6 +468,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in
index dc79985..7b4d121 100644
--- a/tools/h5diff/Makefile.in
+++ b/tools/h5diff/Makefile.in
@@ -475,6 +475,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in
index d423072..9865e3a 100644
--- a/tools/h5dump/Makefile.in
+++ b/tools/h5dump/Makefile.in
@@ -474,6 +474,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in
index 4ee206c..d6e784a 100644
--- a/tools/h5import/Makefile.in
+++ b/tools/h5import/Makefile.in
@@ -468,6 +468,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in
index 0c6274a..c915437 100644
--- a/tools/h5jam/Makefile.in
+++ b/tools/h5jam/Makefile.in
@@ -480,6 +480,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in
index e1ffa9a..8fb9822 100644
--- a/tools/h5ls/Makefile.in
+++ b/tools/h5ls/Makefile.in
@@ -460,6 +460,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in
index 637d9dd..c0b6685 100644
--- a/tools/h5repack/Makefile.in
+++ b/tools/h5repack/Makefile.in
@@ -492,6 +492,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in
index de1df70..6bf37f3 100644
--- a/tools/h5stat/Makefile.in
+++ b/tools/h5stat/Makefile.in
@@ -470,6 +470,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in
index 5d20d4f..fcfb019 100644
--- a/tools/lib/Makefile.in
+++ b/tools/lib/Makefile.in
@@ -457,6 +457,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in
index 89b7d5e..2688e8d 100644
--- a/tools/misc/Makefile.in
+++ b/tools/misc/Makefile.in
@@ -495,6 +495,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in
index 7ca11ef..4804533 100644
--- a/tools/perform/Makefile.in
+++ b/tools/perform/Makefile.in
@@ -499,6 +499,11 @@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@