[liboobs] Enable AM silent rules and compiler warnings



commit 655c4c29c789054cdf56113a3080f4c8d9eeddff
Author: Milan Bouchet-Valat <nalimilan club fr>
Date:   Wed Dec 2 22:17:28 2009 +0100

    Enable AM silent rules and compiler warnings
    
    Better getting all warnings, in hope we'll fix them some day. Use silent rules for files that don't prompt one of them... Code for warnings is taken for PolicyKit-gnome's configure.ac.

 configure.in |   55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 54 insertions(+), 1 deletions(-)
---
diff --git a/configure.in b/configure.in
index 8621ab3..84a73ee 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,8 @@
 AC_PREREQ(2.52)
-AC_INIT(liboobs, 2.29.1)
+AC_INIT(liboobs, 2.29.1, http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-system-tools)
 AC_CONFIG_SRCDIR(oobs/oobs-session.c)
 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 
 AM_CONFIG_HEADER(config.h)
 
@@ -82,6 +83,58 @@ AC_TRY_CPP([
 AC_MSG_RESULT($have_rtnetlink)
 AM_CONDITIONAL(HAVE_RTNETLINK, test x$have_rtnetlink = xyes)
 
+#### gcc warning flags (taken from PolicyKit-gnome)
+
+if test "x$GCC" = "xyes"; then
+  changequote(,)dnl
+  case " $CFLAGS " in
+  *[\ \	]-Wall[\ \	]*) ;;
+  *) CFLAGS="$CFLAGS -Wall" ;;
+  esac
+
+  case " $CFLAGS " in
+  *[\ \	]-Wchar-subscripts[\ \	]*) ;;
+  *) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
+  esac
+
+  case " $CFLAGS " in
+  *[\ \	]-Wmissing-declarations[\ \	]*) ;;
+  *) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
+  esac
+
+  case " $CFLAGS " in
+  *[\ \	]-Wnested-externs[\ \	]*) ;;
+  *) CFLAGS="$CFLAGS -Wnested-externs" ;;
+  esac
+
+  case " $CFLAGS " in
+  *[\ \	]-Wpointer-arith[\ \	]*) ;;
+  *) CFLAGS="$CFLAGS -Wpointer-arith" ;;
+  esac
+
+  case " $CFLAGS " in
+  *[\ \	]-Wcast-align[\ \	]*) ;;
+  *) CFLAGS="$CFLAGS -Wcast-align" ;;
+  esac
+
+  case " $CFLAGS " in
+  *[\ \	]-Wsign-compare[\ \	]*) ;;
+  *) CFLAGS="$CFLAGS -Wsign-compare" ;;
+  esac
+
+  case " $CFLAGS " in
+  *[\ \	]-Wformat[\ \	]*) ;;
+  *) CFLAGS="$CFLAGS -Wformat" ;;
+  esac
+
+  case " $CFLAGS " in
+  *[\ \	]-Wformat-security[\ \	]*) ;;
+  *) CFLAGS="$CFLAGS -Wformat-security" ;;
+  esac
+
+  changequote([,])dnl
+fi
+
 AC_OUTPUT([
 Makefile
 doc/Makefile



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]