From 051db253cf0306f361fbcc48ba79e9d83efb9778 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Wed, 16 Jul 2008 21:11:07 +0100 Subject: [PATCH] Deprecate xcowsay daemon --- configure.ac | 7 +++---- src/display_cow.c | 6 +++--- src/xcowsayd.c | 6 +++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 286da34..a4a3a4d 100644 --- a/configure.ac +++ b/configure.ac @@ -26,12 +26,11 @@ AC_CHECK_FUNCS([strtol]) modules="gtk+-2.0 gdk-pixbuf-2.0" xcowsayd_modules="$modules dbus-glib-1 gthread-2.0" AC_ARG_ENABLE(dbus, - [AS_HELP_STRING([--disable-dbus], [Do not build DBus daemon.])], - [if test "$enableval" != "no" ; then + [AS_HELP_STRING([--enable-dbus], [Build the DBus daemon.])], + [if test "$enableval" = "yes" ; then modules="$xcowsayd_modules" fi - CFLAGS="$CFLAGS -DWITHOUT_DBUS"], - [modules="$xcowsayd_modules"]) + CFLAGS="$CFLAGS -DWITH_DBUS"]) PKG_CHECK_MODULES(XCOWSAY, $modules) diff --git a/src/display_cow.c b/src/display_cow.c index 4f786f1..74c4892 100644 --- a/src/display_cow.c +++ b/src/display_cow.c @@ -23,7 +23,7 @@ #include #include -#ifndef WITHOUT_DBUS +#ifdef WITH_DBUS #include #define XCOWSAY_PATH "/uk/me/doof/Cowsay" #define XCOWSAY_NAMESPACE "uk.me.doof.Cowsay" @@ -257,7 +257,7 @@ void display_cow(bool debug, const char *text, bool run_main, cowmode_t mode) xcowsay.bubble_pixbuf = NULL; } -#ifdef WITHOUT_DBUS +#ifndef WITH_DBUS bool try_dbus(bool debug, const char *text, cowmode_t mode) { @@ -297,7 +297,7 @@ bool try_dbus(bool debug, const char *text, cowmode_t mode) return true; } -#endif /* #ifdef WITHOUT_DBUS */ +#endif /* #ifndef WITH_DBUS */ void display_cow_or_invoke_daemon(bool debug, const char *text, cowmode_t mode) { diff --git a/src/xcowsayd.c b/src/xcowsayd.c index 3cca9be..c82c964 100644 --- a/src/xcowsayd.c +++ b/src/xcowsayd.c @@ -23,7 +23,7 @@ #include "xcowsayd.h" -#ifndef WITHOUT_DBUS +#ifdef WITH_DBUS #include @@ -250,7 +250,7 @@ void run_cowsay_daemon(bool debug, int argc, char **argv) exit(EXIT_SUCCESS); } -#else /* #ifndef WITHOUT_DBUS */ +#else /* #ifdef WITH_DBUS */ void run_cowsay_daemon(bool debug, int argc, char **argv) { @@ -259,4 +259,4 @@ void run_cowsay_daemon(bool debug, int argc, char **argv) exit(EXIT_FAILURE); } -#endif /* #ifndef WITHOUT_DBUS */ +#endif /* #ifdef WITH_DBUS */ -- 2.39.2