summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-01-13 05:37:00 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-01-13 05:37:00 (GMT)
commitd6e767c21d28c9295e24dfedcbcf17c2d18006b8 (patch)
treedb928b7453fdb67016a72f1c737434166d6e773b /configure.in
parentd9bc27b53521042e9fd648e9c0f0318d0bca4631 (diff)
downloadhdf5-d6e767c21d28c9295e24dfedcbcf17c2d18006b8.zip
hdf5-d6e767c21d28c9295e24dfedcbcf17c2d18006b8.tar.gz
hdf5-d6e767c21d28c9295e24dfedcbcf17c2d18006b8.tar.bz2
[svn-r14402] Description:
Add work-around to allow reading files that were produced with a buggy earlier version of the library, which could create objects with the wrong object header message count. There is now a configure flag "--enable-strict-format-checks" which triggers a failure on reading a file with this sort of corruption (when enabled) and allows the object to be read (when disabled). The default value for the "strict-format-checks" flag is yes when the "debug" flag is enabled and no when the "debug" flag is disabled. Note that if strict format checks are disabled (allowing objects with this particular kind of corruption to be read) and the file is opened with write access, the library will re-write the object header for the corrupt object with the correct # of object header messages. This closes bugzilla bug #1010. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in38
1 files changed, 38 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 956ebe9..361322e 100644
--- a/configure.in
+++ b/configure.in
@@ -3645,6 +3645,41 @@ if test "X${DEFAULT_API_VERSION}" != "Xv18" -a "X${DEPRECATED_SYMBOLS}" = "Xno"
AC_MSG_ERROR([Removing old public API symbols not allowed when using them as default public API symbols])
fi
+
+dnl ----------------------------------------------------------------------
+dnl Enable strict file format checks
+dnl
+AC_SUBST([STRICT_FORMAT_CHECKS])
+AC_MSG_CHECKING([Whether to perform strict file format checks]);
+AC_ARG_ENABLE([strict-format-checks],
+ [AC_HELP_STRING([--enable-strict-format-checks],
+ [Enable strict file format checks, default=yes if
+ debug flag is enabled, no otherwise])],
+ [STRICT_CHECKS=$enableval])
+
+dnl Default to yes if debug is enabled
+if test "X-$STRICT_CHECKS" = X- ; then
+ if test -z "$DEBUG_PKG" ; then
+ STRICT_CHECKS=no
+ else
+ STRICT_CHECKS=yes
+ fi
+fi
+
+case "X-$STRICT_CHECKS" in
+ X-yes)
+ AC_MSG_RESULT([yes])
+ STRICT_FORMAT_CHECKS=yes
+ AC_DEFINE([STRICT_FORMAT_CHECKS], [1],
+ [Define if strict file format checks are enabled])
+ ;;
+ X-no|*)
+ AC_MSG_RESULT([no])
+ STRICT_FORMAT_CHECKS=no
+ ;;
+esac
+
+
dnl ----------------------------------------------------------------------
dnl Create automake conditionals to tell automake makefiles which directories
dnl need to be compiled
@@ -3952,6 +3987,9 @@ IF_ENABLED_DISABLED "$CODESTACK"
PRINT_N " GPFS"
IF_YES_NO "$GPFS"
+PRINT_N " Strict File Format Checks"
+IF_ENABLED_DISABLED "$STRICT_FORMAT_CHECKS"
+
PRINT_N " Default API Mapping"
PRINT "$DEFAULT_API_VERSION"