gnome-session r4822 - in branches/dbus_based: . gnome-session



Author: mccann
Date: Mon Jul 21 20:28:33 2008
New Revision: 4822
URL: http://svn.gnome.org/viewvc/gnome-session?rev=4822&view=rev

Log:
2008-07-21  William Jon McCann  <jmccann redhat com>

	* configure.in: Add our own warning flags

	* gnome-session/util.c: Add missing includes



Modified:
   branches/dbus_based/ChangeLog
   branches/dbus_based/configure.in
   branches/dbus_based/gnome-session/util.c

Modified: branches/dbus_based/configure.in
==============================================================================
--- branches/dbus_based/configure.in	(original)
+++ branches/dbus_based/configure.in	Mon Jul 21 20:28:33 2008
@@ -21,7 +21,6 @@
 dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
 AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")
 
-GNOME_COMPILE_WARNINGS([maximum])
 GNOME_MAINTAINER_MODE_DEFINES
 
 AC_ARG_WITH(at-spi-registryd-directory,
@@ -240,6 +239,48 @@
 dnl End of IPv6 checks
 dnl ==============================================================================
 
+# Turn on the additional warnings last, so -Werror doesn't affect other tests.
+
+AC_ARG_ENABLE(more-warnings,
+	[AC_HELP_STRING([--enable-more-warnings],
+	[Maximum compiler warnings])],
+	set_more_warnings="$enableval",[
+        	if test -d $srcdir/.svn; then
+        		set_more_warnings=yes
+              	else
+                  	set_more_warnings=no
+              	fi
+        ])
+AC_MSG_CHECKING(for more warnings)
+if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
+        AC_MSG_RESULT(yes)
+        CFLAGS="\
+        -Wall \
+        -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
+        -Wnested-externs -Wpointer-arith \
+        -Wcast-align -Wsign-compare \
+        $CFLAGS"
+
+        for option in -Wno-strict-aliasing -Wno-sign-compare; do
+                SAVE_CFLAGS="$CFLAGS"
+                CFLAGS="$CFLAGS $option"
+                AC_MSG_CHECKING([whether gcc understands $option])
+                AC_TRY_COMPILE([], [],
+                        has_option=yes,
+                        has_option=no,)
+                if test $has_option = no; then
+                        CFLAGS="$SAVE_CFLAGS"
+                fi
+                AC_MSG_RESULT($has_option)
+                unset has_option
+                unset SAVE_CFLAGS
+        done
+        unset option
+else
+        AC_MSG_RESULT(no)
+fi
+
+
 # Don't use AC_PROG_AWK since we need the full pathname.
 AC_PATH_PROGS(AWK, mawk gawk nawk awk, )
 AC_PATH_PROGS(PERL, perl5 perl)

Modified: branches/dbus_based/gnome-session/util.c
==============================================================================
--- branches/dbus_based/gnome-session/util.c	(original)
+++ branches/dbus_based/gnome-session/util.c	Mon Jul 21 20:28:33 2008
@@ -19,6 +19,9 @@
 
 #include <stdlib.h>
 #include <ctype.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 
 #include <glib.h>
 #include <glib/gi18n.h>



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