]> Dogcows Code - chaz/openbox/blobdiff - m4/openbox.m4
define DEBUG, NDEBUG, and G_DISABLE_ASSERTS
[chaz/openbox] / m4 / openbox.m4
index 319ed7b4906044ab7873fadd07e6062651dac60f..db592e91e6b472eb701fb3f6f4d30992d8c2f862 100644 (file)
@@ -25,9 +25,6 @@ AC_DEFUN([OB_DEBUG],
 
     TEST=""
     test "${PACKAGE_VERSION%*alpha*}" != "$PACKAGE_VERSION" && TEST="yes"
-    test "$TEST" = "yes" && DEBUG="yes"
-
-    TEST=""
     test "${PACKAGE_VERSION%*beta*}" != "$PACKAGE_VERSION" && TEST="yes"
     test "$TEST" = "yes" && DEBUG="yes"
 
@@ -64,12 +61,18 @@ AC_DEFUN([OB_COMPILER_FLAGS],
 
     FLAGS=""
 
+    if test "$DEBUG" = "yes"; then
+        FLAGS="-DDEBUG"
+    else
+        FLAGS="-DNDEBUG -DG_DISABLE_ASSERT"
+    fi
+
     # Check what compiler we are using
     AC_MSG_CHECKING([for GNU CC])
     if test "$GCC" = "yes"; then
        AC_MSG_RESULT([yes])
        if test "$DEBUG" = "yes"; then
-           FLAGS="-g -fno-inline"
+           FLAGS="$FLAGS -g -fno-inline"
            FLAGS="$FLAGS -Wall -Wsign-compare -Waggregate-return"
            FLAGS="$FLAGS -Wcast-qual -Wbad-function-cast -Wpointer-arith"
             # for Python.h
This page took 0.026201 seconds and 4 git commands to generate.