diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2017-05-15 19:35:01 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2017-05-15 22:02:33 -0400 |
commit | 1e8147fc3aa278e5772836b08136034343809f19 (patch) | |
tree | a55c4be2fc3273326ff21e8480573e0ab0096252 /configure.ac | |
parent | e8498bbfcc9141c0287745488a5a08b1ff33290a (diff) | |
download | lighttpd-git-1e8147fc3aa278e5772836b08136034343809f19.tar.gz |
[build] -Werror if --enable-extra-warnings=error
enable -Werror if ./configure --enable-extra-warnings=error
x-ref:
"Fix warnings"
https://github.com/lighttpd/lighttpd1.4/pull/81
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index e818cb5f..2e755f9f 100644 --- a/configure.ac +++ b/configure.ac @@ -971,14 +971,19 @@ fi AC_ARG_ENABLE(extra-warnings, AC_HELP_STRING([--enable-extra-warnings],[enable extra warnings (gcc specific)]), [case "${enableval}" in + error) extrawarnings=error ;; yes) extrawarnings=true ;; no) extrawarnings=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-extra-warnings) ;; esac],[extrawarnings=false]) -if test x$extrawarnings = xtrue; then +if test x$extrawarnings = xtrue || test x$extrawarnings = xerror; then TRY_CFLAGS([-g -O2 -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Wsign-compare -Wnested-externs -Wpointer-arith -D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security]) TRY_LDFLAGS([-Wl,--as-needed]) + if test x$extrawarnings = xerror; then + AS_VAR_APPEND([CFLAGS], [" -Werror"]) + AS_VAR_APPEND([LDFLAGS], [" -Wl,--fatal-warnings"]) + fi fi dnl build version-id |