GNOME_COMPILE_WARNINGS() not doing good.



I'm not sure if anybody else has noticed, but most GNOME packages are
_not_ using -Wall currently, which is certainly not a good thing.

The problem is that GNOME_COMPILE_WARNINGS now sets WARN_CFLAGS, but
that variable is pretty much universally ignored.

The appended patch (for gnome-core) is an example of fixing this;
I'm not sure if "don't touch CFLAGS if it has been set" behavior
is desired, but not doing that can produce -Wall -Wall and/or
force people to configure with --disable-compile-warnings.

Anyways, it would be very much good if someone would take on the 
task of fixing up all the packages so they compile with -Wall 
by default.
 
Regards,
                                        Owen

Index: configure.in
===================================================================
RCS file: /cvs/gnome/gnome-core/configure.in,v
retrieving revision 1.352
diff -u -p -r1.352 configure.in
--- configure.in	2002/01/16 11:33:01	1.352
+++ configure.in	2002/01/17 16:39:32
@@ -1,7 +1,11 @@
 AC_PREREQ(2.13)
 
+# Save this value here, since CFLAGS will be set _always_ further down
+cflags_set=${CFLAGS+set}
+
 AC_INIT(panel)
 AM_CONFIG_HEADER(config.h)
+
 AM_INIT_AUTOMAKE(gnome-core, 1.5.4)
 
 AM_MAINTAINER_MODE
@@ -28,6 +32,9 @@ dnl ====================================
 
 GNOME_PLATFORM_GNOME_2(yes)
 GNOME_COMPILE_WARNINGS(maximum)
+if test x$cflags_set != xset ; then
+  CFLAGS="$CFLAGS $WARN_CFLAGS"
+fi
 
 dnl If you add a version number here, you *must* add an AC_SUBST line for
 dnl it too, or it will never make it into the spec file!



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