From a59ad51ce28e3cb707af24bea0e00fef7cdd4736 Mon Sep 17 00:00:00 2001 From: crs Date: Wed, 12 May 2004 19:12:28 +0000 Subject: [PATCH] Added configure option to enable debug builds. If not enabled then asserts are disabled. --- configure.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configure.in b/configure.in index 8d19d2d9..4a30b12e 100644 --- a/configure.in +++ b/configure.in @@ -64,6 +64,15 @@ AC_LANG_CPLUSPLUS dnl our files end in .cpp not .C so tests should also end in .cpp ac_ext=cpp +dnl enable debugging or disable asserts +AC_ARG_ENABLE([debug], + AC_HELP_STRING([--enable-debug], [enable debugging])) +if test "x$enable_debug" != xno; then + CXXFLAGS="$CXXFLAGS -g" +else + CXXFLAGS="$CXXFLAGS -DNDEBUG" +fi + dnl check compiler ACX_CHECK_CXX