projects
/
mikachu
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d082572
)
don't use -Wextra unless --enable-super-warnings
author
Dana Jansens
<danakj@orodu.net>
Sat, 16 Oct 2010 21:13:27 +0000
(17:13 -0400)
committer
Dana Jansens
<danakj@orodu.net>
Mon, 24 Jan 2011 19:19:23 +0000
(14:19 -0500)
m4/openbox.m4
patch
|
blob
|
history
diff --git
a/m4/openbox.m4
b/m4/openbox.m4
index
862c689
..
0c37a58
100644
(file)
--- 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_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"])
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 "$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" && \
AC_MSG_RESULT([$MSG])
test "$DEBUG" = "yes" && \
@@
-77,12
+84,14
@@
AC_DEFUN([OB_COMPILER_FLAGS],
FLAGS="$FLAGS -O0 -ggdb -fno-inline -Wwrite-strings"
FLAGS="$FLAGS -Wall -Wsign-compare -Waggregate-return"
FLAGS="$FLAGS -Wbad-function-cast -Wpointer-arith"
FLAGS="$FLAGS -O0 -ggdb -fno-inline -Wwrite-strings"
FLAGS="$FLAGS -Wall -Wsign-compare -Waggregate-return"
FLAGS="$FLAGS -Wbad-function-cast -Wpointer-arith"
- FLAGS="$FLAGS -Wno-write-strings -Wextra"
- # glib can't handle this flag
- # -Wcast-qual
+ FLAGS="$FLAGS -Wno-write-strings"
# for Python.h
#FLAGS="$FLAGS -Wno-long-long"
fi
# 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
if test "$STRICT" = "yes"; then
FLAGS="$FLAGS -ansi -pedantic -D_XOPEN_SOURCE"
fi