configure: add --enable-warnings=distcheck
This disables -Werror everywhere but "Linux". The heuristic is rather crude.
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ SUBDIRS = src scripts man conf
|
|||||||
EXTRA_DIST = autogen.sh ocb-license.html README.md COPYING.iOS
|
EXTRA_DIST = autogen.sh ocb-license.html README.md COPYING.iOS
|
||||||
BUILT_SOURCES = version.h
|
BUILT_SOURCES = version.h
|
||||||
CLANG_SCAN_BUILD = scan-build
|
CLANG_SCAN_BUILD = scan-build
|
||||||
AM_DISTCHECK_CONFIGURE_FLAGS = --enable-compile-warnings=error --enable-examples
|
AM_DISTCHECK_CONFIGURE_FLAGS = --enable-compile-warnings=distcheck --enable-examples
|
||||||
|
|
||||||
.PHONY: VERSION
|
.PHONY: VERSION
|
||||||
|
|
||||||
|
|||||||
+9
-1
@@ -23,7 +23,7 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
|||||||
WARNING_CXXFLAGS=""
|
WARNING_CXXFLAGS=""
|
||||||
PICKY_CXXFLAGS=""
|
PICKY_CXXFLAGS=""
|
||||||
AC_ARG_ENABLE([compile-warnings],
|
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])],
|
[Turn on compiler warnings])],
|
||||||
[case "$enableval" in
|
[case "$enableval" in
|
||||||
no)
|
no)
|
||||||
@@ -39,6 +39,14 @@ AC_ARG_ENABLE([compile-warnings],
|
|||||||
WARNING_CXXFLAGS="-Wall -Werror"
|
WARNING_CXXFLAGS="-Wall -Werror"
|
||||||
PICKY_CXXFLAGS="-Wextra -pedantic -Wno-long-long -Weffc++ -Wmissing-declarations"
|
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])
|
AC_MSG_ERROR([Unknown argument '$enableval' to --enable-compile-warnings])
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user