From f032fd41b9abcc9776921ac693c570fd156ebf10 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Fri, 25 May 2018 18:09:02 +0300 Subject: configure: emit a notice if --enable-gdbmtool-debug is used --- configure.ac | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index eff0083..48ad675 100644 --- a/configure.ac +++ b/configure.ac @@ -58,16 +58,7 @@ AC_ARG_ENABLE([gdbmtool-debug], [--enable-gdbmtool-debug], [instrument gdbmtool for additional debugging]), [want_gdbmtool_debug=$enableval], - [want_gdbmtool_debug=no]) - -AC_SUBST(YFLAGS_DEBUG) -AC_SUBST(LFLAGS_DEBUG) -if test "$want_gdbmtool_debug" = yes; then - YFLAGS_DEBUG=-t - LFLAGS_DEBUG=-d -fi - -AM_CONDITIONAL([COND_GDBMTOOL_DEBUG], [test "$want_gdbmtool_debug" = yes]) + [want_gdbmtool_debug=default]) dnl Check for programs AC_PROG_CC @@ -186,6 +177,21 @@ else fi AM_CONDITIONAL([GDBM_COND_DEBUG_ENABLE], [test "$status_debug" = "yes"]) +AC_SUBST(YFLAGS_DEBUG) +AC_SUBST(LFLAGS_DEBUG) +if test "$want_gdbmtool_debug" = yes; then + if ! $LEX --version 2>/dev/null | grep -q flex; then + AC_MSG_ERROR([--enable-gdbmtool-debug requires flex, which is not available]) + fi + if ! $YACC --version 2>/dev/null | grep -q bison; then + AC_MSG_ERROR([--enable-gdbmtool-debug requires bison, which is not available]) + fi + YFLAGS_DEBUG=-t + LFLAGS_DEBUG=-d +fi + +AM_CONDITIONAL([COND_GDBMTOOL_DEBUG], [test "$want_gdbmtool_debug" = yes]) + # Initialize the test suite. AC_CONFIG_TESTDIR(tests) AC_CONFIG_FILES([tests/Makefile tests/atlocal po/Makefile.in]) @@ -204,11 +210,22 @@ Debugging support ............................. $status_debug ******************************************************************* EOF +if test "$want_gdbmtool_debug" != default; then + cat <