diff options
| author | Marcel Holtmann <marcel@holtmann.org> | 2008-12-23 06:04:54 +0100 | 
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2008-12-23 06:04:54 +0100 | 
| commit | 82e9ab56be4c34b744aacf2891e6e1ecb5ca9e5a (patch) | |
| tree | 0357d97ca49a3a5bafb2a48ecca5777e6a18a5bf | |
| parent | f58470a0e841d917c1d33ce5393d7882bd92d7f3 (diff) | |
Enable verbose compiler warnings in maintainer mode
| -rw-r--r-- | acinclude.m4 | 22 | ||||
| -rw-r--r-- | configure.ac | 2 | 
2 files changed, 19 insertions, 5 deletions
| diff --git a/acinclude.m4 b/acinclude.m4 index 3a997c34..372833e8 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -10,6 +10,22 @@ 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-sign-compare" +		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_ARG_WITH([html-dir],  		AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, @@ -46,10 +62,6 @@ AC_DEFUN([AC_FUNC_PPOLL], [  AC_DEFUN([AC_INIT_BLUEZ], [  	AC_PREFIX_DEFAULT(/usr/local) -	if (test "${CFLAGS}" = ""); then -		CFLAGS="-Wall -O2" -	fi -  	if (test "${prefix}" = "NONE"); then  		dnl no prefix and no sysconfdir, so default to /etc  		if (test "$sysconfdir" = '${prefix}/etc'); then @@ -306,7 +318,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [  	fi  	if (test "${debug_enable}" = "yes" && test "${ac_cv_prog_cc_g}" = "yes"); then -		CFLAGS="$CFLAGS -g -O0 -Werror" +		CFLAGS="$CFLAGS -g -O0"  	fi  	if (test "${usb_enable}" = "yes" && test "${usb_found}" = "yes"); then diff --git a/configure.ac b/configure.ac index df6c0d3c..5e1c05b1 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,8 @@ AM_MAINTAINER_MODE  AC_INIT_BLUEZ +COMPILER_FLAGS +  AC_LANG_C  AC_PROG_CC | 
