diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-12-23 06:06:09 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-12-23 06:06:09 +0100 |
commit | da9561f7d0b8eee43a26321dcf50527615d9655d (patch) | |
tree | 2b761664b8bdaae6a816d58e74c8c25a67a5b9dc | |
parent | e524dd47092369054fed1990ffb317f8b0b59a86 (diff) | |
download | connman-da9561f7d0b8eee43a26321dcf50527615d9655d.tar.gz connman-da9561f7d0b8eee43a26321dcf50527615d9655d.tar.bz2 connman-da9561f7d0b8eee43a26321dcf50527615d9655d.zip |
Enable verbose compiler warnings in maintainer mode
-rw-r--r-- | acinclude.m4 | 15 | ||||
-rw-r--r-- | configure.ac | 6 |
2 files changed, 17 insertions, 4 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 9c51ddfc..84086fde 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -10,6 +10,21 @@ AC_DEFUN([AC_PROG_CC_PIE], [ ]) ]) +AC_DEFUN([COMPILER_FLAGS], [ + if (test "${CFLAGS}" = ""); then + CFLAGS="-Wall -O2 -D_FORTIFY_SOURCE=2" + fi + if (test "$USE_MAINTAINER_MODE" = "yes"); then + CFLAGS+=" -Werror -Wextra" + CFLAGS+=" -Wno-unused-parameter" + CFLAGS+=" -Wno-missing-field-initializers" + CFLAGS+=" -Wdeclaration-after-statement" + CFLAGS+=" -Wmissing-declarations" + CFLAGS+=" -Wredundant-decls" + CFLAGS+=" -Wcast-align" + fi +]) + AC_DEFUN([GTK_DOC_CHECK], [ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first diff --git a/configure.ac b/configure.ac index 15acdbcb..42789a75 100644 --- a/configure.ac +++ b/configure.ac @@ -8,9 +8,7 @@ AM_MAINTAINER_MODE AC_PREFIX_DEFAULT(/usr/local) -if (test "${CFLAGS}" = ""); then - CFLAGS="-Wall -O2 -D_FORTIFY_SOURCE=2" -fi +COMPILER_FLAGS AC_LANG_C @@ -32,7 +30,7 @@ AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable compiling with debugging information]), [ if (test "${enableval}" = "yes" && test "${ac_cv_prog_cc_g}" = "yes"); then - CFLAGS="$CFLAGS -g -O0 -Werror" + CFLAGS="$CFLAGS -g -O0" fi ]) |