don't use -Wextra unless --enable-super-warnings
This commit is contained in:
parent
d082572b17
commit
d291a9c7aa
1 changed files with 12 additions and 3 deletions
|
@ -11,6 +11,10 @@ AC_DEFUN([OB_DEBUG],
|
||||||
AC_HELP_STRING([--enable-strict-ansi],[Enable strict ANSI compliance build [[default=no]]]),
|
AC_HELP_STRING([--enable-strict-ansi],[Enable strict ANSI compliance build [[default=no]]]),
|
||||||
[STRICT=$enableval], [STRICT="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_ARG_ENABLE([debug],
|
||||||
AC_HELP_STRING([--enable-debug],[build a debug version [[default=no]]]),
|
AC_HELP_STRING([--enable-debug],[build a debug version [[default=no]]]),
|
||||||
[DEBUG=$enableval], [DEBUG="no"])
|
[DEBUG=$enableval], [DEBUG="no"])
|
||||||
|
@ -43,6 +47,9 @@ AC_DEFUN([OB_DEBUG],
|
||||||
if test "$STRICT" = "yes"; then
|
if test "$STRICT" = "yes"; then
|
||||||
MSG="$MSG with strict ANSI compliance"
|
MSG="$MSG with strict ANSI compliance"
|
||||||
fi
|
fi
|
||||||
|
if test "$SUPERWARN" = "yes"; then
|
||||||
|
MSG="$MSG with super warnings"
|
||||||
|
fi
|
||||||
AC_MSG_RESULT([$MSG])
|
AC_MSG_RESULT([$MSG])
|
||||||
|
|
||||||
test "$DEBUG" = "yes" && \
|
test "$DEBUG" = "yes" && \
|
||||||
|
@ -77,12 +84,14 @@ AC_DEFUN([OB_COMPILER_FLAGS],
|
||||||
FLAGS="$FLAGS -O0 -ggdb -fno-inline -Wwrite-strings"
|
FLAGS="$FLAGS -O0 -ggdb -fno-inline -Wwrite-strings"
|
||||||
FLAGS="$FLAGS -Wall -Wsign-compare -Waggregate-return"
|
FLAGS="$FLAGS -Wall -Wsign-compare -Waggregate-return"
|
||||||
FLAGS="$FLAGS -Wbad-function-cast -Wpointer-arith"
|
FLAGS="$FLAGS -Wbad-function-cast -Wpointer-arith"
|
||||||
FLAGS="$FLAGS -Wno-write-strings -Wextra"
|
FLAGS="$FLAGS -Wno-write-strings"
|
||||||
# glib can't handle this flag
|
|
||||||
# -Wcast-qual
|
|
||||||
# for Python.h
|
# for Python.h
|
||||||
#FLAGS="$FLAGS -Wno-long-long"
|
#FLAGS="$FLAGS -Wno-long-long"
|
||||||
fi
|
fi
|
||||||
|
if test "$SUPERWARN" = "yes"; then
|
||||||
|
# glib can't handle -Wcast-qual
|
||||||
|
FLAGS="$FLAGS -Wcast-qual -Wextra"
|
||||||
|
fi
|
||||||
if test "$STRICT" = "yes"; then
|
if test "$STRICT" = "yes"; then
|
||||||
FLAGS="$FLAGS -ansi -pedantic -D_XOPEN_SOURCE"
|
FLAGS="$FLAGS -ansi -pedantic -D_XOPEN_SOURCE"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue