]> git.0d.be Git - empathy.git/commitdiff
Compile EmpathyThemeAdium only if webkit is installed
authorXavier Claessens <xclaesse@gmail.com>
Tue, 15 Jul 2008 18:56:45 +0000 (20:56 +0200)
committerXavier Claessens <xclaesse@gmail.com>
Thu, 11 Jun 2009 16:06:27 +0000 (18:06 +0200)
configure.ac
libempathy-gtk/Makefile.am
libempathy-gtk/empathy-theme-manager.c

index 9ff98e6e3055687427f1adaedd0aefb463a46dd7..187c803e16d64eea3cdb32d5b184437009f0fdc8 100644 (file)
@@ -168,6 +168,10 @@ if test "x$enable_webkit" != "xno"; then
    [
       WebKitGtk
    ], have_webkit="yes", have_webkit="no")
+
+   if test "x$have_webkit" = "xyes"; then
+      AC_DEFINE(HAVE_WEBKIT, 1, [Define if you have libwebkitgtk])
+   fi
 else
    have_webkit=no
 fi
index 6e089d6887619e75de2c9d878f5d98e51ce33994..bf364af99c05f72a77d6c6532f327e28c39dd0b9 100644 (file)
@@ -56,7 +56,6 @@ libempathy_gtk_handwritten_source =                   \
        empathy-smiley-manager.c                \
        empathy-spell.c                         \
        empathy-status-preset-dialog.c          \
-       empathy-theme-adium.c                   \
        empathy-theme-boxes.c                   \
        empathy-theme-irc.c                     \
        empathy-theme-manager.c                 \
@@ -116,7 +115,6 @@ libempathy_gtk_headers =                    \
        empathy-smiley-manager.h                \
        empathy-spell.h                         \
        empathy-status-preset-dialog.h          \
-       empathy-theme-adium.h                   \
        empathy-theme-boxes.h                   \
        empathy-theme-irc.h                     \
        empathy-theme-manager.h                 \
@@ -133,6 +131,11 @@ libempathy_gtk_include_HEADERS =           \
        $(libempathy_gtk_headers)               \
        empathy-gtk-enum-types.h
 
+if HAVE_WEBKIT
+libempathy_gtk_headers += empathy-theme-adium.h
+libempathy_gtk_la_SOURCES += empathy-theme-adium.c
+endif
+
 uidir = $(datadir)/empathy
 ui_DATA =                                      \
        empathy-contact-widget.ui               \
index fe4e241e6441ef783b2e8aac5fb5476a64c5ab21..eebbd3105de0a35329029f7f073b7f8f483272df 100644 (file)
 #include "empathy-chat-view.h"
 #include "empathy-conf.h"
 #include "empathy-chat-text-view.h"
-#include "empathy-theme-adium.h"
 #include "empathy-theme-boxes.h"
 #include "empathy-theme-irc.h"
 
+#ifdef HAVE_WEBKIT
+#include "empathy-theme-adium.h"
+#endif
+
 #define DEBUG_FLAG EMPATHY_DEBUG_OTHER
 #include <libempathy/empathy-debug.h>
 
@@ -62,7 +65,9 @@ static const gchar *themes[] = {
        "simple", N_("Simple"),
        "clean", N_("Clean"),
        "blue", N_("Blue"),
+#ifdef HAVE_WEBKIT
        "adium", N_("Adium"),
+#endif
        NULL
 };
 
@@ -323,9 +328,11 @@ empathy_theme_manager_create_view (EmpathyThemeManager *manager)
        if (strcmp (priv->name, "classic") == 0)  {
                return EMPATHY_CHAT_VIEW (theme_manager_create_irc_view (manager));
        }
+#ifdef HAVE_WEBKIT
        if (strcmp (priv->name, "adium") == 0)  {
                return EMPATHY_CHAT_VIEW (empathy_theme_adium_new ());
        }
+#endif
 
        theme = theme_manager_create_boxes_view (manager);
        theme_manager_update_boxes_theme (manager, theme);