configure: add --enable-warnings=distcheck
This disables -Werror everywhere but "Linux". The heuristic is rather crude.
This commit is contained in:
+9
-1
@@ -23,7 +23,7 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||
WARNING_CXXFLAGS=""
|
||||
PICKY_CXXFLAGS=""
|
||||
AC_ARG_ENABLE([compile-warnings],
|
||||
[AS_HELP_STRING([--enable-compile-warnings@<:@=no/yes/maximum/error@:>@],
|
||||
[AS_HELP_STRING([--enable-compile-warnings@<:@=no/yes/maximum/error/distcheck@:>@],
|
||||
[Turn on compiler warnings])],
|
||||
[case "$enableval" in
|
||||
no)
|
||||
@@ -39,6 +39,14 @@ AC_ARG_ENABLE([compile-warnings],
|
||||
WARNING_CXXFLAGS="-Wall -Werror"
|
||||
PICKY_CXXFLAGS="-Wextra -pedantic -Wno-long-long -Weffc++ -Wmissing-declarations"
|
||||
;;
|
||||
distcheck)
|
||||
if test "$(uname -s)" = Linux; then
|
||||
WARNING_CXXFLAGS="-Wall -Werror"
|
||||
else
|
||||
WARNING_CXXFLAGS="-Wall"
|
||||
fi
|
||||
PICKY_CXXFLAGS="-Wextra -pedantic -Wno-long-long -Weffc++ -Wmissing-declarations"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown argument '$enableval' to --enable-compile-warnings])
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user