diff options
author | Jacob Smith <jake.smith@hdfgroup.org> | 2020-04-08 21:51:38 (GMT) |
---|---|---|
committer | Jacob Smith <jake.smith@hdfgroup.org> | 2020-04-08 21:51:38 (GMT) |
commit | 664fc6af47e369152727ff66d68d8532feb0e210 (patch) | |
tree | fc065511b53c9f91cb69737e43787b222345fdcf /configure.ac | |
parent | 075e74e9b2e2ad761af44237aa78acc6ff3c3c24 (diff) | |
download | hdf5-664fc6af47e369152727ff66d68d8532feb0e210.zip hdf5-664fc6af47e369152727ff66d68d8532feb0e210.tar.gz hdf5-664fc6af47e369152727ff66d68d8532feb0e210.tar.bz2 |
Add enable-mirror-vfd flag to configure options.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index e6d7535..81e985e 100644 --- a/configure.ac +++ b/configure.ac @@ -2849,24 +2849,38 @@ AM_CONDITIONAL([DIRECT_VFD_CONDITIONAL], [test "X$DIRECT_VFD" = "Xyes"]) AC_SUBST([MIRROR_VFD]) ## Default is no Mirror VFD -MIRROR_VFD=yes +MIRROR_VFD=no -AC_CHECK_HEADERS([arpa/inet.h],, [unset MIRROR_VFD]) -AC_CHECK_HEADERS([netinet/in.h],, [unset MIRROR_VFD]) -AC_CHECK_HEADERS([netdb.h],, [unset MIRROR_VFD]) -AC_CHECK_HEADERS([sys/socket.h],, [unset MIRROR_VFD]) +AC_ARG_ENABLE([mirror-vfd], + [AS_HELP_STRING([--enable-mirror-vfd], + [Build the socket-based Mirror virtual file driver (VFD). + [default=no]])], + [MIRROR_VFD=$enableval], [MIRROR_VFD=no]) -AC_MSG_CHECKING([if the Mirror virtual file driver (VFD) can be built]) if test "X$MIRROR_VFD" = "Xyes"; then - AC_DEFINE([HAVE_MIRROR_VFD], [1], - [Define whether the Mirror virtual file driver (VFD) will be compiled]) - AC_MSG_RESULT([yes]) + + AC_CHECK_HEADERS([arpa/inet.h],, [unset MIRROR_VFD]) + AC_CHECK_HEADERS([netinet/in.h],, [unset MIRROR_VFD]) + AC_CHECK_HEADERS([netdb.h],, [unset MIRROR_VFD]) + AC_CHECK_HEADERS([sys/socket.h],, [unset MIRROR_VFD]) + AC_CHECK_FUNC([fork], [], [unset MIRROR_VFD]) + + AC_MSG_CHECKING([if the Mirror virtual file driver (VFD) can be built]) + if test "X$MIRROR_VFD" = "Xyes"; then + AC_DEFINE([HAVE_MIRROR_VFD], [1], + [Define whether the Mirror virtual file driver (VFD) will be compiled]) + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + MIRROR_VFD=no + AC_MSG_ERROR([The Mirror VFD cannot be built. + Missing one or more of: arpa/inet.h, netinet/in.h, + netdb.h, sys/socket.h, fork().]) + fi else + AC_MSG_CHECKING([if the Mirror virtual file driver (VFD) is enabled]) AC_MSG_RESULT([no]) MIRROR_VFD=no - AC_MSG_ERROR([The Mirror VFD cannot be built. - Missing any of: arpa/inet.h, netinet/in.h, netdb.h, - sys/socket.h.]) fi ## Mirror VFD files built only if able. |