From: Mukund Sivaraman Date: Thu, 18 Oct 2012 13:32:04 +0000 (+0530) Subject: [2236] Add a --enable-debug configure flag X-Git-Tag: trac2487_base~18^2~33^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4887037cd08e567596339dbb3d65557b8e25560d;p=thirdparty%2Fkea.git [2236] Add a --enable-debug configure flag --- diff --git a/configure.ac b/configure.ac index 09de67fd2b..fcaa8f319e 100644 --- a/configure.ac +++ b/configure.ac @@ -12,6 +12,18 @@ AC_CONFIG_MACRO_DIR([m4macros]) # Checks for programs. AC_PROG_CXX +# Enable debugging facilities? +AC_ARG_ENABLE([debug], + AS_HELP_STRING([--enable-debug], + [enable debugging (default is no)]), + [case "${enableval}" in + yes) debug_enabled=true ;; + no) debug_enabled=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;; + esac],[debug_enabled=false]) +AM_CONDITIONAL([DEBUG_ENABLED], [test x$debug = xtrue]) +AM_COND_IF([DEBUG_ENABLED], [AC_DEFINE([ENABLE_DEBUG], [1], [Enable debugging facilities?])]) + # Libtool configuration #