summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2009-01-11 15:51:26 +0000
committerWill Thompson <will.thompson@collabora.co.uk>2009-01-11 15:51:26 +0000
commitde3a44d6b0f98232e26e0c726c8d92d5fe8d955b (patch)
tree7a729e84dbb2a152df52b8b0f58eaaa7ac7e542d /configure.ac
parent5938d6c0e973876812198a7c3662e4c21a6f1e8d (diff)
downloadtelepathy-salut-de3a44d6b0f98232e26e0c726c8d92d5fe8d955b.tar.gz
Import magic compiler warning macros from tp-glib
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac42
1 files changed, 18 insertions, 24 deletions
diff --git a/configure.ac b/configure.ac
index b6ac8a1d..d61cbdf5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,31 +39,25 @@ SALUT_ARG_VALGRIND
SALUT_ARG_COVERAGE
dnl decide error flags
-AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="")
-
-AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no)
-AS_COMPILER_FLAG(-Wno-missing-field-initializers,
- wno_missing_field_initializers=yes,
- wno_missing_field_initializers=no)
-AS_COMPILER_FLAG(-Wno-unused-parameter,
- wno_unused_parameter=yes,
- wno_unused_parameter=no)
-
ifelse(salut_nano_version, 0,
- [],
- [AS_COMPILER_FLAG(-Werror,ERROR_CFLAGS="$ERROR_CFLAGS -Werror",ERROR_CFLAGS="$ERROR_CFLAGS")
- ])
-AC_SUBST(ERROR_CFLAGS)
-
-AC_ARG_ENABLE(debug,
- AC_HELP_STRING([--disable-debug],[compile without debug code]),
- enable_debug=$enableval, enable_debug=yes )
-
-AS_COMPILER_FLAG(-Wdeclaration-after-statement, ERROR_CFLAGS="$ERROR_CFLAGS -Wdeclaration-after-statement")
-AS_COMPILER_FLAG(-Wshadow, ERROR_CFLAGS="$ERROR_CFLAGS -Wshadow")
-AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-prototypes")
-AS_COMPILER_FLAG(-Wmissing-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-prototypes")
-AS_COMPILER_FLAG(-Wmissing-declarations, ERROR_CFLAGS="$ERROR_CFLAGS -Wmissing-declarations")
+ [ official_release=yes ],
+ [ official_release=no ])
+
+TP_COMPILER_WARNINGS([ERROR_CFLAGS], [test "x$official_release" = xno],
+ [all \
+ extra \
+ declaration-after-statement \
+ shadow \
+ strict-prototypes \
+ missing-prototypes \
+ sign-compare \
+ nested-externs \
+ pointer-arith \
+ format-security \
+ init-self],
+ [missing-field-initializers \
+ unused-parameter])
+AC_SUBST([ERROR_CFLAGS])
ifelse(salut_nano_version, 0,
[ # Salut is version x.y.z - disable coding style checks by default