X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=m4%2Fopenbox.m4;h=0c37a58423ff5524805acd7ade7c83ccd877d37d;hb=HEAD;hp=5a95e8465bcf0f296148ad1c9e7cafe5f5ac8d41;hpb=965ed8907a5dd81d5ffbc93b67a672fa78833854;p=chaz%2Fopenbox diff --git a/m4/openbox.m4 b/m4/openbox.m4 index 5a95e846..0c37a584 100644 --- a/m4/openbox.m4 +++ b/m4/openbox.m4 @@ -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