summaryrefslogtreecommitdiffstats
path: root/acinclude.m4
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-12-23 06:04:54 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-12-23 06:04:54 +0100
commit82e9ab56be4c34b744aacf2891e6e1ecb5ca9e5a (patch)
tree0357d97ca49a3a5bafb2a48ecca5777e6a18a5bf /acinclude.m4
parentf58470a0e841d917c1d33ce5393d7882bd92d7f3 (diff)
Enable verbose compiler warnings in maintainer mode
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m422
1 files changed, 17 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