From 4647fa22033ba0a9817ef36bbbac361522604033 Mon Sep 17 00:00:00 2001 From: yanmorin <yanmorin> Date: Thu, 24 Aug 2006 00:00:32 +0000 Subject: [PATCH] Adding --with-debug option --- configure.ac | 1 + m4/sfl-internal.m4 | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 m4/sfl-internal.m4 diff --git a/configure.ac b/configure.ac index 36aa34a26b..bed642acee 100644 --- a/configure.ac +++ b/configure.ac @@ -73,6 +73,7 @@ AC_SUBST(PKGADD_VENDOR) dnl Check for programs AC_PROG_CC +SFL_CXX_WITH_DEBUG AC_PROG_CXX AC_PROG_CPP AC_PROG_INSTALL diff --git a/m4/sfl-internal.m4 b/m4/sfl-internal.m4 new file mode 100644 index 0000000000..d307a31e16 --- /dev/null +++ b/m4/sfl-internal.m4 @@ -0,0 +1,15 @@ +AC_DEFUN([SFL_CXX_WITH_DEBUG],[ + + AC_ARG_WITH(debug, + AS_HELP_STRING( + [--with-debug], + [Set 'full' to enable debugging information @<:@default=no@:>@] + ), + [with_debug=${withval}], + [with_debug=no] + ) + if test "x$with_debug" = "xfull" -o "x$with_debug" = "xyes"; then + CXXFLAGS="$CXXFLAGS -g" + CPPFLAGS="$CPPFLAGS -DDEBUG" + fi +]) -- GitLab