aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-07-20 14:40:08 +0300
committerSergey Poznyakoff <gray@gnu.org>2016-07-20 14:50:21 +0300
commitde7834e96602695db1cb6efd6238398b84d2ca60 (patch)
tree2fc49853a76d68a8db11aab24017843102fd22a8 /configure.ac
parentfbb0df69ca498a4fb4689a6d12c2f05e2cfaf175 (diff)
downloadgdbm-de7834e96602695db1cb6efd6238398b84d2ca60.tar.gz
gdbm-de7834e96602695db1cb6efd6238398b84d2ca60.tar.bz2
Introduce debug hooks.
* configure.ac: New option --enable-debug Print feature summary at the end of the run. * src/debug.c: New file. * src/Makefile.am [GDBM_COND_DEBUG_ENABLE]: Build debug.o Define GDBM_DEBUG_ENABLE. * src/gdbmdefs.h [GDBM_DEBUG_ENABLE] (_gdbm_debug_hook_install) (_gdbm_debug_hook_remove,_gdbm_debug_hook_check) (_gdbm_debug_hook_val): New protos. (GDBM_DEBUG_HOOK, GDBM_DEBUG_OVERRIDE) (GDBM_DEBUG_ALLOC): New defines. * src/gdbm.h.in (GDBM_RCVR_FORCE): New flag. * src/recover.c (gdbm_recover): Check database before attempting recovery, unless GDBM_RCVR_FORCE flag is set. * doc/gdbm.texi: Document GDBM_RCVR_FORCE * src/gdbmreorg.c (gdbm_reorganize): Use GDBM_RCVR_FORCE. * src/gdbmtool.c (main): Always allocate file_name. * src/bucket.c: Put GDBM_DEBUG_OVERRIDE and GDBM_DEBUG_ALLOC in critical places. * src/falloc.c: Likewise. * src/findkey.c: Likewise. * src/gdbmopen.c: Likewise. * src/gdbmstore.c: Likewise. * src/update.c: Likewise. * tests/Makefile.am [GDBM_COND_DEBUG_ENABLE]: Define GDBM_DEBUG_ENABLE. * tests/gtload.c: New options -hook, -recover, -verbose, -backup, -max-failures, -max-failed-keys, and -max-failed-buckets. Attempt recovery after errors.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac31
1 files changed, 31 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 1424ea0..da5b938 100644
--- a/configure.ac
+++ b/configure.ac
@@ -173,15 +173,46 @@ fi
173 173
174AM_CONDITIONAL([GDBM_COND_READLINE], [test "$status_readline" = "yes"]) 174AM_CONDITIONAL([GDBM_COND_READLINE], [test "$status_readline" = "yes"])
175 175
176# Additional debugging
177AC_ARG_ENABLE([debug],
178 AC_HELP_STRING([--enable-debug],
179 [provide additional debugging functions]),
180 [status_debug=$withval],
181 [status_debug=no])
182
183AM_CONDITIONAL([GDBM_COND_DEBUG_ENABLE], [test "$status_debug" = "yes"])
184
176# Initialize the test suite. 185# Initialize the test suite.
177AC_CONFIG_TESTDIR(tests) 186AC_CONFIG_TESTDIR(tests)
178AC_CONFIG_FILES([tests/Makefile tests/atlocal po/Makefile.in]) 187AC_CONFIG_FILES([tests/Makefile tests/atlocal po/Makefile.in])
179AM_MISSING_PROG([AUTOM4TE], [autom4te]) 188AM_MISSING_PROG([AUTOM4TE], [autom4te])
180 189
190AC_CONFIG_COMMANDS([status],[
191cat <<EOF
192
193*******************************************************************
194GDBM settings summary:
195
196Compatibility library ......................... $status_compat
197Compatibility export tool ..................... $status_export
198Memory mapped I/O ............................. $mapped_io
199GNU Readline .................................. $status_readline
200Debugging functions ........................... $status_debug
201*******************************************************************
202
203EOF
204],
205[status_compat=$want_compat
206status_export=$want_export
207mapped_io=$mapped_io
208status_readline=$status_readline
209status_debug=$status_debug])
210
181AC_CONFIG_FILES([Makefile 211AC_CONFIG_FILES([Makefile
182 src/Makefile 212 src/Makefile
183 src/gdbm.h 213 src/gdbm.h
184 doc/Makefile 214 doc/Makefile
185 compat/Makefile 215 compat/Makefile
186 export/Makefile]) 216 export/Makefile])
217
187AC_OUTPUT 218AC_OUTPUT

Return to:

Send suggestions and report system problems to the System administrator.