From 244784ab2cf816b135f27bf03b5a4fb91502aed9 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 27 May 2015 17:07:18 -0500 Subject: [svn-r27115] Moved testing KINDs and SIZEOFs to configure. --- Makefile.in | 11 + c++/Makefile.in | 11 + c++/examples/Makefile.in | 11 + c++/src/Makefile.in | 11 + c++/test/Makefile.in | 11 + configure | 4050 +++++++++++++++++++++------------------ configure.ac | 42 +- examples/Makefile.in | 11 + fortran/Makefile.in | 11 + fortran/examples/Makefile.in | 11 + fortran/src/H5_f.c | 26 +- fortran/src/H5_ff.F90 | 12 +- fortran/src/H5config_f.inc.in | 3 + fortran/src/H5f90global.F90 | 12 +- fortran/src/H5match_types.c | 607 +++--- fortran/src/Makefile.am | 16 +- fortran/src/Makefile.in | 55 +- fortran/test/Makefile.in | 11 + fortran/test/tH5R.f90 | 2 - fortran/test/tH5T.f90 | 1 - fortran/test/tH5T_F03.f90 | 18 +- fortran/test/tf.F90 | 2 +- fortran/testpar/Makefile.in | 11 + hl/Makefile.in | 11 + hl/c++/Makefile.in | 11 + hl/c++/examples/Makefile.in | 11 + hl/c++/src/Makefile.in | 11 + hl/c++/test/Makefile.in | 11 + hl/examples/Makefile.in | 11 + hl/fortran/Makefile.in | 11 + hl/fortran/examples/Makefile.in | 11 + hl/fortran/src/H5LTf90proto.h | 5 +- hl/fortran/src/H5LTfc.c | 34 +- hl/fortran/src/H5LTff.F90 | 271 ++- hl/fortran/src/Makefile.in | 11 + hl/fortran/test/Makefile.in | 11 + hl/fortran/test/tstlite.f90 | 242 ++- hl/src/Makefile.in | 11 + hl/test/Makefile.in | 11 + hl/tools/Makefile.in | 11 + hl/tools/gif2h5/Makefile.in | 11 + m4/aclocal_fc.m4 | 191 +- src/H5config.h.in | 6 + src/Makefile.in | 11 + test/Makefile.in | 11 + testpar/Makefile.in | 11 + tools/Makefile.in | 11 + tools/h5copy/Makefile.in | 11 + tools/h5diff/Makefile.in | 11 + tools/h5dump/Makefile.in | 11 + tools/h5import/Makefile.in | 11 + tools/h5jam/Makefile.in | 11 + tools/h5ls/Makefile.in | 11 + tools/h5repack/Makefile.in | 11 + tools/h5stat/Makefile.in | 11 + tools/lib/Makefile.in | 11 + tools/misc/Makefile.in | 11 + tools/perform/Makefile.in | 11 + 58 files changed, 3614 insertions(+), 2410 deletions(-) diff --git a/Makefile.in b/Makefile.in index faf439a..65115ad 100644 --- a/Makefile.in +++ b/Makefile.in @@ -305,6 +305,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -351,6 +352,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/c++/Makefile.in b/c++/Makefile.in index 0efb387..d4bc007 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -465,6 +465,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -511,6 +512,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index df861e3..6c25046 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -413,6 +413,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -459,6 +460,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index cf2026a..96c1f2b 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -476,6 +476,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -522,6 +523,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index 5279c32..4e616cd 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -467,6 +467,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -513,6 +514,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/configure b/configure index a886828..ced18b9 100755 --- a/configure +++ b/configure @@ -199,6 +199,7 @@ test -x / || exit 1" as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' @@ -206,8 +207,7 @@ test -x / || exit 1" ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else @@ -682,7 +682,6 @@ AM_MAKEFLAGS LT_STATIC_EXEC USE_PLUGINS_CONDITIONAL_FALSE USE_PLUGINS_CONDITIONAL_TRUE -CPP OTOOL64 OTOOL LIPO @@ -699,8 +698,6 @@ ac_ct_DUMPBIN DUMPBIN LD FGREP -EGREP -GREP SED LIBTOOL FORTRAN_SHARED_CONDITIONAL_FALSE @@ -722,6 +719,16 @@ am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF +PAC_FORTRAN_NATIVE_DOUBLE_KIND +PAC_FORTRAN_NATIVE_REAL_SIZEOF +PAC_FORTRAN_NATIVE_REAL_KIND +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF +PAC_FORTRAN_NATIVE_INTEGER_KIND +PAC_FC_ALL_INTEGER_KINDS_SIZEOF +PAC_FC_ALL_REAL_KINDS_SIZEOF +PAC_FC_ALL_INTEGER_KINDS +PAC_FC_ALL_REAL_KINDS FCLIBS F9XMODEXT F9XMODFLAG @@ -739,6 +746,9 @@ HADDR_T R_INTEGER R_LARGE HDF5_INTERFACES +EGREP +GREP +CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -761,6 +771,7 @@ enable_shared STATIC_SHARED THREADSAFE DIRECT_VFD +HAVE_FLOAT128 HAVE_DMALLOC CODESTACK INSTRUMENT @@ -911,13 +922,13 @@ CFLAGS LDFLAGS LIBS CPPFLAGS +CPP FC FCFLAGS CXX CXXFLAGS CCC -CXXCPP -CPP' +CXXCPP' # Initialize some variables set by options. @@ -1642,12 +1653,12 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + CPP C preprocessor FC Fortran compiler command FCFLAGS Fortran compiler flags CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor - CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1767,59 +1778,245 @@ fi } # ac_fn_c_try_compile -# ac_fn_fc_try_compile LINENO -# --------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_compile () +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" + if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err + (eval "$ac_link") 2>&5 ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : ac_retval=0 else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=$ac_status fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_fc_try_compile +} # ac_fn_c_try_run -# ac_fn_fc_try_link LINENO -# ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_link () +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 &5 - (eval "$ac_link") 2>conftest.err + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 @@ -1827,19 +2024,126 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_fc_try_compile LINENO +# --------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_fc_try_compile + +# ac_fn_fc_try_link LINENO +# ------------------------ +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would @@ -1897,6 +2201,48 @@ fi } # ac_fn_c_try_link +# ac_fn_fc_try_run LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_fc_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_fc_try_run + # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. @@ -2018,11 +2364,10 @@ fi } # ac_fn_cxx_try_link -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 @@ -2032,190 +2377,81 @@ if eval \${$3+:} false; then : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$4 -#include <$2> +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +#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 () +{ +return $2 (); + ; + return 0; +} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_c_check_header_compile +} # ac_fn_c_check_func -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -#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 () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2364,75 +2600,19 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_type -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#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 () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#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 () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -2448,197 +2628,22 @@ $4 int main () { -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; #endif #endif -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break + eval "$3=yes" else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#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 () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -#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 () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#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 () -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" + eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -3852,6 +3857,7 @@ $as_echo "done" >&6; } ## INSTRUMENT: whether INSTRUMENT is enabled. No default set here. ## CODESTACK: whether CODESTACK is enabled. Default no. ## HAVE_DMALLOC: whether system has dmalloc support. Default no. +## HAVE_FLOAT128: whether system has Quad-Precision Math Library. Default no. ## DIRECT_VFD: whether DIRECT_VFD is enabled. Default no. ## THREADSAFE: whether THREADSAFE is enabled. Default no. ## STATIC_SHARED: whether static and/or shared libraries are requested. @@ -3870,6 +3876,7 @@ $as_echo "done" >&6; } CODESTACK=no HAVE_DMALLOC=no + HAVE_FLOAT128=no DIRECT_VFD=no THREADSAFE=no @@ -5099,331 +5106,490 @@ $as_echo "yes" >&6; } ;; esac -## ---------------------------------------------------------------------- -## Check if they would like the Fortran interface compiled -## - HDF5_INTERFACES="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran interface enabled" >&5 -$as_echo_n "checking if Fortran interface enabled... " >&6; } -# Check whether --enable-fortran was given. -if test "${enable_fortran+set}" = set; then : - enableval=$enable_fortran; HDF_FORTRAN=$enableval -fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : -if test "X$HDF_FORTRAN" = "Xyes"; then - echo "yes" else - echo "no" + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.i conftest.$ac_ext -if test "X$HDF_FORTRAN" = "Xyes"; then - -## We will output an include file for Fortran, H5config_f.inc which -## contains various configure definitions used by the Fortran Library. -## Prepend H5_ to all macro names. This avoids name conflict between HDF5 macro -## names and those generated by another software package that uses the HDF5 library. - ac_config_headers="$ac_config_headers fortran/src/H5config_f.inc" + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi - HDF_FORTRAN=yes - - HDF5_INTERFACES="$HDF5_INTERFACES fortran" - - ## -------------------------------------------------------------------- - ## HDF5 integer variables for the H5fortran_types.f90 file. - ## - + done + ac_cv_prog_CPP=$CPP +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - ## -------------------------------------------------------------------- - ## Fortran source extention - ## - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$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_FC+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$FC"; then - ac_cv_prog_FC="$FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do 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_FC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break done -IFS=$as_save_IFS + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac -fi -fi -FC=$ac_cv_prog_FC -if test -n "$FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -$as_echo "$FC" >&6; } + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_path_GREP=$GREP fi - - test -n "$FC" && break - done fi -if test -z "$FC"; then - ac_ct_FC=$FC - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 -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_ac_ct_FC+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_FC"; then - ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do 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_ac_ct_FC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break done -IFS=$as_save_IFS + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac -fi -fi -ac_ct_FC=$ac_cv_prog_ac_ct_FC -if test -n "$ac_ct_FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -$as_echo "$ac_ct_FC" >&6; } + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_path_EGREP=$EGREP fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" - test -n "$ac_ct_FC" && break -done - if test "x$ac_ct_FC" = x; then - FC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - FC=$ac_ct_FC - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done -rm -f a.out +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } -if ${ac_cv_fc_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 else - cat > conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_compiler_gnu=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + else - ac_compiler_gnu=no + ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_fc_compiler_gnu=$ac_compiler_gnu +rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -$as_echo "$ac_cv_fc_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+set} -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -$as_echo_n "checking whether $FC accepts -g... " >&6; } -if ${ac_cv_prog_fc_g+:} false; then : - $as_echo_n "(cached) " >&6 + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : else - FCFLAGS=-g -cat > conftest.$ac_ext <<_ACEOF - program main + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif - end +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_prog_fc_g=yes +if ac_fn_c_try_run "$LINENO"; then : + else - ac_cv_prog_fc_g=no + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -$as_echo "$ac_cv_prog_fc_g" >&6; } -if test "$ac_test_FCFLAGS" = set; then - FCFLAGS=$ac_save_FCFLAGS -elif test $ac_cv_prog_fc_g = yes; then - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-g -O2" - else - FCFLAGS="-g" - fi -else - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-O2" - else - FCFLAGS= - fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h -if test $ac_compiler_gnu = yes; then - GFC=yes -else - GFC= fi -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } -if ${ac_cv_fc_srcext_f90+:} false; then : +fi + +done + + +# 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 long double" >&5 +$as_echo_n "checking size of long double... " >&6; } +if ${ac_cv_sizeof_long_double+:} false; then : $as_echo_n "(cached) " >&6 else - ac_ext=f90 -ac_fcflags_srcext_save=$ac_fcflags_srcext -ac_fcflags_srcext= -ac_cv_fc_srcext_f90=unknown -case $ac_ext in #( - [fF]77) ac_try=f77;; #( - *) ac_try=f95;; -esac -for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do - test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" - cat > conftest.$ac_ext <<_ACEOF - program main + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then : - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_fc_srcext_f90=$ac_flag; break +else + if test "$ac_cv_type_long_double" = 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 (long double) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long_double=0 + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest.$ac_objext conftest.f90 -ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -$as_echo "$ac_cv_fc_srcext_f90" >&6; } -if test "x$ac_cv_fc_srcext_f90" = xunknown; then - as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 -else - ac_fc_srcext=f90 - if test "x$ac_cv_fc_srcext_f90" = xnone; then - ac_fcflags_srcext="" - FCFLAGS_f90="" - else - ac_fcflags_srcext=$ac_cv_fc_srcext_f90 - FCFLAGS_f90=$ac_cv_fc_srcext_f90 - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5 +$as_echo "$ac_cv_sizeof_long_double" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double +_ACEOF + +## ---------------------------------------------------------------------- +## Check if they would like the Fortran interface compiled +## + HDF5_INTERFACES="" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran interface enabled" >&5 +$as_echo_n "checking if Fortran interface enabled... " >&6; } +# Check whether --enable-fortran was given. +if test "${enable_fortran+set}" = set; then : + enableval=$enable_fortran; HDF_FORTRAN=$enableval fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test "X$HDF_FORTRAN" = "Xyes"; then + echo "yes" +else + echo "no" +fi +if test "X$HDF_FORTRAN" = "Xyes"; then +## We will output an include file for Fortran, H5config_f.inc which +## contains various configure definitions used by the Fortran Library. +## Prepend H5_ to all macro names. This avoids name conflict between HDF5 macro +## names and those generated by another software package that uses the HDF5 library. + ac_config_headers="$ac_config_headers fortran/src/H5config_f.inc" - ## -------------------------------------------------------------------- - ## Check for a Fortran compiler and how to include modules. - ## + + HDF_FORTRAN=yes + + HDF5_INTERFACES="$HDF5_INTERFACES fortran" + + ## -------------------------------------------------------------------- + ## HDF5 integer variables for the H5fortran_types.f90 file. + ## + + + + + + + + + + ## -------------------------------------------------------------------- + ## Fortran source extention + ## ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -5467,7 +5633,7 @@ fi fi if test -z "$FC"; then ac_ct_FC=$FC - for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -5623,96 +5789,61 @@ if test $ac_compiler_gnu = yes; then else GFC= fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking what $FC does with modules" >&5 -$as_echo_n "checking what $FC does with modules... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -test -d conftestdir || mkdir conftestdir -cd conftestdir -rm -rf * - -cat >conftest.$ac_ext <&5 +$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } +if ${ac_cv_fc_srcext_f90+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=f90 +ac_fcflags_srcext_save=$ac_fcflags_srcext +ac_fcflags_srcext= +ac_cv_fc_srcext_f90=unknown +case $ac_ext in #( + [fF]77) ac_try=f77;; #( + *) ac_try=f95;; +esac +for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do + test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" + cat > conftest.$ac_ext <<_ACEOF + program main - case "$f" in - *.o) F9XMODEXT="o" ;; - *.mod) F9XMODEXT="mod" ;; - *.M) F9XMODEXT="M" ;; - esac - fi + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_fc_srcext_f90=$ac_flag; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done +rm -f conftest.$ac_objext conftest.f90 +ac_fcflags_srcext=$ac_fcflags_srcext_save -echo $modfiles 6>&1 -if test "$modfiles" = file.o; then - echo $ac_n "checking whether $FC -em is saner""... $ac_c" 1>&6 - OLD_FCFLAGS=$FCFLAGS - FCFLAGS="$FCFLAGS -em" - eval $ac_compile - modfiles="" - for f in file.o module.mod MODULE.mod module.M MODULE.M; do - test -f $f && modfiles="$f" - done - if test "$modfiles" = "file.o"; then - FCFLAGS=$OLD_FCFLAGS - echo no 6>&1 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 +$as_echo "$ac_cv_fc_srcext_f90" >&6; } +if test "x$ac_cv_fc_srcext_f90" = xunknown; then + as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 +else + ac_fc_srcext=f90 + if test "x$ac_cv_fc_srcext_f90" = xnone; then + ac_fcflags_srcext="" + FCFLAGS_f90="" else - echo yes 6>&1 + ac_fcflags_srcext=$ac_cv_fc_srcext_f90 + FCFLAGS_f90=$ac_cv_fc_srcext_f90 fi -fi -cd .. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how $FC finds modules" >&5 -$as_echo_n "checking how $FC finds modules... " >&6; } - -for flag in "-I" "-M" "-p"; do - cat >conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - F9XMODFLAG=$flag - break - fi -done -if test -n "$F9XMODFLAG"; then - echo $F9XMODFLAG 1>&6 - FCFLAGS="$F9XMODFLAG. $FCFLAGS" -else - echo unknown 1>&6 fi - - -rm -rf conftest* ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5721,187 +5852,495 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - ## Change to the Fortran 90 language + + + ## -------------------------------------------------------------------- + ## Check for a Fortran compiler and how to include modules. + ## ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$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_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$FC"; then + ac_cv_prog_FC="$FC" # 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_FC="$ac_tool_prefix$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 +FC=$ac_cv_prog_FC +if test -n "$FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - ## Checking if the compiler supports the required Fortran 2003 features and - ## stopping if it does not. - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5 -$as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HDF... " >&6; } - HAVE_FORTRAN_2003="no" - HAVE_F2003_REQUIREMENTS="no" - cat > conftest.$ac_ext <<_ACEOF - program main - - - USE iso_c_binding - IMPLICIT NONE - TYPE(C_PTR) :: ptr - TYPE(C_FUNPTR) :: funptr - CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr - - ptr = C_LOC(ichr(1:1)) + test -n "$FC" && break + done +fi +if test -z "$FC"; then + ac_ct_FC=$FC + for ac_prog in gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc +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_ac_ct_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_FC"; then + ac_cv_prog_ac_ct_FC="$ac_ct_FC" # 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_ac_ct_FC="$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 - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_F2003_REQUIREMENTS=yes +fi +fi +ac_ct_FC=$ac_cv_prog_ac_ct_FC +if test -n "$ac_ct_FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 +$as_echo "$ac_ct_FC" >&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_exeext conftest.$ac_ext - if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then - as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran" "$LINENO" 5 - else - HAVE_FORTRAN_2003="yes" - fi + test -n "$ac_ct_FC" && break +done - ## -------------------------------------------------------------------- - ## Define wrappers for the C compiler to use Fortran function names - ## - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 -$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } -if ${ac_cv_prog_fc_v+:} false; then : + if test "x$ac_ct_FC" = x; then + FC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + FC=$ac_ct_FC + fi +fi + + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } +if ${ac_cv_fc_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF program main +#ifndef __GNUC__ + choke me +#endif end _ACEOF if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_prog_fc_v= -# Try some options frequently used verbose output -for ac_verb in -v -verbose --verbose -V -\#\#\#; do - cat > conftest.$ac_ext <<_ACEOF + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_fc_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 +$as_echo "$ac_cv_fc_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FCFLAGS=${FCFLAGS+set} +ac_save_FCFLAGS=$FCFLAGS +FCFLAGS= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 +$as_echo_n "checking whether $FC accepts -g... " >&6; } +if ${ac_cv_prog_fc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + FCFLAGS=-g +cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_prog_fc_g=yes +else + ac_cv_prog_fc_g=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Compile and link our simple test program by passing a flag (argument -# 1 to this macro) to the Fortran compiler in order to get -# "verbose" output that we can then parse for the Fortran linker -# flags. -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS="$FCFLAGS $ac_verb" -eval "set x $ac_link" -shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 -# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, -# LIBRARY_PATH; skip all such settings. -ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | - sed '/^Driving:/d; /^Configured with:/d; - '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_fc_v_output" >&5 -FCFLAGS=$ac_save_FCFLAGS - -rm -rf conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 +$as_echo "$ac_cv_prog_fc_g" >&6; } +if test "$ac_test_FCFLAGS" = set; then + FCFLAGS=$ac_save_FCFLAGS +elif test $ac_cv_prog_fc_g = yes; then + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-g -O2" + else + FCFLAGS="-g" + fi +else + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-O2" + else + FCFLAGS= + fi +fi -# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where -# /foo, /bar, and /baz are search directories for the Fortran linker. -# Here, we change these into -L/foo -L/bar -L/baz (and put it first): -ac_fc_v_output="`echo $ac_fc_v_output | - grep 'LPATH is:' | - sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" +if test $ac_compiler_gnu = yes; then + GFC=yes +else + GFC= +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -# FIXME: we keep getting bitten by quoted arguments; a more general fix -# that detects unbalanced quotes in FLIBS should be implemented -# and (ugh) tested at some point. -case $ac_fc_v_output in - # With xlf replace commas with spaces, - # and remove "-link" and closing parenthesis. - *xlfentry*) - ac_fc_v_output=`echo $ac_fc_v_output | - sed ' - s/,/ /g - s/ -link / /g - s/) *$// - ' - ` ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what $FC does with modules" >&5 +$as_echo_n "checking what $FC does with modules... " >&6; } +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu - # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted - # $LIBS confuse us, and the libraries appear later in the output anyway). - *mGLOB_options_string*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; - # Portland Group compiler has singly- or doubly-quoted -cmdline argument - # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. - # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". - *-cmdline\ * | *-ignore\ * | *-def\ *) - ac_fc_v_output=`echo $ac_fc_v_output | sed "\ - s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g - s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g - s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; +test -d conftestdir || mkdir conftestdir +cd conftestdir +rm -rf * - # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. - *fort77*f2c*gcc*) - ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' - /:[ ]\+Running[ ]\{1,\}"gcc"/{ - /"-c"/d - /[.]c"*/d - s/^.*"gcc"/"gcc"/ - s/"//gp - }'` ;; +cat >conftest.$ac_ext <&5 -$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} -fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -$as_echo "$as_me: WARNING: compilation failed" >&2;} -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +echo $modfiles 6>&1 +if test "$modfiles" = file.o; then + echo $ac_n "checking whether $FC -em is saner""... $ac_c" 1>&6 + OLD_FCFLAGS=$FCFLAGS + FCFLAGS="$FCFLAGS -em" + eval $ac_compile + modfiles="" + for f in file.o module.mod MODULE.mod module.M MODULE.M; do + test -f $f && modfiles="$f" + done + if test "$modfiles" = "file.o"; then + FCFLAGS=$OLD_FCFLAGS + echo no 6>&1 + else + echo yes 6>&1 + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 -$as_echo "$ac_cv_prog_fc_v" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 -$as_echo_n "checking for Fortran libraries of $FC... " >&6; } -if ${ac_cv_fc_libs+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$FCLIBS" != "x"; then - ac_cv_fc_libs="$FCLIBS" # Let the user override the test. -else +cd .. -cat > conftest.$ac_ext <<_ACEOF - program main +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how $FC finds modules" >&5 +$as_echo_n "checking how $FC finds modules... " >&6; } - end -_ACEOF +for flag in "-I" "-M" "-p"; do + cat >conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + F9XMODFLAG=$flag + break + fi +done + +if test -n "$F9XMODFLAG"; then + echo $F9XMODFLAG 1>&6 + FCFLAGS="$F9XMODFLAG. $FCFLAGS" +else + echo unknown 1>&6 +fi + + +rm -rf conftest* +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + ## Change to the Fortran 90 language + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + + ## Checking if the compiler supports the required Fortran 2003 features and + ## stopping if it does not. + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler version compatible with Fortran 2003 HDF" >&5 +$as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HDF... " >&6; } + HAVE_FORTRAN_2003="no" + HAVE_F2003_REQUIREMENTS="no" + cat > conftest.$ac_ext <<_ACEOF + program main + + + USE iso_c_binding + IMPLICIT NONE + TYPE(C_PTR) :: ptr + TYPE(C_FUNPTR) :: funptr + CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr + + ptr = C_LOC(ichr(1:1)) + + + end +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_F2003_REQUIREMENTS=yes +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_exeext conftest.$ac_ext + + + if test "X$HAVE_F2003_REQUIREMENTS" = "Xno"; then + as_fn_error $? "Fortran compiler lacks required Fortran 2003 features; unsupported Fortran 2003 compiler, remove --enable-fortran" "$LINENO" 5 + else + HAVE_FORTRAN_2003="yes" + fi + + ## -------------------------------------------------------------------- + ## Define wrappers for the C compiler to use Fortran function names + ## + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 +$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } +if ${ac_cv_prog_fc_v+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_prog_fc_v= +# Try some options frequently used verbose output +for ac_verb in -v -verbose --verbose -V -\#\#\#; do + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF + +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran compiler in order to get +# "verbose" output that we can then parse for the Fortran linker +# flags. +ac_save_FCFLAGS=$FCFLAGS +FCFLAGS="$FCFLAGS $ac_verb" +eval "set x $ac_link" +shift +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, +# LIBRARY_PATH; skip all such settings. +ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | + sed '/^Driving:/d; /^Configured with:/d; + '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` +$as_echo "$ac_fc_v_output" >&5 +FCFLAGS=$ac_save_FCFLAGS + +rm -rf conftest* + +# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where +# /foo, /bar, and /baz are search directories for the Fortran linker. +# Here, we change these into -L/foo -L/bar -L/baz (and put it first): +ac_fc_v_output="`echo $ac_fc_v_output | + grep 'LPATH is:' | + sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" + +# FIXME: we keep getting bitten by quoted arguments; a more general fix +# that detects unbalanced quotes in FLIBS should be implemented +# and (ugh) tested at some point. +case $ac_fc_v_output in + # With xlf replace commas with spaces, + # and remove "-link" and closing parenthesis. + *xlfentry*) + ac_fc_v_output=`echo $ac_fc_v_output | + sed ' + s/,/ /g + s/ -link / /g + s/) *$// + ' + ` ;; + + # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted + # $LIBS confuse us, and the libraries appear later in the output anyway). + *mGLOB_options_string*) + ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; + + # Portland Group compiler has singly- or doubly-quoted -cmdline argument + # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. + # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". + *-cmdline\ * | *-ignore\ * | *-def\ *) + ac_fc_v_output=`echo $ac_fc_v_output | sed "\ + s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g + s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g + s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; + + # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. + *fort77*f2c*gcc*) + ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' + /:[ ]\+Running[ ]\{1,\}"gcc"/{ + /"-c"/d + /[.]c"*/d + s/^.*"gcc"/"gcc"/ + s/"//gp + }'` ;; + + # If we are using Cray Fortran then delete quotes. + *cft90*) + ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;; +esac + + + # look for -l* and *.a constructs in the output + for ac_arg in $ac_fc_v_output; do + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) + ac_cv_prog_fc_v=$ac_verb + break 2 ;; + esac + done +done +if test -z "$ac_cv_prog_fc_v"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 +$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} +fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +$as_echo "$as_me: WARNING: compilation failed" >&2;} +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 +$as_echo "$ac_cv_prog_fc_v" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 +$as_echo_n "checking for Fortran libraries of $FC... " >&6; } +if ${ac_cv_fc_libs+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$FCLIBS" != "x"; then + ac_cv_fc_libs="$FCLIBS" # Let the user override the test. +else + +cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF # Compile and link our simple test program by passing a flag (argument # 1 to this macro) to the Fortran compiler in order to get @@ -6087,142 +6526,572 @@ done # restore positional arguments set X $ac_save_positional; shift -# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, -# then we insist that the "run path" must be an absolute path (i.e. it -# must begin with a "/"). -case `(uname -sr) 2>/dev/null` in - "SunOS 5"*) - ac_ld_run_path=`$as_echo "$ac_fc_v_output" | - sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` - test "x$ac_ld_run_path" != x && - if test "$ac_compiler_gnu" = yes; then - for ac_link_opt in $ac_ld_run_path; do - ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" - done +# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, +# then we insist that the "run path" must be an absolute path (i.e. it +# must begin with a "/"). +case `(uname -sr) 2>/dev/null` in + "SunOS 5"*) + ac_ld_run_path=`$as_echo "$ac_fc_v_output" | + sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` + test "x$ac_ld_run_path" != x && + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_ld_run_path; do + ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" + done +else + ac_cv_fc_libs="$ac_cv_fc_libs $ac_ld_run_path" +fi + ;; +esac +fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 +$as_echo "$ac_cv_fc_libs" >&6; } +FCLIBS="$ac_cv_fc_libs" + + +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 +$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } +if ${ac_cv_fc_dummy_main+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_fc_dm_save_LIBS=$LIBS + LIBS="$LIBS $FCLIBS" + ac_fortran_dm_var=FC_DUMMY_MAIN + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # First, try linking without a dummy main: + 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 () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_fortran_dummy_main=none +else + ac_cv_fortran_dummy_main=unknown +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + if test $ac_cv_fortran_dummy_main = unknown; then + for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define $ac_fortran_dm_var $ac_func +#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 () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_fortran_dummy_main=$ac_func; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + fi + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ac_cv_fc_dummy_main=$ac_cv_fortran_dummy_main + rm -rf conftest* + LIBS=$ac_fc_dm_save_LIBS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 +$as_echo "$ac_cv_fc_dummy_main" >&6; } +FC_DUMMY_MAIN=$ac_cv_fc_dummy_main +if test "$FC_DUMMY_MAIN" != unknown; then : + if test $FC_DUMMY_MAIN != none; then + +cat >>confdefs.h <<_ACEOF +#define FC_DUMMY_MAIN $FC_DUMMY_MAIN +_ACEOF + + if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then + +$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h + + fi +fi +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "linking to Fortran libraries from C fails +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 +$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } +if ${ac_cv_fc_mangling+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + subroutine foobar() + return + end + subroutine foo_bar() + return + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + mv conftest.$ac_objext cfortran_test.$ac_objext + + ac_save_LIBS=$LIBS + LIBS="cfortran_test.$ac_objext $LIBS $FCLIBS" + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_success=no + for ac_foobar in foobar FOOBAR; do + for ac_underscore in "" "_"; do + ac_func="$ac_foobar$ac_underscore" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +#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 () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_success=yes; break 2 +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + done + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + if test "$ac_success" = "yes"; then + case $ac_foobar in + foobar) + ac_case=lower + ac_foo_bar=foo_bar + ;; + FOOBAR) + ac_case=upper + ac_foo_bar=FOO_BAR + ;; + esac + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_success_extra=no + for ac_extra in "" "_"; do + ac_func="$ac_foo_bar$ac_underscore$ac_extra" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +#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 () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_success_extra=yes; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + if test "$ac_success_extra" = "yes"; then + ac_cv_fc_mangling="$ac_case case" + if test -z "$ac_underscore"; then + ac_cv_fc_mangling="$ac_cv_fc_mangling, no underscore" + else + ac_cv_fc_mangling="$ac_cv_fc_mangling, underscore" + fi + if test -z "$ac_extra"; then + ac_cv_fc_mangling="$ac_cv_fc_mangling, no extra underscore" + else + ac_cv_fc_mangling="$ac_cv_fc_mangling, extra underscore" + fi + else + ac_cv_fc_mangling="unknown" + fi + else + ac_cv_fc_mangling="unknown" + fi + + LIBS=$ac_save_LIBS + rm -rf conftest* + rm -f cfortran_test* else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_ld_run_path" + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compile a simple Fortran program +See \`config.log' for more details" "$LINENO" 5; } fi - ;; -esac -fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 -$as_echo "$ac_cv_fc_libs" >&6; } -FCLIBS="$ac_cv_fc_libs" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 +$as_echo "$ac_cv_fc_mangling" >&6; } +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu +case $ac_cv_fc_mangling in + "lower case, no underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h + ;; + "lower case, no underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + ;; + "lower case, underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + ;; + "lower case, underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h + ;; + "upper case, no underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h + ;; + "upper case, no underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + ;; + "upper case, underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + ;; + "upper case, underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + ;; +esac ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 -$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } -if ${ac_cv_fc_dummy_main+:} false; then : - $as_echo_n "(cached) " >&6 + + ## -------------------------------------------------------------------- + ## See if the fortran compiler supports the intrinsic function "SIZEOF" + + HAVE_SIZEOF_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic SIZEOF" >&5 +$as_echo_n "checking if Fortran compiler supports intrinsic SIZEOF... " >&6; } + cat > conftest.$ac_ext <<_ACEOF + + PROGRAM main + i = sizeof(x) + END PROGRAM + +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_SIZEOF_FORTRAN="yes" else - ac_fc_dm_save_LIBS=$LIBS - LIBS="$LIBS $FCLIBS" - ac_fortran_dm_var=FC_DUMMY_MAIN - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + { $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_exeext conftest.$ac_ext - # First, try linking without a dummy main: - 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 () -{ + ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" + + HAVE_C_SIZEOF_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_SIZEOF" >&5 +$as_echo_n "checking if Fortran compiler supports intrinsic C_SIZEOF... " >&6; } + cat > conftest.$ac_ext <<_ACEOF + + PROGRAM main + USE ISO_C_BINDING + INTEGER(C_INT) :: a + INTEGER(C_SIZE_T) :: result + result = C_SIZEOF(a) + END PROGRAM - ; - return 0; -} _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_fortran_dummy_main=none +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_C_SIZEOF_FORTRAN="yes" else - ac_cv_fortran_dummy_main=unknown + { $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_exeext conftest.$ac_ext - if test $ac_cv_fortran_dummy_main = unknown; then - for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define $ac_fortran_dm_var $ac_func -#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 () -{ - ; - return 0; -} + ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" + + HAVE_STORAGE_SIZE_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic STORAGE_SIZE" >&5 +$as_echo_n "checking if Fortran compiler supports intrinsic STORAGE_SIZE... " >&6; } + cat > conftest.$ac_ext <<_ACEOF + + PROGRAM main + INTEGER :: a + INTEGER :: result + result = STORAGE_SIZE(a) + END PROGRAM + _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_fortran_dummy_main=$ac_func; break +if ac_fn_fc_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_STORAGE_SIZE_FORTRAN="yes" +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_exeext conftest.$ac_ext - done - fi - ac_ext=${ac_fc_srcext-f} + + + + ## See if C_LONG_DOUBLE is available, and if it is different from C_DOUBLE + + HAVE_C_LONG_DOUBLE_FORTRAN="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran C_LONG_DOUBLE is valid" >&5 +$as_echo_n "checking if Fortran C_LONG_DOUBLE is valid... " >&6; } + + cat > conftest.$ac_ext <<_ACEOF + + MODULE type_mod + USE ISO_C_BINDING + INTERFACE h5t + MODULE PROCEDURE h5t_c_double + MODULE PROCEDURE h5t_c_long_double + END INTERFACE + CONTAINS + SUBROUTINE h5t_c_double(r) + REAL(KIND=C_DOUBLE) :: r + END SUBROUTINE h5t_c_double + SUBROUTINE h5t_c_long_double(d) + REAL(KIND=C_LONG_DOUBLE) :: d + END SUBROUTINE h5t_c_long_double + END MODULE type_mod + PROGRAM main + USE ISO_C_BINDING + USE type_mod + REAL(KIND=C_DOUBLE) :: r + REAL(KIND=C_LONG_DOUBLE) :: d + CALL h5t(r) + CALL h5t(d) + END PROGRAM main + +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_C_LONG_DOUBLE_FORTRAN="yes" +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 + + + +ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - ac_cv_fc_dummy_main=$ac_cv_fortran_dummy_main - rm -rf conftest* - LIBS=$ac_fc_dm_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 -$as_echo "$ac_cv_fc_dummy_main" >&6; } -FC_DUMMY_MAIN=$ac_cv_fc_dummy_main -if test "$FC_DUMMY_MAIN" != unknown; then : - if test $FC_DUMMY_MAIN != none; then +rm -f pac_fconftest.out +if test "$cross_compiling" = yes; then : -cat >>confdefs.h <<_ACEOF -#define FC_DUMMY_MAIN $FC_DUMMY_MAIN -_ACEOF - if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then +else + cat > conftest.$ac_ext <<_ACEOF -$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h - fi -fi + PROGRAM main + IMPLICIT NONE + INTEGER :: ik, k, lastkind + lastkind=SELECTED_INT_KIND(1) + OPEN(8, FILE="pac_fconftest.out", form="formatted") + WRITE(8,'("ik:")',ADVANCE='NO') ! Find integer KINDs + DO ik=2,30 + k = SELECTED_INT_KIND(ik) + IF (k .NE. lastkind) THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + lastkind = k + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " + WRITE(8,'(/)') + WRITE(8,'("rk:")',ADVANCE='NO') ! Find real KINDs + lastkind=SELECTED_REAL_KIND(1) + DO ik=2,30 + k = SELECTED_REAL_KIND(ik) + IF (k .NE. lastkind) THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + lastkind = k + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " + + END + + +_ACEOF +if ac_fn_fc_try_run "$LINENO"; then : + + if test -s pac_fconftest.out ; then + + pac_validIntKinds="`sed -n -e 's/^.*ik://p' pac_fconftest.out`" + pac_validRealKinds="`sed -n -e 's/^.*rk://p' pac_fconftest.out`" + PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}" + PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}" + { $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 +$as_echo "$PAC_FC_ALL_INTEGER_KINDS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REAL KINDs" >&5 +$as_echo_n "checking for Fortran REAL KINDs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS" >&5 +$as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 +$as_echo "Error" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "linking to Fortran libraries from C fails -See \`config.log' for more details" "$LINENO" 5; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 +$as_echo "Error" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to run program to determine available KINDs" >&5 +$as_echo "$as_me: WARNING: Failed to run program to determine available KINDs" >&2;} + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi ac_ext=${ac_fc_srcext-f} @@ -6230,350 +7099,300 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof of native KINDS" >&5 +$as_echo_n "checking sizeof of native KINDS... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 -$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } -if ${ac_cv_fc_mangling+:} false; then : - $as_echo_n "(cached) " >&6 -else + +pack_int_sizeof="" +rm -f pac_fconftest.out cat > conftest.$ac_ext <<_ACEOF - subroutine foobar() - return - end - subroutine foo_bar() - return - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - mv conftest.$ac_objext cfortran_test.$ac_objext - ac_save_LIBS=$LIBS - LIBS="cfortran_test.$ac_objext $LIBS $FCLIBS" - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_success=no - for ac_foobar in foobar FOOBAR; do - for ac_underscore in "" "_"; do - ac_func="$ac_foobar$ac_underscore" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + program main + integer a + real b + double precision c + open(8, file="pac_fconftest.out", form="formatted") + write(8,*) sizeof(a) + write(8,*) kind(a) + write(8,*) sizeof(b) + write(8,*) kind(b) + write(8,*) sizeof(c) + write(8,*) kind(c) + close(8) + end + -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -#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 () -{ -return $ac_func (); - ; - return 0; -} _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_success=yes; break 2 + if test "$cross_compiling" = yes; then : + + pack_int_sizeof="" + +else + if ac_fn_fc_try_run "$LINENO"; then : + + if test -s pac_fconftest.out ; then + PAC_FORTRAN_NATIVE_INTEGER_KIND="`sed -n '1p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`sed -n '2p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_REAL_KIND="`sed -n '3p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_REAL_SIZEOF="`sed -n '4p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_DOUBLE_KIND="`sed -n '5p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`sed -n '6p' pac_fconftest.out`" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + rm -f pac_fconftest.out + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran program fails to build or run!" >&5 +$as_echo "$as_me: WARNING: Fortran program fails to build or run!" >&2;} + fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - done - ac_ext=${ac_fc_srcext-f} +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pack_int_sizeof" >&5 +$as_echo "$pack_int_sizeof" >&6; } +ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - if test "$ac_success" = "yes"; then - case $ac_foobar in - foobar) - ac_case=lower - ac_foo_bar=foo_bar - ;; - FOOBAR) - ac_case=upper - ac_foo_bar=FOO_BAR - ;; - esac - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_success_extra=no - for ac_extra in "" "_"; do - ac_func="$ac_foo_bar$ac_underscore$ac_extra" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -#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 () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_success_extra=yes; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - ac_ext=${ac_fc_srcext-f} + +ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - if test "$ac_success_extra" = "yes"; then - ac_cv_fc_mangling="$ac_case case" - if test -z "$ac_underscore"; then - ac_cv_fc_mangling="$ac_cv_fc_mangling, no underscore" - else - ac_cv_fc_mangling="$ac_cv_fc_mangling, underscore" - fi - if test -z "$ac_extra"; then - ac_cv_fc_mangling="$ac_cv_fc_mangling, no extra underscore" - else - ac_cv_fc_mangling="$ac_cv_fc_mangling, extra underscore" - fi - else - ac_cv_fc_mangling="unknown" - fi - else - ac_cv_fc_mangling="unknown" - fi +rm -f pac_fconftest.out +if test "$cross_compiling" = yes; then : + - LIBS=$ac_save_LIBS - rm -rf conftest* - rm -f cfortran_test* else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compile a simple Fortran program -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat > conftest.$ac_ext <<_ACEOF + + + PROGRAM main + IMPLICIT NONE + INTEGER :: ik, k, lastkind + lastkind=SELECTED_INT_KIND(1) + OPEN(8, FILE="pac_fconftest.out", form="formatted") + WRITE(8,'("ik:")',ADVANCE='NO') ! Find integer KINDs + DO ik=2,30 + k = SELECTED_INT_KIND(ik) + IF (k .NE. lastkind) THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + lastkind = k + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " + WRITE(8,'(/)') + WRITE(8,'("rk:")',ADVANCE='NO') ! Find real KINDs + lastkind=SELECTED_REAL_KIND(1) + DO ik=2,30 + k = SELECTED_REAL_KIND(ik) + IF (k .NE. lastkind) THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + lastkind = k + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " + + END + + +_ACEOF +if ac_fn_fc_try_run "$LINENO"; then : + + if test -s pac_fconftest.out ; then + + pac_validIntKinds="`sed -n -e 's/^.*ik://p' pac_fconftest.out`" + pac_validRealKinds="`sed -n -e 's/^.*rk://p' pac_fconftest.out`" + PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}" + PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}" + { $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 +$as_echo "$PAC_FC_ALL_INTEGER_KINDS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran REAL KINDs" >&5 +$as_echo_n "checking for Fortran REAL KINDs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_FC_ALL_REAL_KINDS" >&5 +$as_echo "$PAC_FC_ALL_REAL_KINDS" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 +$as_echo "Error" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error" >&5 +$as_echo "Error" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to run program to determine available KINDs" >&5 +$as_echo "$as_me: WARNING: Failed to run program to determine available KINDs" >&2;} fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 -$as_echo "$ac_cv_fc_mangling" >&6; } +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof of available INTEGER KINDs" >&5 +$as_echo_n "checking sizeof of available INTEGER KINDs... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -case $ac_cv_fc_mangling in - "lower case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h - ;; - "lower case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h +pack_int_sizeof="" +rm -f pac_fconftest.out +for kind in $pac_validIntKinds; do + cat > conftest.$ac_ext <<_ACEOF - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h - ;; - "lower case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h - ;; - "lower case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + program main + integer (kind=$kind) a + open(8, file="pac_fconftest.out", form="formatted") + write(8,'(I0)') sizeof(a) + close(8) + end - $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h - ;; - "upper case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h - ;; - "upper case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h +_ACEOF + if test "$cross_compiling" = yes; then : + + pack_int_sizeof="" + +else + if ac_fn_fc_try_run "$LINENO"; then : + + if test -s pac_fconftest.out ; then + sizes="`cat pac_fconftest.out`" + pack_int_sizeof="$pack_int_sizeof $sizes," + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + rm -f pac_fconftest.out + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran program fails to build or run!" >&5 +$as_echo "$as_me: WARNING: Fortran program fails to build or run!" >&2;} + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam +fi + +done +PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{ $pack_int_sizeof }" +{ $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} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h - ;; - "upper case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h - ;; - "upper case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} - ;; -esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof of available REAL KINDs" >&5 +$as_echo_n "checking sizeof of available REAL KINDs... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu +pack_real_sizeof="" +rm -f pac_fconftest.out +for kind in $pac_validRealKinds; do + cat > conftest.$ac_ext <<_ACEOF - ## -------------------------------------------------------------------- - ## See if the fortran compiler supports the intrinsic function "SIZEOF" - HAVE_SIZEOF_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic SIZEOF" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic SIZEOF... " >&6; } - cat > conftest.$ac_ext <<_ACEOF + program main + REAL (kind=$kind) :: a + open(8, file="pac_fconftest.out", form="formatted") + write(8,'(I0)') sizeof(a) + close(8) + end - PROGRAM main - i = sizeof(x) - END PROGRAM _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_SIZEOF_FORTRAN="yes" -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_exeext conftest.$ac_ext - + if test "$cross_compiling" = yes; then : - ## See if the fortran compiler supports the intrinsic function "C_SIZEOF" + pack_real_sizeof="" - HAVE_C_SIZEOF_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic C_SIZEOF" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic C_SIZEOF... " >&6; } - cat > conftest.$ac_ext <<_ACEOF +else + if ac_fn_fc_try_run "$LINENO"; then : - PROGRAM main - USE ISO_C_BINDING - INTEGER(C_INT) :: a - INTEGER(C_SIZE_T) :: result - result = C_SIZEOF(a) - END PROGRAM + if test -s pac_fconftest.out ; then + sizes="`cat pac_fconftest.out`" + pack_real_sizeof="$pack_real_sizeof $sizes," + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No output from test program!" >&5 +$as_echo "$as_me: WARNING: No output from test program!" >&2;} + fi + rm -f pac_fconftest.out -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_C_SIZEOF_FORTRAN="yes" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Fortran program fails to build or run!" >&5 +$as_echo "$as_me: WARNING: Fortran program fails to build or run!" >&2;} + fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam +fi + +done +PAC_FC_ALL_REAL_KINDS_SIZEOF="{ $pack_real_sizeof }" +{ $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} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + - ## See if the fortran compiler supports the intrinsic function "STORAGE_SIZE" - HAVE_STORAGE_SIZE_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran compiler supports intrinsic STORAGE_SIZE" >&5 -$as_echo_n "checking if Fortran compiler supports intrinsic STORAGE_SIZE... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - PROGRAM main - INTEGER :: a - INTEGER :: result - result = STORAGE_SIZE(a) - END PROGRAM -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_STORAGE_SIZE_FORTRAN="yes" -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_exeext conftest.$ac_ext - ## See if C_LONG_DOUBLE is available, and if it is different from C_DOUBLE - HAVE_C_LONG_DOUBLE_FORTRAN="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran C_LONG_DOUBLE is valid" >&5 -$as_echo_n "checking if Fortran C_LONG_DOUBLE is valid... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - MODULE type_mod - USE ISO_C_BINDING - INTERFACE h5t - MODULE PROCEDURE h5t_c_double - MODULE PROCEDURE h5t_c_long_double - END INTERFACE - CONTAINS - SUBROUTINE h5t_c_double(r) - REAL(KIND=C_DOUBLE) :: r - END SUBROUTINE h5t_c_double - SUBROUTINE h5t_c_long_double(d) - REAL(KIND=C_LONG_DOUBLE) :: d - END SUBROUTINE h5t_c_long_double - END MODULE type_mod - PROGRAM main - USE ISO_C_BINDING - USE type_mod - REAL(KIND=C_DOUBLE) :: r - REAL(KIND=C_LONG_DOUBLE) :: d - CALL h5t(r) - CALL h5t(d) - END PROGRAM main -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_C_LONG_DOUBLE_FORTRAN="yes" -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 + ##if test $PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF > ${ac_cv_sizeof_long_double}; then + ## AC_MSG_ERROR([Fortran default DOUBLE PRECISION ("X$PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF" Bytes) can not be represented in C ]) + ##fi + + ##PAC_FC_AVAIL_INTEGER_MODELS ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error if test "X$HAVE_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xno"; then @@ -6603,6 +7422,9 @@ $as_echo "#define FORTRAN_HAVE_SIZEOF 1" >>confdefs.h $as_echo "#define FORTRAN_HAVE_C_LONG_DOUBLE 1" >>confdefs.h fi + +$as_echo "#define FORTRAN_SIZEOF_LONG_DOUBLE SIZEOF_LONG_DOUBLE" >>confdefs.h + else FC="no" fi @@ -7875,136 +8697,6 @@ Xsed="$SED -e 1s/^X//" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : @@ -10831,269 +11523,21 @@ else rm -rf libconftest.dylib* rm -f conftest.* fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - 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 () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#include #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -11111,114 +11555,87 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes else - ac_cv_header_stdc=no + lt_cv_ld_exported_symbols_list=no fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM fi - -done - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac for ac_header in dlfcn.h do : @@ -23141,39 +23558,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF -# 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 long double" >&5 -$as_echo_n "checking size of long double... " >&6; } -if ${ac_cv_sizeof_long_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_long_double" = 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 (long double) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long_double=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5 -$as_echo "$ac_cv_sizeof_long_double" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double -_ACEOF - - +## MOVED EARLIER FOR FORTRAN --MSB-- AC_CHECK_SIZEOF([long double], [8]) ## Checkpoint the cache cat >confcache <<\_ACEOF @@ -24326,6 +24711,42 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi rm -f confcache +## Check for the __FLOAT128 + +{ $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) @@ -30031,7 +30452,7 @@ else fi -ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" +ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile tools/perform/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/src/H5fort_type_defines.h fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" cat >confcache <<\_ACEOF @@ -31327,6 +31748,7 @@ do "fortran/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/Makefile" ;; "fortran/src/h5fc") CONFIG_FILES="$CONFIG_FILES fortran/src/h5fc" ;; "fortran/src/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/src/Makefile" ;; + "fortran/src/H5fort_type_defines.h") CONFIG_FILES="$CONFIG_FILES fortran/src/H5fort_type_defines.h" ;; "fortran/test/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/test/Makefile" ;; "fortran/testpar/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/testpar/Makefile" ;; "fortran/examples/Makefile") CONFIG_FILES="$CONFIG_FILES fortran/examples/Makefile" ;; diff --git a/configure.ac b/configure.ac index 701682a..edef8c2 100644 --- a/configure.ac +++ b/configure.ac @@ -156,6 +156,7 @@ AC_MSG_RESULT([done]) ## INSTRUMENT: whether INSTRUMENT is enabled. No default set here. ## CODESTACK: whether CODESTACK is enabled. Default no. ## HAVE_DMALLOC: whether system has dmalloc support. Default no. +## HAVE_FLOAT128: whether system has Quad-Precision Math Library. Default no. ## DIRECT_VFD: whether DIRECT_VFD is enabled. Default no. ## THREADSAFE: whether THREADSAFE is enabled. Default no. ## STATIC_SHARED: whether static and/or shared libraries are requested. @@ -174,6 +175,7 @@ AC_SUBST([HDF5_HL]) HDF5_HL=yes AC_SUBST([INSTRUMENT]) AC_SUBST([CODESTACK]) CODESTACK=no AC_SUBST([HAVE_DMALLOC]) HAVE_DMALLOC=no +AC_SUBST([HAVE_FLOAT128]) HAVE_FLOAT128=no AC_SUBST([DIRECT_VFD]) DIRECT_VFD=no AC_SUBST([THREADSAFE]) THREADSAFE=no AC_SUBST([STATIC_SHARED]) @@ -343,6 +345,8 @@ case "X-$ALLOW_UNSUPPORTED" in ;; esac +AC_CHECK_SIZEOF([long double], [8]) + ## ---------------------------------------------------------------------- ## Check if they would like the Fortran interface compiled ## @@ -428,6 +432,29 @@ if test "X$HDF_FORTRAN" = "Xyes"; then ## See if C_LONG_DOUBLE is available, and if it is different from C_DOUBLE PAC_PROG_FC_HAVE_C_LONG_DOUBLE + + PAC_FC_NATIVE_INTEGER + + PAC_FC_AVAIL_KINDS + PAC_FC_SIZEOF_INT_KINDS + PAC_FC_SIZEOF_REAL_KINDS + + AC_SUBST([PAC_FC_ALL_REAL_KINDS]) + AC_SUBST([PAC_FC_ALL_INTEGER_KINDS]) + AC_SUBST([PAC_FC_ALL_REAL_KINDS_SIZEOF]) + AC_SUBST([PAC_FC_ALL_INTEGER_KINDS_SIZEOF]) + AC_SUBST([PAC_FORTRAN_NATIVE_INTEGER_KIND]) + AC_SUBST([PAC_FORTRAN_NATIVE_INTEGER_SIZEOF]) + AC_SUBST([PAC_FORTRAN_NATIVE_REAL_KIND]) + AC_SUBST([PAC_FORTRAN_NATIVE_REAL_SIZEOF]) + AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_KIND]) + AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF]) + + ##if test $PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF > ${ac_cv_sizeof_long_double}; then + ## AC_MSG_ERROR([Fortran default DOUBLE PRECISION ("X$PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF" Bytes) can not be represented in C ]) + ##fi + + ##PAC_FC_AVAIL_INTEGER_MODELS ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error if test "X$HAVE_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xno"; then @@ -449,6 +476,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then if test "X$HAVE_C_LONG_DOUBLE_FORTRAN" = "Xyes"; then AC_DEFINE([FORTRAN_HAVE_C_LONG_DOUBLE], [1], [Define if we have Fortran C_LONG_DOUBLE]) fi + AC_DEFINE([FORTRAN_SIZEOF_LONG_DOUBLE], [SIZEOF_LONG_DOUBLE], [Determine the size of C long double]) else FC="no" fi @@ -1022,7 +1050,7 @@ AC_CHECK_SIZEOF([long long], [8]) AC_CHECK_SIZEOF([__int64], [8]) AC_CHECK_SIZEOF([float], [4]) AC_CHECK_SIZEOF([double], [8]) -AC_CHECK_SIZEOF([long double], [8]) +## MOVED EARLIER FOR FORTRAN --MSB-- AC_CHECK_SIZEOF([long double], [8]) ## Checkpoint the cache AC_CACHE_SAVE @@ -1079,6 +1107,17 @@ AC_CHECK_SIZEOF([off64_t], [8]) ## Checkpoint the cache AC_CACHE_SAVE +## Check for the __FLOAT128 + +AC_MSG_CHECKING([for __float128]) +AC_TRY_COMPILE([], + [__float128 x;], + [AC_DEFINE([HAVE_FLOAT128], [1], + [__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) @@ -2850,6 +2889,7 @@ AC_CONFIG_FILES([src/libhdf5.settings fortran/Makefile fortran/src/h5fc fortran/src/Makefile + fortran/src/H5fort_type_defines.h fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile diff --git a/examples/Makefile.in b/examples/Makefile.in index f215316..ac7f3e2 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -413,6 +413,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -459,6 +460,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 04b17e7..253302f 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -469,6 +469,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -515,6 +516,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index 408aaa6..fb3aeb6 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -413,6 +413,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -459,6 +460,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 8df4b36..993b358 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -56,7 +56,7 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes hid_t c_type_id; size_t tmp_val; -/* Fortran INTEGER is may not be the same as C in; do all checking to find +/* Fortran INTEGER may not be the same as C; do all checking to find an appropriate size */ if (sizeof(int_f) == sizeof(int)) { @@ -174,44 +174,44 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes if ((types[9] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value; } /*end else */ /* - * FIND H5T_NATIVE_REAL_4 + * FIND H5T_NATIVE_REAL_C_FLOAT */ - if (sizeof(real_4_f) == sizeof(float)) { + if (sizeof(real_C_FLOAT_f) == sizeof(float)) { if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value; } /*end if */ - else if (sizeof(real_4_f) == sizeof(double)) { + else if (sizeof(real_C_FLOAT_f) == sizeof(double)) { if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value; } /*end if */ #if H5_SIZEOF_LONG_DOUBLE!=0 - else if (sizeof(real_4_f) == sizeof(long double)) { + else if (sizeof(real_C_FLOAT_f) == sizeof(long double)) { if ((types[10] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; } /*end else */ #endif /* - * FIND H5T_NATIVE_REAL_8 + * FIND H5T_NATIVE_REAL_C_DOUBLE */ - if (sizeof(real_8_f) == sizeof(float)) { + if (sizeof(real_C_DOUBLE_f) == sizeof(float)) { if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value; } /*end if */ - else if (sizeof(real_8_f) == sizeof(double)) { + else if (sizeof(real_C_DOUBLE_f) == sizeof(double)) { if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value; } /*end if */ #if H5_SIZEOF_LONG_DOUBLE!=0 - else if (sizeof(real_8_f) == sizeof(long double)) { + else if (sizeof(real_C_DOUBLE_f) == sizeof(long double)) { if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value; } /*end else */ #endif /* - * FIND H5T_NATIVE_REAL_16 + * FIND H5T_NATIVE_REAL_C_LONG_DOUBLE */ - if (sizeof(real_16_f) == sizeof(float)) { + 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_16_f) == sizeof(double)) { + 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 H5_SIZEOF_LONG_DOUBLE!=0 - else if (sizeof(real_16_f) == sizeof(long double)) { + 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 */ #endif diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index d807d6e..d7d9efe 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -379,12 +379,12 @@ CONTAINS h5_type = H5T_NATIVE_INTEGER_8 ENDIF ELSE IF(flag.EQ.H5_REAL_KIND)THEN - IF(kind.EQ.Fortran_REAL_4)THEN - h5_type = H5T_NATIVE_REAL_4 - ELSE IF(kind.EQ.Fortran_REAL_8)THEN - h5_type = H5T_NATIVE_REAL_8 - ELSE IF(kind.EQ.Fortran_REAL_16)THEN - h5_type = H5T_NATIVE_REAL_16 + IF(kind.EQ.Fortran_REAL_C_FLOAT)THEN + h5_type = H5T_NATIVE_REAL_C_FLOAT + ELSE IF(kind.EQ.Fortran_REAL_C_DOUBLE)THEN + h5_type = H5T_NATIVE_REAL_C_DOUBLE + ELSE IF(kind.EQ.Fortran_REAL_C_LONG_DOUBLE)THEN + h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE ENDIF ENDIF diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index dde4c11..3786130 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -14,3 +14,6 @@ ! Define if the intrinsic function C_LONG_DOUBLE exists #undef FORTRAN_HAVE_C_LONG_DOUBLE + +! Define the size of C's long double +#define H5_SIZEOF_LONG_DOUBLE diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 index ac368d1..5e67220 100644 --- a/fortran/src/H5f90global.F90 +++ b/fortran/src/H5f90global.F90 @@ -82,9 +82,9 @@ MODULE H5GLOBAL H5T_NATIVE_INTEGER_2, & H5T_NATIVE_INTEGER_4, & H5T_NATIVE_INTEGER_8, & - H5T_NATIVE_REAL_4, & - H5T_NATIVE_REAL_8, & - H5T_NATIVE_REAL_16, & + H5T_NATIVE_REAL_C_FLOAT, & + H5T_NATIVE_REAL_C_DOUBLE, & + H5T_NATIVE_REAL_C_LONG_DOUBLE, & H5T_NATIVE_INTEGER, & H5T_NATIVE_REAL, & H5T_NATIVE_DOUBLE, & @@ -144,9 +144,9 @@ MODULE H5GLOBAL EQUIVALENCE (predef_types(8), H5T_NATIVE_INTEGER_2) EQUIVALENCE (predef_types(9), H5T_NATIVE_INTEGER_4) EQUIVALENCE (predef_types(10), H5T_NATIVE_INTEGER_8) - EQUIVALENCE (predef_types(11), H5T_NATIVE_REAL_4) - EQUIVALENCE (predef_types(12), H5T_NATIVE_REAL_8) - EQUIVALENCE (predef_types(13), H5T_NATIVE_REAL_16) + EQUIVALENCE (predef_types(11), H5T_NATIVE_REAL_C_FLOAT) + EQUIVALENCE (predef_types(12), H5T_NATIVE_REAL_C_DOUBLE) + EQUIVALENCE (predef_types(13), H5T_NATIVE_REAL_C_LONG_DOUBLE) EQUIVALENCE (predef_types(14), H5T_NATIVE_B8 ) EQUIVALENCE (predef_types(15), H5T_NATIVE_B16) EQUIVALENCE (predef_types(16), H5T_NATIVE_B32) diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index ae4ef40..ef0a1f3 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -31,6 +31,7 @@ */ #include +#include #include #include "H5public.h" @@ -48,9 +49,9 @@ FILE * fort_header; #define FFILE "H5fortran_types.F90" /* Prototypes for the write routines */ -void writeTypedef(const char* c_typedef, const char* c_type, unsigned int size); -void writeTypedefDefault(const char* c_typedef, unsigned int size); -void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, unsigned int kind); +void writeTypedef(const char* c_typedef, const char* c_type, int size); +void writeTypedefDefault(const char* c_typedef, int size); +void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, int kind); void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char* c_type, int size, char* kind); static void @@ -121,20 +122,20 @@ endFfile(void) } /* Define a c_int_x type in the C header */ -void writeTypedef(const char* c_typedef, const char* c_type, unsigned int size) +void writeTypedef(const char* c_typedef, const char* c_type, int size) { fprintf(c_header, "#define c_%s_%u %s\n", c_typedef, size, c_type); } /* Call this function if there is no matching C type for sizes > 1 */ -void writeTypedefDefault(const char* c_typedef, unsigned int size) +void writeTypedefDefault(const char* c_typedef, int size) { assert(size %2 == 0); fprintf(c_header, "typedef struct {c_%s_%u a; c_%s_%u b;} c_%s_%u\n", c_typedef, size / 2, c_typedef, size / 2, c_typedef, size); } /* Create matching Fortran and C types by writing to both files */ -void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, unsigned int kind) +void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, int kind) { fprintf(fort_header, " INTEGER, PARAMETER :: %s = %u\n", fortran_type, kind); fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type); @@ -144,17 +145,25 @@ void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char fprintf(fort_header, " INTEGER, PARAMETER :: %s = %s\n", fortran_type, kind); fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type); } - int main(void) { - int FoundIntSize[4]; - unsigned FoundIntSizeKind[4]; - int FoundRealSize[3]; - unsigned FoundRealSizeKind[3]; - int i,j,flag; + int FoundIntSize[10]; + int FoundIntSizeKind[10]; + int FoundRealSize[10]; + int FoundRealSizeKind[10]; + int i, j,flag; char chrA[20],chrB[20]; int H5_C_HAS_REAL_NATIVE_16; + int IntKinds[] = H5_FORTRAN_INTEGER_KINDS; + int IntKinds_SizeOf[] = H5_FORTRAN_INTEGER_KINDS_SIZEOF; + int RealKinds[] = H5_FORTRAN_REAL_KINDS; + int RealKinds_SizeOf[] = H5_FORTRAN_REAL_KINDS_SIZEOF; + char Real_C_TYPES[10][32]; + + int H5_FORTRAN_NUM_INTEGER_KINDS; + int H5_FORTRAN_NUM_REAL_KINDS; + /* Open target files */ c_header = fopen(CFILE, "w"); fort_header = fopen(FFILE, "w"); @@ -166,213 +175,123 @@ int main(void) initCfile(); initFfile(); - /* First, define c_int_x */ - -#if defined H5_FORTRAN_HAS_INTEGER_1_KIND - if(sizeof(long long) == 1) - writeTypedef("int", "long long", 1); - else if(sizeof(long) == 1) - writeTypedef("int", "long", 1); - else if(sizeof(int) == 1) - writeTypedef("int", "int", 1); - else if(sizeof(short) == 1) - writeTypedef("int", "short", 1); - else - writeTypedef("int", "char", 1); - /* Actually, char is not necessarily one byte. - * But if char isn't, then nothing is, so this - * is as close as we can get. */ - if(sizeof(size_t) == 1) - writeTypedef("size_t", "size_t", 1); - if(sizeof(hsize_t) == 1) - writeTypedef("hsize_t", "hsize_t", 1); -#endif /*H5_FORTRAN_HAS_INTEGER_1_KIND*/ - -#if defined H5_FORTRAN_HAS_INTEGER_2_KIND - if(sizeof(long long) == 2) - writeTypedef("int", "long long", 2); - else if(sizeof(long) == 2) - writeTypedef("int", "long", 2); - else if(sizeof(int) == 2) - writeTypedef("int", "int", 2); - else if(sizeof(short) == 2) - writeTypedef("int", "short", 2); - else - writeTypedefDefault("int",2); - - if(sizeof(size_t) == 2) - writeTypedef("size_t", "size_t", 2); - if(sizeof(hsize_t) == 2) - writeTypedef("hsize_t", "hsize_t", 2); -#endif /*H5_FORTRAN_HAS_INTEGER_2_KIND*/ - -#if defined H5_FORTRAN_HAS_INTEGER_4_KIND - if(sizeof(long long) == 4) - writeTypedef("int", "long long", 4); - else if(sizeof(long) == 4) - writeTypedef("int", "long", 4); - else if(sizeof(int) == 4) - writeTypedef("int", "int", 4); - else if(sizeof(short) == 4) - writeTypedef("int", "short", 4); - else - writeTypedefDefault("int",4); - - if(sizeof(size_t) == 4) - writeTypedef("size_t", "size_t", 4); - if(sizeof(hsize_t) == 4) - writeTypedef("hsize_t", "hsize_t", 4); - -#endif /*H5_FORTRAN_HAS_INTEGER_4_KIND*/ - -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND - if(sizeof(long long) == 8) - writeTypedef("int", "long long", 8); - else if(sizeof(long) == 8) - writeTypedef("int", "long", 8); - else if(sizeof(int) == 8) - writeTypedef("int", "int", 8); - else if(sizeof(short) == 8) - writeTypedef("int", "short", 8); - else - writeTypedefDefault("int",8); - - if(sizeof(size_t) == 8) - writeTypedef("size_t", "size_t", 8); - if(sizeof(hsize_t) == 8) - writeTypedef("hsize_t", "hsize_t", 8); - -#endif /*H5_FORTRAN_HAS_INTEGER_8_KIND*/ - - /* Define c_float_x */ - -#if defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND || defined H5_FORTRAN_HAS_REAL_4_KIND - if(sizeof(long double) == 4) - writeTypedef("float", "long double", 4); - else if(sizeof(double) == 4) - writeTypedef("float", "double", 4); - else if(sizeof(float) == 4) - writeTypedef("float", "float", 4); - else - { printf("Fortran REAL is 4 bytes, no corresponding C floating type\n"); - printf("Quitting....\n"); - return -1; - } -#endif /*H5_FORTRAN_HAS_REAL_NATIVE_4_KIND*/ - -#if defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND || defined H5_FORTRAN_HAS_REAL_8_KIND - if(sizeof(long double) == 8) - writeTypedef("float", "long double", 8); - else if(sizeof(double) == 8) - writeTypedef("float", "double", 8); - else if(sizeof(float) == 8) - writeTypedef("float", "float", 8); - else - { printf("Fortran REAL is 16 bytes, no corresponding C floating type\n"); - printf("Quitting....\n"); - return -1; - } -#endif /*H5_FORTRAN_HAS_REAL_NATIVE_8_KIND*/ - -#if defined H5_FORTRAN_HAS_REAL_NATIVE_16_KIND || defined H5_FORTRAN_HAS_REAL_16_KIND - if(sizeof(long double) == 16) - writeTypedef("float", "long double", 16); - else if(sizeof(double) == 16) - writeTypedef("float", "double", 16); - else if(sizeof(float) == 16) - writeTypedef("float", "float", 16); - else /*C has no 16 byte float so disable it in Fortran*/ - { printf("warning: Fortran REAL is 16 bytes, no corresponding C floating type\n"); - printf(" Disabling Fortran 16 byte REALs\n"); - H5_C_HAS_REAL_NATIVE_16 = 0; - } -#endif /*H5_FORTRAN_HAS_REAL_NATIVE_16_KIND*/ + /* (a) define c_int_x */ + + H5_FORTRAN_NUM_INTEGER_KINDS = (int)(sizeof(IntKinds)/sizeof(IntKinds[0])); + H5_FORTRAN_NUM_REAL_KINDS = (int)(sizeof(RealKinds)/sizeof(RealKinds[0])); + + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(sizeof(long long) == IntKinds_SizeOf[i]) + writeTypedef("int", "long long", IntKinds[i]); + else if(sizeof(long) == IntKinds[i]) + writeTypedef("int", "long", IntKinds[i]); + else if(sizeof(int) == IntKinds_SizeOf[i]) + writeTypedef("int", "int", IntKinds[i]); + else if(sizeof(short) == IntKinds_SizeOf[i]) + writeTypedef("int", "short", IntKinds[i]); + else + if(IntKinds_SizeOf[i] == 1) { + writeTypedef("int", "char", IntKinds[i]); + /* Actually, char is not necessarily one byte. + * But if char isn't, then nothing is, so this + * is as close as we can get. */ + } else { + writeTypedefDefault("int",IntKinds[i]); + } + if(sizeof(size_t) == IntKinds_SizeOf[i]) + writeTypedef("size_t", "size_t", IntKinds[i]); + if(sizeof(hsize_t) == IntKinds_SizeOf[i]) + writeTypedef("hsize_t", "hsize_t", IntKinds[i]); + } + + /* (b) Define c_float_x */ + + for(i=0;i< H5_FORTRAN_NUM_REAL_KINDS;i++) { +#ifdef HAVE_FLOAT128 +/* should fail */ + if(sizeof(__float128) == RealKinds_SizeOf[i]) { + writeTypedef("float", "__float128", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_FLOAT128"); + } else +#endif + if(sizeof(long double) == RealKinds_SizeOf[i]) { + writeTypedef("float", "long double", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); + } else if(sizeof(double) == RealKinds_SizeOf[i]) { + writeTypedef("float", "double", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_DOUBLE"); + } else if(sizeof(float) == RealKinds_SizeOf[i]) { + writeTypedef("float", "float", RealKinds[i]); + strcpy(Real_C_TYPES[i], "C_FLOAT"); + } else { + printf(" **** HDF5 WARNING ****/n"); + printf("Fortran REAL is %d bytes, but no corresponding C floating type exists\n",RealKinds_SizeOf[i]); + printf("Fortran Interfaces for Fortran REALs of %d bytes will not exist\n",RealKinds_SizeOf[i]); + } + } /* Now begin defining fortran types. */ fprintf(c_header, "\n"); + /* haddr_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HADDR_T >= 8 - writeToFiles("int","HADDR_T", "haddr_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HADDR_T >= 4 - writeToFiles("int","HADDR_T", "haddr_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HADDR_T >= 2 - writeToFiles("int","HADDR_T", "haddr_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HADDR_T >= 1 - writeToFiles("int","HADDR_T", "haddr_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); -#else - /* Error: couldn't find a size for haddr_t */ - return -1; -#endif + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_HADDR_T) { + writeToFiles("int","HADDR_T", "haddr_t_f", H5_SIZEOF_HADDR_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for haddr_t */ + return -1; + } /* hsize_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HSIZE_T >= 8 - writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HSIZE_T >= 4 - writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HSIZE_T >= 2 - writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HSIZE_T >= 1 - writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); -#else - /* Error: couldn't find a size for hsize_t */ - return -1; -#endif + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_HSIZE_T) { + writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", H5_SIZEOF_HSIZE_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for hsize_t */ + return -1; + } /* hssize_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HSSIZE_T >= 8 - writeToFiles("int","HSSIZE_T", "hssize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HSSIZE_T >= 4 - writeToFiles("int","HSSIZE_T", "hssize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HSSIZE_T >= 2 - writeToFiles("int","HSSIZE_T", "hssize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HSSIZE_T >= 1 - writeToFiles("int","HSSIZE_T", "hssize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); -#else - /* Error: couldn't find a size for hssize_t */ - return -1; -#endif + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_HSSIZE_T) { + writeToFiles("int","HSSIZE_T", "hssize_t_f", H5_SIZEOF_HSSIZE_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for hssize_t */ + return -1; + } /* off_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_OFF_T >= 8 - writeToFiles("int","OFF_T", "off_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_OFF_T >= 4 - writeToFiles("int","OFF_T", "off_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_OFF_T >= 2 - writeToFiles("int","OFF_T", "off_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_OFF_T >= 1 - writeToFiles("int","OFF_T", "off_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); -#else - /* Error: couldn't find a size for off_t */ - return -1; -#endif + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_OFF_T) { + writeToFiles("int","OFF_T", "off_t_f", H5_SIZEOF_OFF_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for off_t */ + return -1; + } /* size_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_SIZE_T >= 8 - writeToFiles("size_t","SIZE_T", "size_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_SIZE_T >= 4 - writeToFiles("size_t","SIZE_T", "size_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_SIZE_T >= 2 - writeToFiles("size_t","SIZE_T", "size_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_SIZE_T >= 1 - writeToFiles("size_t","SIZE_T", "size_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); -#else - /* Error: couldn't find a size for size_t */ - return -1; -#endif + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_SIZE_T) { + writeToFiles("size_t","SIZE_T", "size_t_f", H5_SIZEOF_SIZE_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for size_t */ + return -1; + } /* int */ -#if defined H5_FORTRAN_HAS_NATIVE_8_KIND - writeToFiles("int","Fortran_INTEGER", "int_f", 8, H5_FORTRAN_HAS_NATIVE_8_KIND); -#elif defined H5_FORTRAN_HAS_NATIVE_4_KIND - writeToFiles("int","Fortran_INTEGER", "int_f", 4, H5_FORTRAN_HAS_NATIVE_4_KIND); -#elif defined H5_FORTRAN_HAS_NATIVE_2_KIND - writeToFiles("int","Fortran_INTEGER", "int_f", 2, H5_FORTRAN_HAS_NATIVE_2_KIND); -#elif defined H5_FORTRAN_HAS_NATIVE_1_KIND - writeToFiles("int","Fortran_INTEGER", "int_f", 1, H5_FORTRAN_HAS_NATIVE_1_KIND); -#else - /* Error: couldn't find a size for int */ - return -1; -#endif + writeToFiles("int","Fortran_INTEGER", "int_f", H5_FORTRAN_NATIVE_INTEGER_SIZEOF, H5_FORTRAN_NATIVE_INTEGER_KIND); + + /* int_1, int_2, int_4, int_8 */ @@ -381,29 +300,20 @@ int main(void) /* it a value of the next larger one, but if the next */ /* higher one is not available we assigned it the next lowest */ - FoundIntSize[0] = -1; - FoundIntSize[1] = -2; - FoundIntSize[2] = -4; - FoundIntSize[3] = -8; -#if defined H5_FORTRAN_HAS_INTEGER_1_KIND - FoundIntSize[0] = 1; - FoundIntSizeKind[0] = H5_FORTRAN_HAS_INTEGER_1_KIND; -#endif -#if defined H5_FORTRAN_HAS_INTEGER_2_KIND - FoundIntSize[1] = 2; - FoundIntSizeKind[1] = H5_FORTRAN_HAS_INTEGER_2_KIND; -#endif -#if defined H5_FORTRAN_HAS_INTEGER_4_KIND - FoundIntSize[2] = 4; - FoundIntSizeKind[2] = H5_FORTRAN_HAS_INTEGER_4_KIND; -#endif -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND - FoundIntSize[3] = 8; - FoundIntSizeKind[3] = H5_FORTRAN_HAS_INTEGER_8_KIND ; -#endif + FoundIntSize[0] = -1; + FoundIntSize[1] = -1; + FoundIntSize[2] = -1; + FoundIntSize[3] = -1; + FoundIntSize[4] = -1; + + for(i=0;i 0) /* Found the integer type */ { sprintf(chrA, "Fortran_INTEGER_%d", FoundIntSize[i]); @@ -450,129 +360,144 @@ int main(void) /* it a value of the next larger one, but if the next */ /* higher one is not available we assigned it the next lowest */ - FoundRealSize[0] = -4; - FoundRealSize[1] = -8; - FoundRealSize[2] = -16; - -#if defined H5_FORTRAN_HAS_REAL_4_KIND - FoundRealSize[0] = 4; - FoundRealSizeKind[0] = H5_FORTRAN_HAS_REAL_4_KIND; -#endif -#if defined H5_FORTRAN_HAS_REAL_8_KIND - FoundRealSize[1] = 8; - FoundRealSizeKind[1] = H5_FORTRAN_HAS_REAL_8_KIND; -#endif - -#if defined H5_FORTRAN_HAS_REAL_16_KIND - if(H5_C_HAS_REAL_NATIVE_16 != 0) { - FoundRealSize[2] = 16; - FoundRealSizeKind[2] = H5_FORTRAN_HAS_REAL_16_KIND; - } -#endif - - for(i=0;i<3;i++) { - if( FoundRealSize[i] > 0) /* Found the real type */ - { - sprintf(chrA, "Fortran_REAL_%d", FoundRealSize[i]); - sprintf(chrB, "real_%d_f", FoundRealSize[i]); - writeToFiles("float",chrA, chrB, FoundRealSize[i], FoundRealSizeKind[i]); - } - else /* Did not find the real type */ - { - flag = 0; /* flag indicating if found the next highest */ - for(j=i+1;j<3;j++) /* search for next highest */ - { - if( FoundRealSize[j] > 0) /* Found the next highest */ - { - sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]); - sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]); - if(FoundRealSize[j]>4) { - writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]); - flag = 1; - } - /* else { */ -/* writeToFiles("float", chrA, chrB, FoundRealSize[j]); */ + FoundRealSize[0] = -1; + FoundRealSize[1] = -1; + FoundRealSize[2] = -1; + FoundRealSize[3] = -1; + FoundRealSize[4] = -1; + + for(i=0;i 0) /\* Found the real type *\/ */ +/* { */ +/* sprintf(chrA, "Fortran_REAL_%d", Real_C_TYPES[i]); */ +/* sprintf(chrB, "real_%d_f", FoundRealSize[i]); */ +/* writeToFiles("float",chrA, chrB, FoundRealSize[i], FoundRealSizeKind[i]); */ +/* } */ +/* else /\* Did not find the real type *\/ */ +/* { */ +/* flag = 0; /\* flag indicating if found the next highest *\/ */ +/* for(j=i+1;j<3;j++) /\* search for next highest *\/ */ +/* { */ +/* if( FoundRealSize[j] > 0) /\* Found the next highest *\/ */ +/* { */ +/* sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]); */ +/* sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]); */ +/* if(FoundRealSize[j]>4) { */ +/* writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]); */ +/* flag = 1; */ /* } */ - flag = 1; - break; - } - } - if(flag == 0) /* No higher one found, so find next lowest */ - { - for(j=1;j>-1;j--) /* Search for next lowest */ - { - if( FoundRealSize[j] > 0) /* Found the next lowest */ - { - sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]); - sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]); - if(FoundRealSize[j]>4) - writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]); - /* else { */ -/* writeToFiles("float", chrA, chrB, FoundRealSize[j]); */ -/* } */ - flag = 1; - break; - } - } - } - if(flag == 0) /* No higher or lower one found, indicating an error */ - return -1; - } - } +/* /\* else { *\/ */ +/* /\* writeToFiles("float", chrA, chrB, FoundRealSize[j]); *\/ */ +/* /\* } *\/ */ +/* flag = 1; */ +/* break; */ +/* } */ +/* } */ +/* if(flag == 0) /\* No higher one found, so find next lowest *\/ */ +/* { */ +/* for(j=1;j>-1;j--) /\* Search for next lowest *\/ */ +/* { */ +/* if( FoundRealSize[j] > 0) /\* Found the next lowest *\/ */ +/* { */ +/* sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]); */ +/* sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]); */ +/* if(FoundRealSize[j]>4) */ +/* writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]); */ +/* /\* else { *\/ */ +/* /\* writeToFiles("float", chrA, chrB, FoundRealSize[j]); *\/ */ +/* /\* } *\/ */ +/* flag = 1; */ +/* break; */ +/* } */ +/* } */ +/* } */ +/* if(flag == 0) /\* No higher or lower one found, indicating an error *\/ */ +/* return -1; */ +/* } */ +/* } */ /* hid_t */ -#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HID_T >= 8 - writeToFiles("int","HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HID_T >= 4 - writeToFiles("int","HID_T", "hid_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HID_T >= 2 - writeToFiles("int","HID_T", "hid_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HID_T >= 1 - writeToFiles("int","HID_T", "hid_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND); -#elif defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HID_T >= 4 - writeToFiles("int","HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND); -#else - /* Error: couldn't find a size for hid_t */ - return -1; -#endif + for(i=0;i< H5_FORTRAN_NUM_INTEGER_KINDS;i++) { + if(IntKinds_SizeOf[i] == H5_SIZEOF_HID_T) { + writeToFiles("int","HID_T", "hid_t_f", H5_SIZEOF_HID_T, IntKinds[i]); + break; + } + if(i == (H5_FORTRAN_NUM_INTEGER_KINDS-1) ) + /* Error: couldn't find a size for hid_t */ + return -1; + } /* real_f */ -#if defined H5_FORTRAN_HAS_REAL_NATIVE_16_KIND - if(H5_C_HAS_REAL_NATIVE_16 != 0) { - writeToFilesChr("float","Fortran_REAL", "real_f", 16, "C_LONG_DOUBLE"); - } -#elif defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND - writeToFilesChr("float", "Fortran_REAL", "real_f", 8, "C_DOUBLE"); -#elif defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND - writeToFilesChr("float", "Fortran_REAL", "real_f", 4, "C_FLOAT"); -#else - /* Error: couldn't find a size for real_f */ - return -1; -#endif + if(H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(long double)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_LONG_DOUBLE"); + else if(H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(double)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_DOUBLE"); + else if(H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(float)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_FLOAT"); + else { + /* No exact match, choose the next highest */ + if(H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(long double)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_LONG_DOUBLE"); + else if(H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(double)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_DOUBLE"); + else if(H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(float)) + writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_FLOAT"); + else + /* Error: couldn't find a size for real_f */ + return -1; + } /* double_f */ -#if defined H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND - if(H5_C_HAS_REAL_NATIVE_16 != 0) { /* Check if C has 16 byte floats */ - writeToFilesChr("float", "Fortran_DOUBLE", "double_f", 16, "C_LONG_DOUBLE"); - } else { -#if defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND /* Fall back to 8 byte floats */ - writeToFilesChr("float", "Fortran_DOUBLE", "double_f", 8, "C_DOUBLE"); - } -#elif defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND /* Fall back to 4 byte floats */ - writeToFilesChr("float", "Fortran_DOUBLE", "double_f", 4, "C_FLOAT"); - } -#else - /* Error: couldn't find a size for double_f when fortran has 16 byte reals */ - return -1; - } -#endif + if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(long double)) + writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_LONG_DOUBLE"); + else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(double)) + writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_DOUBLE"); + else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(float)) + writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_FLOAT"); + else { +/* /\* No exact match, choose the next highest *\/ */ +/* if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF > sizeof(long double)) */ +/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_LONG_DOUBLE"); */ +/* else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF > sizeof(double)) */ +/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", sizeof(double), "C_DOUBLE"); */ +/* else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF > sizeof(float)) */ +/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", sizeof(float), "C_FLOAT"); */ +/* else */ + /* Error: couldn't find a size for double_f */ +/* printf("Error: couldn't find a size for double_f \n"); */ +/* return -1; */ + } + + + +/* /\* double_f *\/ */ +/* if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == C_LONG_DOUBLE_SIZEOF) */ +/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_SIZEOF, "C_LONG_DOUBLE"); */ +/* else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == C_DOUBLE_SIZEOF) */ +/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_SIZEOF, "C_DOUBLE"); */ +/* else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == C_FLOAT_SIZEOF) */ +/* writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_SIZEOF, "C_FLOAT"); */ +/* else */ +/* /\* Error: couldn't find a size for double_f *\/ */ +/* return -1; */ -#elif defined H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND - writeToFilesChr("float", "Fortran_DOUBLE", "double_f", 8, "C_DOUBLE"); -#else - /* Error: couldn't find a size for real_f */ - return -1; -#endif +/* writeToFiles("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_SIZEOF, H5_FORTRAN_NATIVE_DOUBLE_KIND); */ + +/* #elif defined H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND */ +/* writeToFilesChr("float", "Fortran_DOUBLE", "double_f", 8, "C_DOUBLE"); */ +/* #else */ +/* /\* Error: couldn't find a size for real_f *\/ */ +/* return -1; */ +/* #endif */ /* /\* real_f *\/ */ /* if(sizeof(float) == C_LONG_DOUBLE_SIZEOF) { */ diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index 9736bcc..43a5f3f 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -114,7 +114,7 @@ endif # and H5fortran_types.F90, which are included in the Fortran library. # These are the helper programs we need to build. -noinst_PROGRAMS = H5match_types H5fortran_detect H5test_kind +noinst_PROGRAMS = H5match_types H5test_kind # Tell Automake to create H5f90i_gen.h before it builds the library # sources. When it creates H5f90i_gen.h, it will create @@ -129,19 +129,19 @@ H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) # H5fort_type_defines.h is created by running H5fortran_detect. # Obviously, H5fortran_detect needs to be built first. -H5fort_type_defines.h: H5fortran_detect$(EXEEXT) - $(RUNSERIAL) ./H5fortran_detect$(EXEEXT) > H5fort_type_defines.h +#H5fort_type_defines.h: H5fortran_detect$(EXEEXT) +# $(RUNSERIAL) ./H5fortran_detect$(EXEEXT) > H5fort_type_defines.h -H5match_types.$(OBJEXT): H5fort_type_defines.h +#H5match_types.$(OBJEXT): H5fort_type_defines.h # Automake knows how to build fortran programs if we tell it the source # files. -H5fortran_detect_SOURCES = H5fortran_detect.F90 +#H5fortran_detect_SOURCES = H5fortran_detect.F90 # H5test_kind.F90 generates H5Fortran_detect.F90 depending on if # intrinsic function SIZEOF is available. -H5fortran_detect.F90: H5test_kind$(EXEEXT) +H5_KINDff.F90: H5test_kind$(EXEEXT) $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.F90 # H5test_kind.F90 is included in the distribution, and Automake knows @@ -157,8 +157,8 @@ FORTRAN_API=yes # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo -H5fortran_types.lo: H5fortran_types.F90 -H5fortran_detect.lo: H5fortran_detect.F90 +#H5fortran_types.lo: H5fortran_types.F90 +#H5fortran_detect.lo: H5fortran_detect.F90 H5test_kind.lo: $(srcdir)/H5test_kind.F90 H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 249ba10..f746ccf 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -101,14 +101,14 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \ $(top_srcdir)/config/conclude.am $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(srcdir)/H5config_f.inc.in \ $(top_srcdir)/bin/mkinstalldirs $(srcdir)/h5fc.in \ - $(top_srcdir)/bin/depcomp $(top_srcdir)/bin/test-driver README + $(srcdir)/H5fort_type_defines.h.in $(top_srcdir)/bin/depcomp \ + $(top_srcdir)/bin/test-driver README # Some Fortran compilers can't build shared libraries, so sometimes we # want to build a shared C library and a static Fortran library. If so, # pass the -static flag to the library linker. @FORTRAN_SHARED_CONDITIONAL_FALSE@am__append_1 = -static -noinst_PROGRAMS = H5match_types$(EXEEXT) H5fortran_detect$(EXEEXT) \ - H5test_kind$(EXEEXT) +noinst_PROGRAMS = H5match_types$(EXEEXT) H5test_kind$(EXEEXT) TESTS = subdir = fortran/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -118,7 +118,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/H5config.h H5config_f.inc -CONFIG_CLEAN_FILES = h5fc +CONFIG_CLEAN_FILES = h5fc H5fort_type_defines.h CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -166,9 +166,6 @@ libhdf5_fortran_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=FC \ $(AM_FCFLAGS) $(FCFLAGS) $(libhdf5_fortran_la_LDFLAGS) \ $(LDFLAGS) -o $@ PROGRAMS = $(noinst_PROGRAMS) -am_H5fortran_detect_OBJECTS = H5fortran_detect.$(OBJEXT) -H5fortran_detect_OBJECTS = $(am_H5fortran_detect_OBJECTS) -H5fortran_detect_LDADD = $(LDADD) H5match_types_SOURCES = H5match_types.c H5match_types_OBJECTS = H5match_types.$(OBJEXT) H5match_types_LDADD = $(LDADD) @@ -234,10 +231,9 @@ AM_V_FC = $(am__v_FC_@AM_V@) am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) am__v_FC_0 = @echo " FC " $@; am__v_FC_1 = -SOURCES = $(libhdf5_fortran_la_SOURCES) $(H5fortran_detect_SOURCES) \ - H5match_types.c $(H5test_kind_SOURCES) -DIST_SOURCES = $(libhdf5_fortran_la_SOURCES) \ - $(H5fortran_detect_SOURCES) H5match_types.c \ +SOURCES = $(libhdf5_fortran_la_SOURCES) H5match_types.c \ + $(H5test_kind_SOURCES) +DIST_SOURCES = $(libhdf5_fortran_la_SOURCES) H5match_types.c \ $(H5test_kind_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ @@ -518,6 +514,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -564,6 +561,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -753,10 +760,6 @@ MOSTLYCLEANFILES = H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h \ # H5fortran_types.F90 as a side effect. BUILT_SOURCES = H5f90i_gen.h -# Automake knows how to build fortran programs if we tell it the source -# files. -H5fortran_detect_SOURCES = H5fortran_detect.F90 - # H5test_kind.F90 is included in the distribution, and Automake knows # how to compile a fortran program given its sources. H5test_kind_SOURCES = H5test_kind.F90 @@ -832,6 +835,8 @@ distclean-hdr: -rm -f H5config_f.inc stamp-h2 h5fc: $(top_builddir)/config.status $(srcdir)/h5fc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +H5fort_type_defines.h: $(top_builddir)/config.status $(srcdir)/H5fort_type_defines.h.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @@ -880,10 +885,6 @@ clean-noinstPROGRAMS: echo " rm -f" $$list; \ rm -f $$list -H5fortran_detect$(EXEEXT): $(H5fortran_detect_OBJECTS) $(H5fortran_detect_DEPENDENCIES) $(EXTRA_H5fortran_detect_DEPENDENCIES) - @rm -f H5fortran_detect$(EXEEXT) - $(AM_V_FCLD)$(FCLINK) $(H5fortran_detect_OBJECTS) $(H5fortran_detect_LDADD) $(LIBS) - H5match_types$(EXEEXT): $(H5match_types_OBJECTS) $(H5match_types_DEPENDENCIES) $(EXTRA_H5match_types_DEPENDENCIES) @rm -f H5match_types$(EXEEXT) $(AM_V_CCLD)$(LINK) $(H5match_types_OBJECTS) $(H5match_types_LDADD) $(LIBS) @@ -1389,15 +1390,19 @@ H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) # H5fort_type_defines.h is created by running H5fortran_detect. # Obviously, H5fortran_detect needs to be built first. -H5fort_type_defines.h: H5fortran_detect$(EXEEXT) - $(RUNSERIAL) ./H5fortran_detect$(EXEEXT) > H5fort_type_defines.h +#H5fort_type_defines.h: H5fortran_detect$(EXEEXT) +# $(RUNSERIAL) ./H5fortran_detect$(EXEEXT) > H5fort_type_defines.h + +#H5match_types.$(OBJEXT): H5fort_type_defines.h -H5match_types.$(OBJEXT): H5fort_type_defines.h +# Automake knows how to build fortran programs if we tell it the source +# files. +#H5fortran_detect_SOURCES = H5fortran_detect.F90 # H5test_kind.F90 generates H5Fortran_detect.F90 depending on if # intrinsic function SIZEOF is available. -H5fortran_detect.F90: H5test_kind$(EXEEXT) +H5_KINDff.F90: H5test_kind$(EXEEXT) $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.F90 # Hardcode the dependencies of these files. There isn't a known way of @@ -1405,8 +1410,8 @@ H5fortran_detect.F90: H5test_kind$(EXEEXT) # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo -H5fortran_types.lo: H5fortran_types.F90 -H5fortran_detect.lo: H5fortran_detect.F90 +#H5fortran_types.lo: H5fortran_types.F90 +#H5fortran_detect.lo: H5fortran_detect.F90 H5test_kind.lo: $(srcdir)/H5test_kind.F90 H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 578d65f..866e28c 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -525,6 +525,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -571,6 +572,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/fortran/test/tH5R.f90 b/fortran/test/tH5R.f90 index bd6264f..fba9e25 100644 --- a/fortran/test/tH5R.f90 +++ b/fortran/test/tH5R.f90 @@ -125,7 +125,6 @@ SUBROUTINE refobjtest(cleanup, total_error) CALL check("h5tcopy_f",error,total_error) CALL h5tcommit_f(file_id, "MyType", type_id, error) CALL check("h5tcommit_f",error,total_error) - ! ! Close dataspaces, groups and integer dataset ! @@ -233,7 +232,6 @@ SUBROUTINE refobjtest(cleanup, total_error) CALL h5fclose_f(file_id, error) CALL check("h5fclose_f",error,total_error) - IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) CALL check("h5_cleanup_f", error, total_error) RETURN diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.f90 index 8d91f66..761dfcb 100644 --- a/fortran/test/tH5T.f90 +++ b/fortran/test/tH5T.f90 @@ -314,7 +314,6 @@ CONTAINS CALL check("h5tclose_f", error, total_error) CALL h5tclose_f(dt4_id, error) CALL check("h5tclose_f", error, total_error) - ! ! Create and store compound datatype with the character and ! array members. diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90 index 32531b0..5cac62d 100644 --- a/fortran/test/tH5T_F03.f90 +++ b/fortran/test/tH5T_F03.f90 @@ -739,10 +739,10 @@ END SUBROUTINE test_array_compound_atomic CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, error) CALL check("h5tget_size_f", error, total_error) IF(h5_sizeof(cf(1)%b(1)).EQ.4_size_t)THEN - CALL h5tget_size_f(H5T_NATIVE_REAL_4, type_sizer, error) + CALL h5tget_size_f(H5T_NATIVE_REAL_C_FLOAT, type_sizer, error) CALL check("h5tget_size_f", error, total_error) ELSE IF(h5_sizeof(cf(1)%b(1)).EQ.8_size_t)THEN - CALL h5tget_size_f(H5T_NATIVE_REAL_8, type_sizer, error) + CALL h5tget_size_f(H5T_NATIVE_REAL_C_DOUBLE, type_sizer, error) CALL check("h5tget_size_f", error, total_error) ENDIF @@ -757,8 +757,8 @@ END SUBROUTINE test_array_compound_atomic ! Initialize the data type IDs ! ---------------------------- dtsinfo%datatype(1) = H5T_NATIVE_INTEGER; - dtsinfo%datatype(2) = H5T_NATIVE_REAL_4; - dtsinfo%datatype(3) = H5T_NATIVE_REAL_8; + dtsinfo%datatype(2) = H5T_NATIVE_REAL_C_FLOAT; + dtsinfo%datatype(3) = H5T_NATIVE_REAL_C_DOUBLE; ! Initialize the names of data members @@ -866,7 +866,7 @@ END SUBROUTINE test_array_compound_atomic CALL h5tcreate_f(H5T_COMPOUND_F, sizeof_compound , type, error) CALL check("h5tcreate_f", error, total_error) - CALL h5tarray_create_f(H5T_NATIVE_REAL_4, 1, dima, array_dt, error) + CALL h5tarray_create_f(H5T_NATIVE_REAL_C_FLOAT, 1, dima, array_dt, error) CALL check("h5tarray_create_f", error, total_error) CALL h5tinsert_f(TYPE, "Two", 0_size_t, array_dt, error) @@ -1023,8 +1023,8 @@ END SUBROUTINE test_array_compound_atomic INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(Fortran_INTEGER_4) !should map to INTEGER*4 on most modern processors INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(Fortran_INTEGER_8) !should map to INTEGER*8 on most modern processors - INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors - INTEGER, PARAMETER :: real_kind_15 = SELECTED_REAL_KIND(Fortran_REAL_8) !should map to REAL*8 on most modern processors + INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_C_FLOAT) !should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: real_kind_15 = SELECTED_REAL_KIND(Fortran_REAL_C_DOUBLE) !should map to REAL*8 on most modern processors CHARACTER(LEN=12), PARAMETER :: filename = "dsetf_F03.h5" ! File name CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name @@ -2978,7 +2978,7 @@ SUBROUTINE test_nbit(total_error ) USE ISO_C_BINDING IMPLICIT NONE - INTEGER, PARAMETER :: wp = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: wp = SELECTED_REAL_KIND(Fortran_REAL_C_FLOAT) !should map to REAL*4 on most modern processors INTEGER, INTENT(INOUT) :: total_error INTEGER(hid_t) :: file @@ -3128,7 +3128,7 @@ SUBROUTINE t_enum_conv(total_error) INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(Fortran_INTEGER_4) !should map to INTEGER*4 on most modern processors INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(Fortran_INTEGER_8)!should map to INTEGER*8 on most modern processors - INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_C_FLOAT) !should map to REAL*4 on most modern processors INTEGER(hid_t) :: cwg=-1, dtype=-1, space=-1, dset=-1 ! Handles INTEGER(hid_t) :: file ! Handles diff --git a/fortran/test/tf.F90 b/fortran/test/tf.F90 index ba4f492..505d945 100644 --- a/fortran/test/tf.F90 +++ b/fortran/test/tf.F90 @@ -76,7 +76,7 @@ CONTAINS !DEC$endif SUBROUTINE verify_real_kind_7(string,value,correct_value,total_error) USE HDF5 - INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_C_FLOAT) !should map to REAL*4 on most modern processors CHARACTER(LEN=*) :: string REAL(real_kind_7) :: value, correct_value INTEGER :: total_error diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 2ae7e8e..6b2269b 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -465,6 +465,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -511,6 +512,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/Makefile.in b/hl/Makefile.in index 56650e2..8e47cce 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -469,6 +469,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -515,6 +516,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index 55e827b..5458d35 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -465,6 +465,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -511,6 +512,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index a1efec5..e5abead 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -412,6 +412,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -458,6 +459,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index c98a3a5..49a6c27 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -468,6 +468,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -514,6 +515,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index 20f1039..10ba6fb 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -465,6 +465,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -511,6 +512,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index 41e510e..b9b7f68 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -412,6 +412,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -458,6 +459,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 012c84a..3380d01 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -469,6 +469,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -515,6 +516,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index ae07190..4150781 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -412,6 +412,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -458,6 +459,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index 6234635..02409d9 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -86,8 +86,7 @@ h5ltread_dataset_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, - void *buf, - hsize_t_f *dims); + void *buf); HDF5_HL_F90CSTUBDLL int_f @@ -97,7 +96,7 @@ h5ltset_attribute_c(hid_t_f *loc_id, size_t_f *attrnamelen, _fcd attrname, size_t_f *size, - void *buf, char *dtype); + void *buf, char *dtype, size_t_f *sizeof_val); HDF5_HL_F90CSTUBDLL diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c index 7f52eb2..3122b60 100644 --- a/hl/fortran/src/H5LTfc.c +++ b/hl/fortran/src/H5LTfc.c @@ -113,8 +113,7 @@ h5ltread_dataset_c (hid_t_f *loc_id, size_t_f *namelen, _fcd name, hid_t_f *type_id, - void *buf, - hsize_t_f *dims) + void *buf) { int ret_value = -1; herr_t ret; @@ -296,7 +295,7 @@ h5ltset_attribute_c(hid_t_f *loc_id, size_t_f *attrnamelen, _fcd attrname, size_t_f *size, - void *buf, char *dtype) + void *buf, char *dtype, size_t_f *sizeof_val) { int ret_value = -1; herr_t ret; @@ -324,18 +323,25 @@ h5ltset_attribute_c(hid_t_f *loc_id, c_size = (size_t)*size; if( HDstrncmp(dtype,"I",1) == 0 ) { - if (sizeof(int_f) == sizeof(int)) - ret = H5LTset_attribute_int(c_loc_id,c_name,c_attrname,(const int *)buf,c_size); - else if (sizeof(int_f) == sizeof(long)) - ret = H5LTset_attribute_long(c_loc_id,c_name,c_attrname,(const long *)buf,c_size); - else if (sizeof(int_f) == sizeof(long long)) - ret = H5LTset_attribute_long_long(c_loc_id,c_name,c_attrname,(const long long *)buf,c_size); + if ((size_t)*sizeof_val == sizeof(int)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_INT, (const int *)buf); + else if ((size_t)*sizeof_val == sizeof(long)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_LONG, (const long *)buf); + else if ((size_t)*sizeof_val == sizeof(long long)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_LLONG, (const long long *)buf); else goto done; } else if ( HDstrncmp(dtype,"R",1) == 0 ) { - ret = H5LTset_attribute_float(c_loc_id,c_name,c_attrname, (float *)buf,c_size); - } else if ( HDstrncmp(dtype,"D",1) == 0 ) { - ret = H5LTset_attribute_double(c_loc_id,c_name,c_attrname, (double *)buf,c_size); + if((size_t)*sizeof_val == sizeof(float)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_FLOAT, (const float *)buf); + else if((size_t)*sizeof_val == sizeof(double)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_DOUBLE, (const double *)buf); +#if H5_SIZEOF_LONG_DOUBLE !=0 + else if((size_t)*sizeof_val == sizeof(long double)) + ret = H5LT_set_attribute_numerical(c_loc_id,c_name,c_attrname, c_size, H5T_NATIVE_LDOUBLE, (const long double *)buf); +#endif + else + goto done; } else if ( HDstrncmp(dtype,"C",1) == 0 ) { c_buf = (char *)HD5f2cstring((_fcd)buf, c_size); @@ -636,6 +642,10 @@ h5ltget_attribute_c(hid_t_f *loc_id, ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_FLOAT,buf); else if((size_t)*sizeof_val == sizeof(double)) ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_DOUBLE,buf); +#if H5_SIZEOF_LONG_DOUBLE !=0 + else if((size_t)*sizeof_val == sizeof(long double)) + ret = H5LTget_attribute(c_loc_id,c_name,c_attrname,H5T_NATIVE_LDOUBLE,buf); +#endif else goto done; } diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 index 10169c5..c1ca6be 100644 --- a/hl/fortran/src/H5LTff.F90 +++ b/hl/fortran/src/H5LTff.F90 @@ -246,7 +246,7 @@ MODULE h5lt END INTERFACE INTERFACE - INTEGER FUNCTION h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,buf,dims) & + INTEGER FUNCTION h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,buf) & BIND(C,NAME='h5ltread_dataset_c') IMPORT :: C_CHAR, C_PTR IMPORT :: HID_T, SIZE_T, HSIZE_T @@ -255,13 +255,12 @@ MODULE h5lt INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier INTEGER(size_t) :: namelen ! length of name buffer CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf TYPE(C_PTR), VALUE :: buf ! data buffer END FUNCTION h5ltread_dataset_c END INTERFACE INTERFACE - INTEGER FUNCTION h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf,dtype) & + INTEGER FUNCTION h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,buf,dtype, SizeOf_buf) & BIND(C,NAME='h5ltset_attribute_c') IMPORT :: C_CHAR, C_PTR IMPORT :: HID_T, SIZE_T, HSIZE_T @@ -276,6 +275,7 @@ MODULE h5lt CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dtype ! flag indicating the datatype of the ! the buffer: ! R=Real, D=DOUBLE, I=Interger, C=Character + INTEGER(size_t) :: SizeOf_buf ! Sizeof the buf datatype END FUNCTION h5ltset_attribute_c END INTERFACE @@ -1092,20 +1092,18 @@ CONTAINS dset_name,& type_id,& buf,& - dims,& errcode ) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf TYPE(C_PTR) :: buf ! data buffer INTEGER :: errcode ! error code INTEGER(size_t) :: namelen namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id, buf, dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id, buf) END SUBROUTINE h5ltread_dataset_f_ptr @@ -1146,7 +1144,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_int1 @@ -1188,7 +1186,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_int2 @@ -1213,7 +1211,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_int3 @@ -1234,7 +1232,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_int4 @@ -1255,7 +1253,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_int5 @@ -1293,7 +1291,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_int6 @@ -1314,7 +1312,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_int7 @@ -1356,7 +1354,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_float1 @@ -1381,7 +1379,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_float2 @@ -1406,7 +1404,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_float3 @@ -1427,7 +1425,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_float4 @@ -1448,7 +1446,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_float5 @@ -1486,7 +1484,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_float6 @@ -1507,7 +1505,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_float7 @@ -1549,7 +1547,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_double1 @@ -1574,7 +1572,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_double2 @@ -1599,7 +1597,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_double3 @@ -1620,7 +1618,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_double4 @@ -1641,7 +1639,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_double5 @@ -1662,7 +1660,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_double6 @@ -1683,7 +1681,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_double7 @@ -1725,7 +1723,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_long_double1 @@ -1750,7 +1748,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_long_double2 @@ -1775,7 +1773,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_long_double3 @@ -1796,7 +1794,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_long_double4 @@ -1817,7 +1815,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_long_double5 @@ -1838,7 +1836,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_long_double6 @@ -1859,7 +1857,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) END SUBROUTINE h5ltread_dataset_f_c_long_double7 #endif @@ -2604,7 +2602,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltread_dataset_int_f_1 @@ -2627,7 +2625,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltread_dataset_int_f_2 @@ -2650,7 +2648,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltread_dataset_int_f_3 @@ -2669,7 +2667,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltread_dataset_int_f_4 @@ -2688,7 +2686,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltread_dataset_int_f_5 @@ -2707,7 +2705,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltread_dataset_int_f_6 @@ -2726,7 +2724,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_INTEGER,f_ptr) END SUBROUTINE h5ltread_dataset_int_f_7 @@ -2767,7 +2765,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltread_dataset_c_float_f_1 @@ -2790,7 +2788,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltread_dataset_c_float_f_2 @@ -2813,7 +2811,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltread_dataset_c_float_f_3 @@ -2832,7 +2830,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltread_dataset_c_float_f_4 @@ -2851,7 +2849,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltread_dataset_c_float_f_5 @@ -2870,7 +2868,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltread_dataset_c_float_f_6 @@ -2889,7 +2887,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_REAL,f_ptr) END SUBROUTINE h5ltread_dataset_c_float_f_7 @@ -2929,7 +2927,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_double_f_1 @@ -2952,7 +2950,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_double_f_2 @@ -2975,7 +2973,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_double_f_3 @@ -2994,7 +2992,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_double_f_4 @@ -3013,7 +3011,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_double_f_5 @@ -3032,7 +3030,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_double_f_6 @@ -3051,7 +3049,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_double_f_7 @@ -3092,7 +3090,7 @@ CONTAINS f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_long_double_f_1 @@ -3115,7 +3113,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_long_double_f_2 @@ -3138,7 +3136,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_long_double_f_3 @@ -3157,7 +3155,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_long_double_f_4 @@ -3176,7 +3174,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_long_double_f_5 @@ -3195,7 +3193,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_long_double_f_6 @@ -3214,7 +3212,7 @@ CONTAINS f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) namelen = LEN(dset_name) - errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr,dims) + errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,H5T_NATIVE_DOUBLE,f_ptr) END SUBROUTINE h5ltread_dataset_c_long_double_f_7 #endif @@ -3320,6 +3318,61 @@ CONTAINS ! Make/Read attribute functions !------------------------------------------------------------------------- + !------------------------------------------------------------------------- + ! Function: h5ltset_attribute_f + ! + ! Purpose: Create and write an attribute + ! + ! Return: Success: 0, Failure: -1 + ! + ! Programmer: M. Scot Breitenfeld + ! + ! Date: May 4, 2015 + ! + ! Comments: + ! + ! Modifications: + ! + !------------------------------------------------------------------------- + + SUBROUTINE h5ltset_attribute_f(loc_id,& + dset_name,& + attr_name,& + buf,& + buf_type, SizeOf_buf_type, & + size,& + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute + TYPE(C_PTR) :: buf ! data buffer + CHARACTER(LEN=*), INTENT(in) :: buf_type ! + INTEGER(size_t), INTENT(in) :: size ! size of attribute array + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + + CHARACTER(KIND=C_CHAR) :: buf_type_uppercase + INTEGER(size_t) :: SizeOf_buf_type + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + + buf_type_uppercase(1:1) = buf_type(1:1) + IF(buf_type_uppercase(1:1).EQ.'i')THEN + buf_type_uppercase(1:1) = 'I' + ELSE IF(buf_type_uppercase(1:1).EQ.'r')THEN + buf_type_uppercase(1:1) = 'R' + ELSE IF(buf_type_uppercase(1:1).EQ.'c')THEN + buf_type_uppercase(1:1) = 'C' + ENDIF + + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& + buf,buf_type_uppercase(1:1)//C_NULL_CHAR, SizeOf_buf_type) + + END SUBROUTINE h5ltset_attribute_f !------------------------------------------------------------------------- ! Function: h5ltset_attribute_int_f @@ -3355,12 +3408,20 @@ CONTAINS INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf_buf_type f_ptr = C_LOC(buf(1:1)) +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + 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)) +#endif + namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,f_ptr,'I'//C_NULL_CHAR) + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& + f_ptr,'I'//C_NULL_CHAR,SizeOf_buf_type) END SUBROUTINE h5ltset_attribute_int_f @@ -3398,12 +3459,20 @@ CONTAINS INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf_buf_type f_ptr = C_LOC(buf(1)) +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + 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)) +#endif + namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,f_ptr,'R'//C_NULL_CHAR) + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& + f_ptr,'R'//C_NULL_CHAR, SizeOf_buf_type) END SUBROUTINE h5ltset_attribute_float_f @@ -3441,12 +3510,20 @@ CONTAINS INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf_buf_type f_ptr = C_LOC(buf(1)) +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + 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)) +#endif + namelen = LEN(dset_name) attrlen = LEN(attr_name) - errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,f_ptr,'D'//C_NULL_CHAR) + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& + f_ptr,'R'//C_NULL_CHAR,SizeOf_buf_type) END SUBROUTINE h5ltset_attribute_double_f @@ -3484,13 +3561,21 @@ CONTAINS INTEGER(size_t) :: attrlen ! name length INTEGER(size_t) :: buflen ! data buffer length TYPE(C_PTR) :: f_ptr + INTEGER(size_t) :: SizeOf_buf_type f_ptr = C_LOC(buf(1)(1:1)) +#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + 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)) +#endif + namelen = LEN(dset_name) attrlen = LEN(attr_name) buflen = LEN(buf) - errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,f_ptr,'C'//C_NULL_CHAR) + errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,& + f_ptr,'C'//C_NULL_CHAR, SizeOf_buf_type) END SUBROUTINE h5ltset_attribute_string_f @@ -3511,26 +3596,40 @@ CONTAINS ! !------------------------------------------------------------------------- -!!$ SUBROUTINE h5ltget_attribute_f(loc_id,& -!!$ dset_name,& -!!$ attr_name,& -!!$ buf,& -!!$ errcode ) -!!$ -!!$ IMPLICIT NONE -!!$ INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier -!!$ CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset -!!$ CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute -!!$ INTEGER :: errcode ! error code -!!$ TYPE(C_PTR) :: buf! data buffer -!!$ INTEGER(size_t) :: namelen ! name length -!!$ INTEGER(size_t) :: attrlen ! name length -!!$ -!!$ namelen = LEN(dset_name) -!!$ attrlen = LEN(attr_name) -!!$ errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,'I'//C_NULL_CHAR) -!!$ -!!$ END SUBROUTINE h5ltget_attribute_f + SUBROUTINE h5ltget_attribute_f(loc_id,& + dset_name,& + attr_name,& + buf, buf_type, SizeOf_buf_type, & + errcode ) + + IMPLICIT NONE + INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute + INTEGER, INTENT(out) :: errcode ! error code + CHARACTER(LEN=*), INTENT(in) :: buf_type + TYPE(C_PTR) :: buf! data buffer + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + CHARACTER(KIND=C_CHAR) :: buf_type_uppercase + INTEGER(size_t) :: SizeOf_buf_type + + namelen = LEN(dset_name) + attrlen = LEN(attr_name) + + buf_type_uppercase(1:1) = buf_type(1:1) + IF(buf_type_uppercase(1:1).EQ.'i')THEN + buf_type_uppercase(1:1) = 'I' + ELSE IF(buf_type_uppercase(1:1).EQ.'r')THEN + buf_type_uppercase(1:1) = 'R' + ELSE IF(buf_type_uppercase(1:1).EQ.'c')THEN + buf_type_uppercase(1:1) = 'C' + ENDIF + errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name, & + buf, buf_type_uppercase//C_NULL_CHAR, SizeOf_buf_type) + + + END SUBROUTINE h5ltget_attribute_f !------------------------------------------------------------------------- ! Function: h5ltget_attribute_int_f diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 510e4148..f513337 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -489,6 +489,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -535,6 +536,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index 371b6fd..2c75fa5 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -477,6 +477,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -523,6 +524,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/fortran/test/tstlite.f90 b/hl/fortran/test/tstlite.f90 index 22b99a5..8fe9612 100644 --- a/hl/fortran/test/tstlite.f90 +++ b/hl/fortran/test/tstlite.f90 @@ -38,6 +38,7 @@ END PROGRAM lite_test SUBROUTINE test_dataset1D() +USE, INTRINSIC :: ISO_C_BINDING USE H5LT ! module of H5LT USE HDF5 ! module of HDF5 library @@ -55,11 +56,12 @@ INTEGER, DIMENSION(DIM1) :: buf1 ! Data buffer INTEGER, DIMENSION(DIM1) :: bufr1 ! Data buffer REAL, DIMENSION(DIM1) :: buf2 ! Data buffer REAL, DIMENSION(DIM1) :: bufr2 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1) :: buf3 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1) :: bufr3 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf3 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr3 ! Data buffer INTEGER :: errcode ! Error flag INTEGER :: i ! general purpose integer - +TYPE(C_PTR) :: f_ptr +integer(HID_T) :: mytype CALL test_begin(' Make/Read datasets (1D) ') @@ -101,7 +103,7 @@ CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr1, dims, err ! DO i = 1, DIM1 IF ( buf1(i) .NE. bufr1(i) ) THEN - PRINT *, 'read buffer differs from write buffer' + PRINT *, 'read buffer differs from write buffer (I)' PRINT *, bufr1(i), ' and ', buf1(i) STOP ENDIF @@ -126,7 +128,7 @@ CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_REAL, bufr2, dims, errcod ! DO i = 1, DIM1 IF ( buf2(i) .NE. bufr2(i) ) THEN - PRINT *, 'read buffer differs from write buffer' + PRINT *, 'read buffer differs from write buffer (R)' PRINT *, bufr2(i), ' and ', buf2(i) STOP ENDIF @@ -139,19 +141,30 @@ END DO ! ! write dataset. ! -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_DOUBLE, buf3, errcode) - +f_ptr = C_LOC(buf3(1)) +!PRINT*,h5kind_to_type(INT(KIND(buf3(1))), INT(H5_REAL_KIND)), H5T_NATIVE_REAL_8,H5T_NATIVE_REAL,H5T_NATIVE_REAL_16 +PRINT*, KIND(buf3(1)), Fortran_REAL_16 +mytype = h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) +PRINT*,sizeof(buf3(1)) +CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, & + mytype, f_ptr, errcode) +!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_DOUBLE, buf3, errcode) +! h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) +stop ! ! read dataset. ! -CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_DOUBLE, bufr3, dims, errcode) +f_ptr = C_LOC(bufr3(1)) +CALL h5ltread_dataset_f(file_id, dsetname3, & + h5kind_to_type(KIND(bufr3(1)), H5_REAL_KIND), f_ptr, errcode) +!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_DOUBLE, bufr3, dims, errcode) ! ! compare read and write buffers. ! DO i = 1, DIM1 IF ( buf3(i) .NE. bufr3(i) ) THEN - PRINT *, 'read buffer differs from write buffer' + PRINT *, 'read buffer differs from write buffer (D)' PRINT *, bufr3(i), ' and ', buf3(i) STOP ENDIF @@ -179,6 +192,7 @@ END SUBROUTINE test_dataset1D SUBROUTINE test_dataset2D() +USE, INTRINSIC :: ISO_C_BINDING USE H5LT ! module of H5LT USE HDF5 ! module of HDF5 library @@ -199,12 +213,13 @@ INTEGER, DIMENSION(DIM1*DIM2) :: buf ! Data buffer INTEGER, DIMENSION(DIM1*DIM2) :: bufr ! Data buffer INTEGER, DIMENSION(DIM1,DIM2) :: buf2 ! Data buffer INTEGER, DIMENSION(DIM1,DIM2) :: buf2r ! Data buffer -REAL, DIMENSION(DIM1,DIM2) :: buf3 ! Data buffer -REAL, DIMENSION(DIM1,DIM2) :: buf3r ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2) :: buf4 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2) :: buf4r ! Data buffer +REAL, DIMENSION(DIM1,DIM2), TARGET :: buf3 ! Data buffer +REAL, DIMENSION(DIM1,DIM2), TARGET :: buf3r ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2), TARGET :: buf4 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2), TARGET :: buf4r ! Data buffer INTEGER :: errcode ! Error flag INTEGER(HSIZE_T) :: i, j, n ! general purpose integers +TYPE(C_PTR) :: f_ptr CALL test_begin(' Make/Read datasets (2D) ') @@ -296,12 +311,16 @@ END DO ! ! write dataset. ! -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) +f_ptr = C_LOC(buf3(1,1)) +CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) +!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) ! ! read dataset. ! -CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) +f_ptr = C_LOC(buf3r(1,1)) +CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) +!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) ! ! compare read and write buffers. @@ -323,12 +342,16 @@ END DO ! ! write dataset. ! -CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, buf4, errcode) +f_ptr = C_LOC(buf4(1,1)) +CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) +!CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, buf4, errcode) ! ! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, buf4r, dims, errcode) +f_ptr = C_LOC(buf4r(1,1)) +CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + +!CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, buf4r, dims, errcode) ! ! compare read and write buffers. @@ -366,7 +389,7 @@ END SUBROUTINE test_dataset2D SUBROUTINE test_dataset3D() - +USE, INTRINSIC :: ISO_C_BINDING USE H5LT ! module of H5LT USE HDF5 ! module of HDF5 library @@ -387,16 +410,16 @@ INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: buf ! Data buffer INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: bufr ! Data buffer INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2 ! Data buffer INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2r ! Data buffer -REAL, DIMENSION(DIM1,DIM2,DIM3) :: buf3 ! Data buffer -REAL, DIMENSION(DIM1,DIM2,DIM3) :: buf3r ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3) :: buf4 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3) :: buf4r ! Data buffer +REAL, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf3 ! Data buffer +REAL, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf3r ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf4 ! Data buffer +DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf4r ! Data buffer INTEGER :: rank = 3 ! Dataset rank INTEGER :: errcode ! Error flag INTEGER(HSIZE_T) :: i, j, k, n ! general purpose integers INTEGER :: type_class INTEGER(SIZE_T) :: type_size - +TYPE(C_PTR) :: f_ptr CALL test_begin(' Make/Read datasets (3D) ') @@ -492,12 +515,16 @@ END DO ! ! write dataset. ! -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) +f_ptr = C_LOC(buf3(1,1,1)) +CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) +!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) ! ! read dataset. ! -CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) +f_ptr = C_LOC(buf3r(1,1,1)) +CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) +!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) ! ! compare read and write buffers. @@ -521,12 +548,14 @@ END DO ! ! write dataset. ! -CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, buf4, errcode) +f_ptr = C_LOC(buf4(1,1,1)) +CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) ! ! read dataset. ! -CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, buf4r, dims, errcode) +f_ptr = C_LOC(buf4r(1,1,1)) +CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) ! ! compare read and write buffers. @@ -608,22 +637,22 @@ SUBROUTINE test_datasetND(rank) INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: ibufr_6 ! Data buffer INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibuf_7 ! Data buffer INTEGER, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: ibufr_7 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:) :: rbuf_4 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:) :: rbufr_4 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: rbuf_4 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: rbufr_4 ! Data buffer REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: rbuf_5 ! Data buffer REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: rbufr_5 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: rbuf_6 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: rbufr_6 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: rbuf_7 ! Data buffer - REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: rbufr_7 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:) :: dbuf_4 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:) :: dbufr_4 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: dbuf_5 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: dbufr_5 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: dbuf_6 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:) :: dbufr_6 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: dbuf_7 ! Data buffer - DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: dbufr_7 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: rbuf_6 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: rbufr_6 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: rbuf_7 ! Data buffer + REAL, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: rbufr_7 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: dbuf_4 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: dbufr_4 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: dbuf_5 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: dbufr_5 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: dbuf_6 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: dbufr_6 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: dbuf_7 ! Data buffer + DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: dbufr_7 ! Data buffer INTEGER :: errcode ! Error flag INTEGER(HSIZE_T) :: i, j, k, l, m, n, o, nn ! general purpose integers INTEGER :: type_class @@ -786,7 +815,7 @@ SUBROUTINE test_datasetND(rank) CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_4, dims(1:rank), errcode) ELSE IF(rank.EQ.5)THEN f_ptr = C_LOC(ibufr_5(1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, f_ptr, dims(1:rank), errcode) + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, f_ptr, errcode) ELSE IF(rank.EQ.6)THEN CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, ibufr_6, dims(1:rank), errcode) ELSE IF(rank.EQ.7)THEN @@ -846,14 +875,20 @@ SUBROUTINE test_datasetND(rank) ! write dataset. ! IF(rank.EQ.4)THEN - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_4, errcode) + f_ptr = C_LOC(rbuf_4(1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) + ! CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_4, errcode) ELSE IF(rank.EQ.5)THEN f_ptr = C_LOC(rbuf_5(1,1,1,1,1)) CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) ELSE IF(rank.EQ.6)THEN - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_6, errcode) + f_ptr = C_LOC(rbuf_6(1,1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) + !CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_6, errcode) ELSE IF(rank.EQ.7)THEN - CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_7, errcode) + f_ptr = C_LOC(rbuf_7(1,1,1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) + !CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_7, errcode) ENDIF @@ -861,14 +896,17 @@ SUBROUTINE test_datasetND(rank) ! read dataset. ! IF(rank.EQ.4)THEN - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, rbufr_4, dims(1:rank), errcode) + f_ptr = C_LOC(rbufr_4(1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) ELSE IF(rank.EQ.5)THEN f_ptr = C_LOC(rbufr_5(1,1,1,1,1)) - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, dims(1:rank), errcode) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) ELSE IF(rank.EQ.6)THEN - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, rbufr_6, dims(1:rank), errcode) + f_ptr = C_LOC(rbufr_6(1,1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) ELSE IF(rank.EQ.7)THEN - CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, rbufr_7, dims(1:rank), errcode) + f_ptr = C_LOC(rbufr_7(1,1,1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) ENDIF ! @@ -925,13 +963,17 @@ SUBROUTINE test_datasetND(rank) ! write dataset. ! IF(rank.EQ.4)THEN - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, dbuf_4, errcode) + f_ptr = C_LOC(dbuf_4(1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) ELSE IF(rank.EQ.5)THEN - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, dbuf_5, errcode) + f_ptr = C_LOC(dbuf_5(1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) ELSE IF(rank.EQ.6)THEN - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, dbuf_6, errcode) + f_ptr = C_LOC(dbuf_6(1,1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) ELSE IF(rank.EQ.7)THEN - CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, dbuf_7, errcode) + f_ptr = C_LOC(dbuf_7(1,1,1,1,1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) ENDIF @@ -939,13 +981,17 @@ SUBROUTINE test_datasetND(rank) ! read dataset. ! IF(rank.EQ.4)THEN - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, dbufr_4, dims(1:rank), errcode) + f_ptr = C_LOC(dbufr_4(1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) ELSE IF(rank.EQ.5)THEN - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, dbufr_5, dims(1:rank), errcode) + f_ptr = C_LOC(dbufr_5(1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) ELSE IF(rank.EQ.6)THEN - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, dbufr_6, dims(1:rank), errcode) + f_ptr = C_LOC(dbufr_6(1,1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) ELSE IF(rank.EQ.7)THEN - CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, dbufr_7, dims(1:rank), errcode) + f_ptr = C_LOC(dbufr_7(1,1,1,1,1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) ENDIF ! @@ -1042,6 +1088,7 @@ END SUBROUTINE test_datasetND SUBROUTINE test_datasets() + USE, INTRINSIC :: ISO_C_BINDING USE H5LT ! module of H5LT USE HDF5 ! module of HDF5 library @@ -1064,10 +1111,10 @@ SUBROUTINE test_datasets() CHARACTER(LEN=8) :: buf1r ! Data buffer INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer - REAL, DIMENSION(DIM1) :: buf3 ! Data buffer - REAL, DIMENSION(DIM1) :: bufr3 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1) :: buf4 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1) :: bufr4 ! Data buffer + REAL, DIMENSION(DIM1), TARGET :: buf3 ! Data buffer + REAL, DIMENSION(DIM1) , TARGET :: bufr3 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf4 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr4 ! Data buffer INTEGER :: i, n ! general purpose integer INTEGER :: has ! general purpose integer INTEGER :: type_class @@ -1075,6 +1122,7 @@ SUBROUTINE test_datasets() LOGICAL :: path_valid ! status of the path CHARACTER(LEN=6) :: chr_exact CHARACTER(LEN=8) :: chr_lg + TYPE(C_PTR) :: f_ptr ! ! Initialize FORTRAN predefined datatypes. @@ -1137,12 +1185,14 @@ SUBROUTINE test_datasets() ! ! write dataset. ! - CALL h5ltmake_dataset_float_f(file_id, dsetname3, rank, dims, buf3, errcode) + f_ptr = C_LOC(buf3(1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) ! ! read dataset. ! - CALL h5ltread_dataset_float_f(file_id, dsetname3, bufr3, dims, errcode) + f_ptr = C_LOC(bufr3(1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) ! ! compare read and write buffers. @@ -1167,12 +1217,16 @@ SUBROUTINE test_datasets() ! ! write dataset. ! - CALL h5ltmake_dataset_double_f(file_id, dsetname4, rank, dims, buf4, errcode) + f_ptr = C_LOC(buf4(1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) + !CALL h5ltmake_dataset_double_f(file_id, dsetname4, rank, dims, buf4, errcode) ! ! read dataset. ! - CALL h5ltread_dataset_double_f(file_id, dsetname4, bufr4, dims, errcode) + f_ptr = C_LOC(buf4(1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + !CALL h5ltread_dataset_double_f(file_id, dsetname4, bufr4, dims, errcode) ! ! compare read and write buffers. @@ -1341,7 +1395,7 @@ END SUBROUTINE test_datasets SUBROUTINE test_attributes() - USE ISO_C_BINDING + USE, INTRINSIC :: ISO_C_BINDING USE H5LT ! module of H5LT USE HDF5 ! module of HDF5 library @@ -1365,10 +1419,10 @@ SUBROUTINE test_attributes() ! CHARACTER(LEN=18) :: bufr_c_lg ! Data buffer INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer - REAL(C_FLOAT), DIMENSION(DIM1) :: buf3 ! Data buffer - REAL(C_FLOAT), DIMENSION(DIM1) :: bufr3 ! Data buffer - REAL(C_DOUBLE), DIMENSION(DIM1) :: buf4 ! Data buffer - REAL(C_DOUBLE), DIMENSION(DIM1) :: bufr4 ! Data buffer + REAL, DIMENSION(DIM1), target :: buf3 ! Data buffer + REAL, DIMENSION(DIM1), target :: bufr3 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf4 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr4 ! Data buffer INTEGER :: errcode ! Error flag INTEGER :: i, n ! general purpose integer INTEGER(SIZE_T) size ! size of attribute array @@ -1380,7 +1434,8 @@ SUBROUTINE test_attributes() INTEGER :: rank = 1 ! Dataset rank CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name INTEGER, DIMENSION(DIM1) :: buf ! Data buffer - + INTEGER(SIZE_T) :: SizeOf_buf_type + TYPE(C_PTR) :: f_ptr ! ! Initialize FORTRAN predefined datatypes. @@ -1448,11 +1503,26 @@ SUBROUTINE test_attributes() ! ! write attribute. ! - CALL h5ltset_attribute_float_f(file_id,dsetname1,attrname3,buf3,size,errcode) +!#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(buf3(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +!#else +! SizeOf_buf_type = SIZEOF(bufr4(1)) +!#endif + f_ptr = C_LOC(buf3(1)) + CALL h5ltset_attribute_f(file_id,dsetname1,attrname3,f_ptr,"REAL", SizeOf_buf_type, size,errcode) + !CALL h5ltset_attribute_float_f(file_id,dsetname1,attrname3,buf3,size,errcode) ! ! read attribute. ! - CALL h5ltget_attribute_float_f(file_id,dsetname1,attrname3,bufr3,errcode) +!#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(bufr3(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +!#else +! SizeOf_buf_type = SIZEOF(bufr4(1)) +!#endif + + f_ptr = C_LOC(bufr3(1)) + CALL h5ltget_attribute_f(file_id,dsetname1,attrname3,f_ptr,"REAL",SizeOf_buf_type,errcode) + !CALL h5ltget_attribute_float_f(file_id,dsetname1,attrname3,bufr3,errcode) ! ! compare read and write buffers. @@ -1473,15 +1543,30 @@ SUBROUTINE test_attributes() CALL test_begin(' Set/Get attributes double ') + SizeOf_buf_type = STORAGE_SIZE(buf4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) + ! ! write attribute. ! - CALL h5ltset_attribute_double_f(file_id,dsetname1,attrname4,buf4,size,errcode) + f_ptr = C_LOC(buf4(1)) + CALL h5ltset_attribute_f(file_id,dsetname1,attrname4,f_ptr,"real", SizeOf_buf_type, size, errcode) + + !CALL h5ltset_attribute_double_f(file_id,dsetname1,attrname4,f_ptr,"Real", SizeOf_buf_type, size, errcode) ! ! read attribute. ! - CALL h5ltget_attribute_double_f(file_id,dsetname1,attrname4,bufr4,errcode) + +!#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE + SizeOf_buf_type = STORAGE_SIZE(bufr4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) +!#else +! SizeOf_buf_type = SIZEOF(bufr4(1)) +!#endif + + f_ptr = C_LOC(bufr4(1)) + CALL h5ltget_attribute_f(file_id,dsetname1,attrname4,f_ptr,"REAL",SizeOf_buf_type,errcode) + +! CALL h5ltget_attribute_double_f(file_id,dsetname1,attrname4,bufr4,errcode) ! ! compare read and write buffers. @@ -1611,11 +1696,6 @@ SUBROUTINE test_attributes() ! END SUBROUTINE test_attributes - - - - - !------------------------------------------------------------------------- ! test_begin !------------------------------------------------------------------------- diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 2f619b8..a1bf57d 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -467,6 +467,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -513,6 +514,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index f180d68..074ed79 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -504,6 +504,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -550,6 +551,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index 300e063..42b09c6 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -466,6 +466,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -512,6 +513,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index a5b9948..b26df4b 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -480,6 +480,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -526,6 +527,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 571ad43..65bb817 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -282,4 +282,193 @@ dnl Try link a simple MPI program. dnl Change to the C language AC_LANG_POP(Fortran) ]) - + +dnl ------------------------------------------------------ +dnl Determine the available KINDs for REALs and INTEGERs +dnl ------------------------------------------------------ +dnl +dnl This is a runtime test. +dnl +AC_DEFUN([PAC_FC_AVAIL_KINDS],[ +AC_LANG_PUSH([Fortran]) +rm -f pac_fconftest.out +AC_RUN_IFELSE([ + AC_LANG_SOURCE([ + PROGRAM main + IMPLICIT NONE + INTEGER :: ik, k, lastkind + lastkind=SELECTED_INT_KIND(1) + OPEN(8, FILE="pac_fconftest.out", form="formatted") + WRITE(8,'("ik:")',ADVANCE='NO') ! Find integer KINDs + DO ik=2,30 + k = SELECTED_INT_KIND(ik) + IF (k .NE. lastkind) THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + lastkind = k + ENDIF + IF (k .LE. 0) EXIT + ENDDO + IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " + dnl WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " + WRITE(8,'(/)') + WRITE(8,'("rk:")',ADVANCE='NO') ! Find real KINDs + lastkind=SELECTED_REAL_KIND(1) + DO ik=2,30 + k = SELECTED_REAL_KIND(ik) + IF (k .NE. lastkind) THEN + WRITE(8,'(I0,A)',ADVANCE='NO') lastkind," " + lastkind = k + ENDIF + IF (k .LE. 0) EXIT + ENDDO + dnl WRITE(8,'(I0,A)',ADVANCE='NO') lastkind, " " + IF (k.NE.lastkind) WRITE(8,'(I0,A)',ADVANCE='NO') k, " " + + END + ]) +],[ + if test -s pac_fconftest.out ; then + + dnl pac_flag="`sed -e 's/ */ /g' pac_fconftest.out | tr '\012' ','`" + pac_validIntKinds="`sed -n -e 's/^.*ik://p' pac_fconftest.out`" + pac_validRealKinds="`sed -n -e 's/^.*rk://p' pac_fconftest.out`" + PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds | sed -e 's/ /,/g'`}" + PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds | sed -e 's/ /,/g'`}" + AC_MSG_CHECKING([for Fortran INTEGER KINDs]) + AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS]) + AC_MSG_CHECKING([for Fortran REAL KINDs]) + AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS]) + else + AC_MSG_RESULT([Error]) + AC_MSG_WARN([No output from test program!]) + fi + dnl rm -f pac_fconftest.out +],[ + AC_MSG_RESULT([Error]) + AC_MSG_WARN([Failed to run program to determine available KINDs]) +],[ + dnl Even when cross_compiling=yes, + dnl pac_validKinds needs to be set for PAC_FC_INTEGER_MODEL_MAP() + dnl pac_validKinds="`echo \"$2\" | tr ',' ':'`" + dnl AC_MSG_RESULT([$2]) + dnl ifelse([$1],[],[PAC_FC_ALL_INTEGER_MODELS=$2],[$1=$2]) +]) +AC_LANG_POP([Fortran]) +]) + +AC_DEFUN([PAC_FC_SIZEOF_INT_KINDS],[ +AC_REQUIRE([PAC_FC_AVAIL_KINDS]) +AC_MSG_CHECKING([sizeof of available INTEGER KINDs]) +AC_LANG_PUSH([Fortran]) +pack_int_sizeof="" +rm -f pac_fconftest.out +for kind in $pac_validIntKinds; do + AC_LANG_CONFTEST([ + AC_LANG_SOURCE([ + program main + integer (kind=$kind) a + open(8, file="pac_fconftest.out", form="formatted") + write(8,'(I0)') sizeof(a) + close(8) + end + ]) + ]) + AC_RUN_IFELSE([],[ + if test -s pac_fconftest.out ; then + sizes="`cat pac_fconftest.out`" + pack_int_sizeof="$pack_int_sizeof $sizes," + else + AC_MSG_WARN([No output from test program!]) + fi + rm -f pac_fconftest.out + ],[ + AC_MSG_WARN([Fortran program fails to build or run!]) + ],[ + pack_int_sizeof="$2" + ]) +done +PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{ $pack_int_sizeof }" +AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS_SIZEOF]) +AC_LANG_POP([Fortran]) +]) + +AC_DEFUN([PAC_FC_SIZEOF_REAL_KINDS],[ +AC_REQUIRE([PAC_FC_AVAIL_KINDS]) +AC_MSG_CHECKING([sizeof of available REAL KINDs]) +AC_LANG_PUSH([Fortran]) +pack_real_sizeof="" +rm -f pac_fconftest.out +for kind in $pac_validRealKinds; do + AC_LANG_CONFTEST([ + AC_LANG_SOURCE([ + program main + REAL (kind=$kind) :: a + open(8, file="pac_fconftest.out", form="formatted") + write(8,'(I0)') sizeof(a) + close(8) + end + ]) + ]) + AC_RUN_IFELSE([],[ + if test -s pac_fconftest.out ; then + sizes="`cat pac_fconftest.out`" + pack_real_sizeof="$pack_real_sizeof $sizes," + else + AC_MSG_WARN([No output from test program!]) + fi + rm -f pac_fconftest.out + ],[ + AC_MSG_WARN([Fortran program fails to build or run!]) + ],[ + pack_real_sizeof="$2" + ]) +done +PAC_FC_ALL_REAL_KINDS_SIZEOF="{ $pack_real_sizeof }" +AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS_SIZEOF]) +AC_LANG_POP([Fortran]) +]) + +AC_DEFUN([PAC_FC_NATIVE_INTEGER],[ +AC_REQUIRE([PAC_FC_AVAIL_KINDS]) +AC_MSG_CHECKING([sizeof of native KINDS]) +AC_LANG_PUSH([Fortran]) +pack_int_sizeof="" +rm -f pac_fconftest.out + AC_LANG_CONFTEST([ + AC_LANG_SOURCE([ + program main + integer a + real b + double precision c + open(8, file="pac_fconftest.out", form="formatted") + write(8,*) sizeof(a) + write(8,*) kind(a) + write(8,*) sizeof(b) + write(8,*) kind(b) + write(8,*) sizeof(c) + write(8,*) kind(c) + close(8) + end + ]) + ]) + AC_RUN_IFELSE([],[ + if test -s pac_fconftest.out ; then + PAC_FORTRAN_NATIVE_INTEGER_KIND="`sed -n '1p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`sed -n '2p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_REAL_KIND="`sed -n '3p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_REAL_SIZEOF="`sed -n '4p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_DOUBLE_KIND="`sed -n '5p' pac_fconftest.out`" + PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`sed -n '6p' pac_fconftest.out`" + else + AC_MSG_WARN([No output from test program!]) + fi + rm -f pac_fconftest.out + ],[ + AC_MSG_WARN([Fortran program fails to build or run!]) + ],[ + pack_int_sizeof="$2" + ]) +dnl PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{ $pack_int_sizeof }" +AC_MSG_RESULT([$pack_int_sizeof]) +AC_LANG_POP([Fortran]) +]) diff --git a/src/H5config.h.in b/src/H5config.h.in index 2b34ade..a5083a8 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -42,6 +42,9 @@ /* Define if we have Fortran intrinsic STORAGE_SIZE */ #undef FORTRAN_HAVE_STORAGE_SIZE +/* Determine the size of C long double */ +#undef FORTRAN_SIZEOF_LONG_DOUBLE + /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM @@ -94,6 +97,9 @@ /* Define if support for szip filter is enabled */ #undef HAVE_FILTER_SZIP +/* __float128 is available */ +#undef HAVE_FLOAT128 + /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK diff --git a/src/Makefile.in b/src/Makefile.in index fc23c89..e84322a 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -528,6 +528,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -574,6 +575,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/test/Makefile.in b/test/Makefile.in index 1e5aa39..9e0e615 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -872,6 +872,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -918,6 +919,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 358523b..d1329b9 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -495,6 +495,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -541,6 +542,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/Makefile.in b/tools/Makefile.in index ba872ae..7160874 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -466,6 +466,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -512,6 +513,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index e1554f2..760cf07 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -474,6 +474,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -520,6 +521,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 538ff16..2e0dd0c 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -481,6 +481,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -527,6 +528,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 87319f9..0d6f10b 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -480,6 +480,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -526,6 +527,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index ee0600f..8ce37dd 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -474,6 +474,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -520,6 +521,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 2634368..01b3784 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -486,6 +486,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -532,6 +533,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index 7403e90..303065c 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -466,6 +466,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -512,6 +513,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index d014c7a..7c35da7 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -498,6 +498,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -544,6 +545,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index b859a59..524d8d7 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -476,6 +476,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -522,6 +523,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 44fa676..6df09d7 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -463,6 +463,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -509,6 +510,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 1e6c795..c5d1f37 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -501,6 +501,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -547,6 +548,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index f6508a6..8fa1eda 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -505,6 +505,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_FLOAT128 = @HAVE_FLOAT128@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ @@ -551,6 +552,16 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ +PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@ +PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ +PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@ +PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@ +PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@ +PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@ +PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@ +PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@ +PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ -- cgit v0.12