summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-02-04 07:47:51 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-02-04 07:47:51 (GMT)
commit12fc6bf95507244b2f18a56f8ff76cc0ea922fea (patch)
tree0c7ac702a931646e4e0cbdd01dc1f1e571c07f2a /configure.ac
parentae94128b328236cbb36c1da005e2211b5154d2b9 (diff)
downloadhdf5-12fc6bf95507244b2f18a56f8ff76cc0ea922fea.zip
hdf5-12fc6bf95507244b2f18a56f8ff76cc0ea922fea.tar.gz
hdf5-12fc6bf95507244b2f18a56f8ff76cc0ea922fea.tar.bz2
Merge of changes from develop for 1.10.5.
Added RELEASE.txt entries for new features.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac46
1 files changed, 44 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 4f37bd4..5d997b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1131,11 +1131,12 @@ case "$host_cpu-$host_vendor-$host_os" in
## functionality so clock_gettime and CLOCK_MONOTONIC are defined
## correctly. This was later updated to 200112L so that
## posix_memalign() is visible for the direct VFD code on Linux
- ## systems.
+ ## systems. Even later, this was changed to 200809L to support
+ ## pread/pwrite in VFDs.
##
## POSIX feature information can be found in the gcc manual at:
## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
- H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS"
+ H5_CPPFLAGS="-D_POSIX_C_SOURCE=200809L $H5_CPPFLAGS"
## Need to add this so that O_DIRECT is visible for the direct
## VFD on Linux systems.
@@ -3262,6 +3263,47 @@ esac
## ----------------------------------------------------------------------
+## Enable use of pread/pwrite instead of read/write in certain VFDs.
+##
+AC_SUBST([PREADWRITE])
+
+## Check these first to avoid interspersed output in the AC_ARG_ENABLE line
+## below. (Probably overkill to check for both, but we'll be extra careful)
+PREADWRITE_HAVE_BOTH=yes
+AC_CHECK_FUNC([pread], [], [PREADWRITE_HAVE_BOTH=no])
+AC_CHECK_FUNC([pwrite], [], [PREADWRITE_HAVE_BOTH=no])
+
+AC_MSG_CHECKING([whether to use pread/pwrite instead of read/write in certain VFDs])
+AC_ARG_ENABLE([preadwrite],
+ [AS_HELP_STRING([--enable-preadwrite],
+ [Enable using pread/pwrite instead of read/write in sec2/log/core VFDs.
+ [default=yes if pread/pwrite are present]])],
+ [PREADWRITE=$enableval])
+
+## Set the default level.
+if test "X-$PREADWRITE" = X- ; then
+ PREADWRITE=yes
+fi
+
+case "X-$PREADWRITE" in
+ X-yes)
+ if test "X-$PREADWRITE_HAVE_BOTH" = "X-yes"; then
+ AC_DEFINE([HAVE_PREADWRITE], [1], [Define if both pread and pwrite exist.])
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ X-no)
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ AC_MSG_ERROR([Unrecognized value: $PREADWRITE])
+ ;;
+esac
+
+
+## ----------------------------------------------------------------------
## Enable embedded library information
##
AC_MSG_CHECKING([whether to have library information embedded in the executables])