summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2013-01-04 11:47:03 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-01-04 12:15:20 +0000
commitdc6a5ddcc684018fd822271b1ee20e5b49d80a24 (patch)
tree716dc279cf71e62b91a9534b43702160bcb15628 /configure.ac
parentb2094fece93d4cd9c32a8504f9c34bfc70660b3a (diff)
downloadtelepathy-salut-dc6a5ddcc684018fd822271b1ee20e5b49d80a24.tar.gz
Update coding style check stuff from telepathy-glib
This removes --enable-coding-style-checks in favour of the more general --enable-fatal-warnings, which also controls use of -Werror (although for -Werror it can be overridden with --enable-Werror).
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac45
1 files changed, 23 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac
index f07ab526..047b2705 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,12 +54,29 @@ AC_MSG_RESULT($platform)
AM_CONDITIONAL([OS_WINDOWS], [test "$platform" = "win32"])
-dnl decide error flags
ifelse(salut_nano_version, 0,
- [ official_release=yes ],
- [ official_release=no ])
+[ # version x.y.z - "official release",
+ # disable extra checks by default
+ official_release=yes
+ AC_ARG_ENABLE([fatal-warnings],
+ [AC_HELP_STRING([--enable-fatal-warnings],
+ [make various warnings fatal])],
+ [],
+ [enable_fatal_warnings=no])
+],
+[ # version x.y.z.1 - development snapshot,
+ # enable extra checks by default
+ official_release=no
+ AC_ARG_ENABLE([fatal-warnings],
+ [AC_HELP_STRING([--disable-fatal-warnings],
+ [make various warnings non-fatal])],
+ [],
+ [enable_fatal_warnings=yes])
+])
+
+AC_SUBST([enable_fatal_warnings])
-TP_COMPILER_WARNINGS([ERROR_CFLAGS], [test "x$official_release" = xno],
+TP_COMPILER_WARNINGS([ERROR_CFLAGS], [test "x$enable_fatal_warnings" = xyes],
[all \
extra \
declaration-after-statement \
@@ -75,26 +92,10 @@ TP_COMPILER_WARNINGS([ERROR_CFLAGS], [test "x$official_release" = xno],
unused-parameter])
AC_SUBST([ERROR_CFLAGS])
-ifelse(salut_nano_version, 0,
- [ # Salut is version x.y.z - disable coding style checks by default
-AC_ARG_ENABLE(coding-style-checks,
- AC_HELP_STRING([--enable-coding-style-checks],
- [check coding style using grep]),
- [ENABLE_CODING_STYLE_CHECKS=$enableval], [ENABLE_CODING_STYLE_CHECKS=no] )
- ],
- [ # Salut is version x.y.z.1 - enable coding style checks by default
-AC_ARG_ENABLE(coding-style-checks,
- AC_HELP_STRING([--disable-coding-style-checks],
- [do not check coding style using grep]),
- [ENABLE_CODING_STYLE_CHECKS=$enableval], [ENABLE_CODING_STYLE_CHECKS=yes])
- ])
-
if test x$enable_debug = xyes; then
AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
fi
-AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
-
dnl Check for code generation tools
XSLTPROC=
AC_CHECK_PROGS([XSLTPROC], [xsltproc])
@@ -333,13 +334,13 @@ fi
prev_ac_configure_args=$ac_configure_args
ac_configure_args="$ac_configure_args --with-installed-headers=${wocky_install_headers_dir} --enable-shared-suffix=${PACKAGE}-${VERSION} --libdir=${pluginexeclibdir}"
-if test "x$ENABLE_CODING_STYLE_CHECKS" = xyes ; then
+if test "x$enable_fatal_warnings" = xyes ; then
ac_configure_args="$ac_configure_args --enable-coding-style-checks"
else
ac_configure_args="$ac_configure_args --disable-coding-style-checks"
fi
-if test "x$tp_werror" = xyes && test "x$official_release" = xno; then
+if test "x$tp_werror" = xyes && test "x$enable_fatal_warnings" = xyes; then
ac_configure_args="$ac_configure_args --enable-Werror"
else
ac_configure_args="$ac_configure_args --disable-Werror"