[file-roller] activate compiler warnings
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller] activate compiler warnings
- Date: Tue, 19 Jun 2012 18:41:03 +0000 (UTC)
commit 1ceb60e36079e1337aed053b62d327bc2e89fafc
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Jun 18 20:47:28 2012 +0200
activate compiler warnings
configure.ac | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b9e56df..c662093 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,6 +60,26 @@ fi
dnl ===========================================================================
+WARN_CFLAGS="-Wall -Wcast-align -Wtype-limits -Wclobbered -Wempty-body -Wignored-qualifiers"
+
+for option in $WARN_CFLAGS; do
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $option"
+ AC_MSG_CHECKING([whether gcc understands $option])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[has_option=yes],[has_option=no])
+ if test x$has_option = xyes; then
+ WARNINGS="$WARNINGS $option"
+ fi
+ AC_MSG_RESULT($has_option)
+ CFLAGS="$SAVE_CFLAGS"
+ unset has_option
+ unset SAVE_CFLAGS
+done
+unset option
+CFLAGS="$CFLAGS $WARNINGS"
+
+dnl ===========================================================================
+
AC_ARG_ENABLE([run_in_place],
AS_HELP_STRING([--enable-run-in-place],
[load ui data and extensions from source tree]),,
@@ -186,7 +206,7 @@ dnl ******************************
AC_CONFIG_FILES([Makefile
file-roller.spec
data/Makefile
- data/file-roller.desktop.in
+ data/file-roller.desktop.in
data/icons/Makefile
data/icons/16x16/Makefile
data/icons/16x16/actions/Makefile
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]