summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in39
1 files changed, 39 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index f14cf56..b141e2c 100644
--- a/configure.in
+++ b/configure.in
@@ -2572,6 +2572,45 @@ if test "$STREAM_VFD" = "yes"; then
fi
dnl ----------------------------------------------------------------------
+dnl Check if Direct I/O driver is wanted by --enable-direct-vfd
+dnl
+
+AC_MSG_CHECKING([for Direct Virtual File Driver support])
+
+AC_ARG_ENABLE([direct-vfd],
+ [AC_HELP_STRING([--enable-direct-vfd],
+ [Build the Direct I/O Virtual File Driver
+ [default=yes]])],
+ [DIRECT_VFD=$enableval], [DIRECT_VFD=yes])
+
+if test "$DIRECT_VFD" = "yes"; then
+ AC_CACHE_VAL([hdf5_direct_io],
+ [AC_TRY_RUN([
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ int main(void)
+ {
+ int fid;
+ if((fid=open("tst_file", O_CREAT | O_TRUNC | O_DIRECT, 0755))<0)
+ exit(1);
+ close(fid);
+ remove("tst_file");
+ exit (0);
+ }], [hdf5_direct_io=yes], [hdf5_direct_io=no],)])
+
+ if test ${hdf5_direct_io} = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_DIRECT], [1],
+ [Define if the direct I/O virtual file driver should be compiled])
+ else
+ AC_MSG_RESULT([no])
+ fi
+else
+ AC_MSG_RESULT([suppressed])
+fi
+
+dnl ----------------------------------------------------------------------
dnl Decide whether the presence of user's exception handling functions is
dnl checked and data conversion exceptions are returned. This is mainly
dnl for the speed optimization of hard conversions. Soft conversions can