Add some comments in MoveResizeTo code
[mikachu/openbox.git] / m4 / openbox.m4
index 5a95e84..0c37a58 100644 (file)
@@ -11,6 +11,10 @@ AC_DEFUN([OB_DEBUG],
     AC_HELP_STRING([--enable-strict-ansi],[Enable strict ANSI compliance build [[default=no]]]),
     [STRICT=$enableval], [STRICT="no"])
 
+    AC_ARG_ENABLE([super-warnings],
+    AC_HELP_STRING([--enable-super-warnings],[Enable extra compiler warnings [[default=no]]]),
+    [SUPERWARN=$enableval], [SUPERWARN="no"])
+
     AC_ARG_ENABLE([debug],
     AC_HELP_STRING([--enable-debug],[build a debug version [[default=no]]]),
     [DEBUG=$enableval], [DEBUG="no"])
@@ -43,6 +47,9 @@ AC_DEFUN([OB_DEBUG],
     if test "$STRICT" = "yes"; then
        MSG="$MSG with strict ANSI compliance"
     fi
+    if test "$SUPERWARN" = "yes"; then
+       MSG="$MSG with super warnings"
+    fi
     AC_MSG_RESULT([$MSG])
     
     test "$DEBUG" = "yes" && \
@@ -76,10 +83,15 @@ AC_DEFUN([OB_COMPILER_FLAGS],
        if test "$DEBUG" = "yes"; then
            FLAGS="$FLAGS -O0 -ggdb -fno-inline -Wwrite-strings"
            FLAGS="$FLAGS -Wall -Wsign-compare -Waggregate-return"
-           FLAGS="$FLAGS -Wcast-qual -Wbad-function-cast -Wpointer-arith"
+           FLAGS="$FLAGS -Wbad-function-cast -Wpointer-arith"
+           FLAGS="$FLAGS -Wno-write-strings"
             # for Python.h
            #FLAGS="$FLAGS -Wno-long-long"
        fi
+       if test "$SUPERWARN" = "yes"; then
+           # glib can't handle -Wcast-qual
+           FLAGS="$FLAGS -Wcast-qual -Wextra"
+       fi
        if test "$STRICT" = "yes"; then
            FLAGS="$FLAGS -ansi -pedantic -D_XOPEN_SOURCE"
        fi