summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2020-11-17 13:47:52 (GMT)
committerGitHub <noreply@github.com>2020-11-17 13:47:52 (GMT)
commit5d0be1b196570ac2c08ffe0b61ac6a45b6ab7f3f (patch)
treedbe8a76bcb211babe9900647eb1f515d8623ad9b /configure.ac
parentec48fb8dfdb4f2f59f22a5efb6b950aafcac449d (diff)
downloadhdf5-5d0be1b196570ac2c08ffe0b61ac6a45b6ab7f3f.zip
hdf5-5d0be1b196570ac2c08ffe0b61ac6a45b6ab7f3f.tar.gz
hdf5-5d0be1b196570ac2c08ffe0b61ac6a45b6ab7f3f.tar.bz2
Manual sync with develop (#95)
Brings all features from develop. Note that RELEASE.txt has not been updated (will be done in a future PR).
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac51
1 files changed, 51 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ea3250e..9880223 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1211,6 +1211,7 @@ AC_CHECK_HEADERS([stddef.h setjmp.h features.h])
AC_CHECK_HEADERS([dirent.h])
AC_CHECK_HEADERS([stdint.h], [C9x=yes])
AC_CHECK_HEADERS([stdbool.h])
+AC_CHECK_HEADERS([netdb.h netinet/in.h arpa/inet.h])
## Darwin
AC_SUBST([H5_IS_DARWIN])
@@ -2379,6 +2380,56 @@ case "X-$OPTIMIZATION" in
esac
## ----------------------------------------------------------------------
+## Check if file locking should be used
+##
+AC_MSG_CHECKING([enable file locking])
+AC_ARG_ENABLE([file-locking],
+ [AS_HELP_STRING([--enable-file-locking=(yes|no|best-effort)],
+ [Sets the default for whether or not to use file
+ locking when opening files. Can be overridden
+ with the HDF5_USE_FILE_LOCKING environment variable
+ and the H5Pset_file_locking() API call.
+ best-effort attempts to use file locking but does
+ not fail when file locks have been disabled on
+ the file system (useful with Lustre).
+ [default=best-effort]
+ ])],
+ [DESIRED_FILE_LOCKING=$enableval])
+
+## Set defaults
+if test "X-$DESIRED_FILE_LOCKING" = X- ; then
+ DESIRED_FILE_LOCKING=best-effort
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([DESIRED_FILE_LOCKING])
+AC_SUBST([USE_FILE_LOCKING])
+AC_SUBST([IGNORE_DISABLED_FILE_LOCKS])
+
+case "X-$DESIRED_FILE_LOCKING" in
+ X-best-effort)
+ AC_MSG_RESULT([best-effort])
+ AC_DEFINE([USE_FILE_LOCKING], [1],
+ [Define if the library will use file locking])
+ AC_DEFINE([IGNORE_DISABLED_FILE_LOCKS], [1],
+ [Define if the library will ignore file locks when disabled])
+ ;;
+ X-yes)
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([USE_FILE_LOCKING], [1],
+ [Define if the library will use file locking])
+ ;;
+ X-no)
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ AC_MSG_ERROR([Unrecognized value: $USE_FILE_LOCKING])
+ ;;
+esac
+
+
+## ----------------------------------------------------------------------
## Enable/disable internal package-level debugging output
##
AC_MSG_CHECKING([for internal debug output])