Hi,
netcdf-4.0 as distributed has some bugs in the Fortran configuration
part of the configure script, see attachment.
Explanation:
integer(kind(1)) is just an synonym for integer, but one probably
just wants the smallest integer kind, which often is integer(kind=1).
For a specification of the minimum number of decimal digits, the
last variant (integer(selected_int_kind(2))) does the proper job,
which is probably what the original authors intended.
Without this patch, I get failures in the Fortran self-tests on
a platform where the Fortran compiler does not support "byte",
although the C compiler does.
It would be nice if this patch could be applied to a future
netcdf distribution.
Regards,
-ha
--
Harald Anlauf
Deutscher Wetterdienst (DWD) | Phone: +49 69 8062 4941
FE12 / Datenassimilation | Fax: +49 69 8062 4954
63067 Offenbach | e-Mail: harald.anlauf@xxxxxx
--- ./acinclude.m4.tmp 2008-10-06 14:51:51.883266000 +0000
+++ ./acinclude.m4 2008-10-06 15:06:22.466403000 +0000
@@ -396,8 +396,8 @@
;;
*)
AC_REQUIRE([UD_CHECK_FCALLSCSUB])
- UD_CHECK_FORTRAN_TYPE(NF_INT1_T, byte integer*1 "integer(kind(1))")
- UD_CHECK_FORTRAN_TYPE(NF_INT2_T, integer*2 "integer(kind(2))")
+ UD_CHECK_FORTRAN_TYPE(NF_INT1_T, byte integer*1 "integer(kind=1)"
"integer(selected_int_kind(2))")
+ UD_CHECK_FORTRAN_TYPE(NF_INT2_T, integer*2 "integer(kind=2)"
"integer(selected_int_kind(4))")
case "${NF_INT1_T}" in
'') ;;