Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernie Innocenti <bernie@codewiz.org>2010-05-11 22:44:12 (GMT)
committer Bernie Innocenti <bernie@codewiz.org>2010-05-20 06:58:30 (GMT)
commit30da2bfe0e86c25462e92cf4e2284265848fa756 (patch)
tree135c385bf8565c13bf837c151ce07c98ff7e0ad3
parentac029997d30ed0e76b319d0ccadb058e21f4d054 (diff)
sugar-artwork: stricter compiler flags
WARN_CFLAGS was already used in gtk/engine/Makefile.am, but not initialized by configure. For backwards compatibility, GCC's by default is very permissive. In my case, it was silently miscompiling code which was calling a non-existent GTK function. For this particular case, the proposed WARN_CFLAGS should make the build fail early in this case. I'm not proposing -Werror because it frequetly results in broken builds for trivial reasons when distros update the toolchain. Signed-off-by: Bernie Innocenti <bernie@codewiz.org> Reviewed-by: James Cameron <quozl@laptop.org> Tested-by: James Cameron <quozl@laptop.org>
-rw-r--r--configure.ac6
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index f32dd32..c9f5c26 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,10 @@ AM_DISABLE_STATIC
PKG_PROG_PKG_CONFIG([0.19])
+dnl These catch plenty of subtle bugs and miscompilation problems
+WARN_CFLAGS="-Wall -W -Werror=implicit-function-declaration"
+AC_SUBST(WARN_CFLAGS)
+
AC_PROG_CC
AC_HEADER_STDC
AC_PROG_LIBTOOL
@@ -21,7 +25,7 @@ if test -z "$ICON_SLICER"; then
fi
PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.0,,
- AC_MSG_ERROR([GTK+-2.0 is required to compile redhat-artwork]))
+ AC_MSG_ERROR([GTK+-2.0 is required to compile sugar-artwork]))
GDK_PIXBUF2_CFLAGS=`$PKG_CONFIG --cflags gdk-pixbuf-2.0`
GDK_PIXBUF2_LIBS=`$PKG_CONFIG --libs gdk-pixbuf-2.0`