summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorWilliam Jon McCann <mccann@jhu.edu>2007-10-04 15:14:48 +0000
committerWilliam Jon McCann <mccann@src.gnome.org>2007-10-04 15:14:48 +0000
commitdae89542cc21cd03bb0debe651b3e30b84289478 (patch)
tree693c854e5ae8a8f84921a373ba7682323f4f2bcc /acinclude.m4
parentf0de3c35d5b967f4117497ba3f5b9d9362b31dd1 (diff)
downloadgdm-dae89542cc21cd03bb0debe651b3e30b84289478.tar.gz
Fix up the handling of dependencies. Make the daemon only depend on x11,
2007-10-04 William Jon McCann <mccann@jhu.edu> * acinclude.m4: * common/Makefile.am: * configure.ac: * daemon/Makefile.am: * daemon/gdm-factory-slave.c: (run_greeter), (idle_connect_to_display): * daemon/gdm-product-slave.c: (setup_server), (idle_connect_to_display): * daemon/gdm-simple-slave.c: (run_greeter), (idle_connect_to_display): * daemon/gdm-slave.c: (gdm_slave_set_busy_cursor), (set_local_auth), (gdm_slave_connect_to_x11_display): * daemon/gdm-slave.h: * gui/Makefile.am: * gui/modules/.cvsignore: * gui/modules/AccessDwellMouseEvents.in: * gui/modules/AccessKeyMouseEvents.in: * gui/modules/Makefile.am: * gui/modules/dwellmouselistener.c: * gui/modules/keymouselistener.c: * gui/simple-chooser/Makefile.am: * gui/simple-greeter/Makefile.am: * gui/simple-greeter/libnotificationarea/Makefile.am: * libgreeter/Makefile.am: Fix up the handling of dependencies. Make the daemon only depend on x11, glib, gobject, dbus. Move some things from the slaves to the base class. Remove the unused modules for now. svn path=/branches/mccann-gobject/; revision=5338
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m487
1 files changed, 87 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 970dbec2..3b3bbe3f 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -286,3 +286,90 @@ fi
AC_MSG_RESULT($result)
])
+
+dnl EXTRA_COMPILE_WARNINGS
+dnl Turn on many useful compiler warnings
+dnl For now, only works on GCC
+AC_DEFUN([EXTRA_COMPILE_WARNINGS],[
+ dnl ******************************
+ dnl More compiler warnings
+ dnl ******************************
+
+ AC_ARG_ENABLE(compile-warnings,
+ AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
+ [Turn on compiler warnings]),,
+ [enable_compile_warnings="m4_default([$1],[yes])"])
+
+ warnCFLAGS=
+ if test "x$GCC" != xyes; then
+ enable_compile_warnings=no
+ fi
+
+ warning_flags=
+ realsave_CFLAGS="$CFLAGS"
+
+ case "$enable_compile_warnings" in
+ no)
+ warning_flags=
+ ;;
+ minimum)
+ warning_flags="-Wall"
+ ;;
+ yes)
+ warning_flags="-Wall -Wmissing-prototypes"
+ ;;
+ maximum|error)
+ warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
+ CFLAGS="$warning_flags $CFLAGS"
+ for option in -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,)
+ CFLAGS="$SAVE_CFLAGS"
+ AC_MSG_RESULT($has_option)
+ if test $has_option = yes; then
+ warning_flags="$warning_flags $option"
+ fi
+ unset has_option
+ unset SAVE_CFLAGS
+ done
+ unset option
+ if test "$enable_compile_warnings" = "error" ; then
+ warning_flags="$warning_flags -Werror"
+ fi
+ ;;
+ *)
+ AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
+ ;;
+ esac
+ CFLAGS="$realsave_CFLAGS"
+ AC_MSG_CHECKING(what warning flags to pass to the C compiler)
+ AC_MSG_RESULT($warning_flags)
+
+ AC_ARG_ENABLE(iso-c,
+ AC_HELP_STRING([--enable-iso-c],
+ [Try to warn if code is not ISO C ]),,
+ [enable_iso_c=no])
+
+ AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
+ complCFLAGS=
+ if test "x$enable_iso_c" != "xno"; then
+ if test "x$GCC" = "xyes"; then
+ case " $CFLAGS " in
+ *[\ \ ]-ansi[\ \ ]*) ;;
+ *) complCFLAGS="$complCFLAGS -ansi" ;;
+ esac
+ case " $CFLAGS " in
+ *[\ \ ]-pedantic[\ \ ]*) ;;
+ *) complCFLAGS="$complCFLAGS -pedantic" ;;
+ esac
+ fi
+ fi
+ AC_MSG_RESULT($complCFLAGS)
+
+ WARN_CFLAGS="$warning_flags $complCFLAGS"
+ AC_SUBST(WARN_CFLAGS)
+])