summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-01-30 10:38:59 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-01-30 10:38:59 (GMT)
commit8cb70b47cb8dbe8641da44ffc0e6c1a1e51b3618 (patch)
tree9be2492b0090b10276de1c190fa62f3ebd17f000 /configure.ac
parent21a38c4e6793817a539931e27b97867d9bb50d1f (diff)
downloadhdf5-8cb70b47cb8dbe8641da44ffc0e6c1a1e51b3618.zip
hdf5-8cb70b47cb8dbe8641da44ffc0e6c1a1e51b3618.tar.gz
hdf5-8cb70b47cb8dbe8641da44ffc0e6c1a1e51b3618.tar.bz2
[svn-r26085] Improved the direct VFD configure checks.
- Results of O_DIRECT and posix_memalign() checks are now output so users can more easily diagnose problems. - Configure now fails if --enable-direct-vfd was requested but either O_DIRECT or posix_memalign() are not present. Part of HDFFV-7566 Tested on: jam (configure only)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 14 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 1a8f204..3aed36c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2521,7 +2521,15 @@ fi
## Check if Direct I/O driver is enabled by --enable-direct-vfd
##
-AC_MSG_CHECKING([for direct virtual file driver (VFD) support])
+## Check these regardless. If the checks are moved inside the main
+## direct VFD block, the output is nested.
+
+AC_CACHE_VAL([hdf5_cv_direct_io],
+ AC_CHECK_DECL([O_DIRECT], [hdf5_cv_direct_io=yes], [hdf5_cv_direct_io=no], [[#include <fcntl.h>]]))
+AC_CACHE_VAL([hdf5_cv_posix_memalign],
+ AC_CHECK_FUNC([posix_memalign], [hdf5_cv_posix_memalign=yes], [hdf5_cv_posix_memalign=no]))
+
+AC_MSG_CHECKING([if the direct I/O virtual file driver (VFD) is enabled])
AC_ARG_ENABLE([direct-vfd],
[AS_HELP_STRING([--enable-direct-vfd],
@@ -2532,11 +2540,6 @@ AC_ARG_ENABLE([direct-vfd],
[DIRECT_VFD=$enableval], [DIRECT_VFD=no])
if test "X$DIRECT_VFD" = "Xyes"; then
- AC_CACHE_VAL([hdf5_cv_direct_io],
- AC_CHECK_DECL([O_DIRECT], [hdf5_cv_direct_io=yes], [hdf5_cv_direct_io=no], [[#include <fcntl.h>]]))
- AC_CACHE_VAL([hdf5_cv_posix_memalign],
- AC_TRY_LINK(, [posix_memalign()], [hdf5_cv_posix_memalign=yes], [hdf5_cv_posix_memalign=no]))
-
if test ${hdf5_cv_direct_io} = "yes" && test ${hdf5_cv_posix_memalign} = "yes" ; then
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_DIRECT], [1],
@@ -2544,9 +2547,13 @@ if test "X$DIRECT_VFD" = "Xyes"; then
else
AC_MSG_RESULT([no])
DIRECT_VFD=no
+ AC_MSG_ERROR([The direct VFD was requested but cannot be built. This is either
+ due to O_DIRECT not being found in fcntl.h or a lack of
+ posix_memalign() on your system. Please re-configure without
+ specifying --enable-direct-vfd.])
fi
else
- AC_MSG_RESULT([suppressed])
+ AC_MSG_RESULT([no])
fi
AM_CONDITIONAL([DIRECT_VFD_CONDITIONAL], [test "X$DIRECT_VFD" = "Xyes"])