aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorgray@gnu.org <Sergey Poznyakoff>2021-06-25 17:30:55 +0000
committerSergey Poznyakoff <gray@gnu.org>2021-07-17 22:56:25 +0300
commitbdeab7e9b711126ac04b53a058e850a84bff9463 (patch)
tree7987179ee0529bee24b7ba09d633b216063283e5 /configure.ac
parent1967040e5a8900e0f71bfb33daac9ef363ffbe5d (diff)
downloadgdbm-bdeab7e9b711126ac04b53a058e850a84bff9463.tar.gz
gdbm-bdeab7e9b711126ac04b53a058e850a84bff9463.tar.bz2
Crash-tolerance based on the patch from Terence Kelly
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac29
1 files changed, 28 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 8e4e1de..23302c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,6 +16,7 @@
m4_define([_GDBM_VERSION_MAJOR], 1)
m4_define([_GDBM_VERSION_MINOR], 20)
+m4_define([_GDBM_VERSION_PATCH], 90)
AC_INIT([gdbm],
_GDBM_VERSION_MAJOR._GDBM_VERSION_MINOR[]m4_ifdef([_GDBM_VERSION_PATCH],._GDBM_VERSION_PATCH),
@@ -160,6 +161,30 @@ fi
AM_CONDITIONAL([GDBM_COND_READLINE], [test "$status_readline" = "yes"])
+# CoW crash tolerance support
+AC_ARG_ENABLE([crash-tolerance],
+ AC_HELP_STRING(
+ [--enable-crash-tolerance],
+ [Enable crash tolerance, based on clone/copy-on-write (needs support for FICLONE)]),
+ [status_ficlone=$enableval],
+ [status_ficlone=probe])
+
+if test $status_ficlone = probe; then
+ AC_CHECK_HEADER([linux/fs.h],
+ [AC_MSG_CHECKING([for FICLONE ioctl support])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+ #include <linux/fs.h>
+ #include <sys/ioctl.h>],
+ [ioctl(0, FICLONE, 1);])],
+ [status_ficlone=yes],
+ [status_ficlone=no])
+ AC_MSG_RESULT($status_ficlone)],
+ [status_ficlone=no])
+fi
+if test $status_ficlone = yes; then
+ AC_DEFINE([GDBM_FAILURE_ATOMIC], 1, [Define if support for atomic failures is enabled])
+fi
+
# Additional debugging
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug],
@@ -205,6 +230,7 @@ Compatibility library ......................... $status_compat
Memory mapped I/O ............................. $mapped_io
GNU Readline .................................. $status_readline
Debugging support ............................. $status_debug
+Reflink crash tolerance ....................... $status_ficlone
*******************************************************************
EOF
@@ -223,7 +249,8 @@ fi
mapped_io=$mapped_io
status_readline=$status_readline
status_debug=$status_debug
-want_gdbmtool_debug=$want_gdbmtool_debug])
+want_gdbmtool_debug=$want_gdbmtool_debug
+status_ficlone=$status_ficlone])
AC_CONFIG_FILES([Makefile
src/Makefile

Return to:

Send suggestions and report system problems to the System administrator.