[gnome-online-accounts] configure: make kerberos truely optional
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] configure: make kerberos truely optional
- Date: Mon, 20 Aug 2012 23:57:57 +0000 (UTC)
commit 57ea516b3da58939de9acb1ea0ab391fb708ea85
Author: Ray Strode <rstrode redhat com>
Date: Mon Aug 20 19:56:39 2012 -0400
configure: make kerberos truely optional
This commit allows people to build gnome-online-accounts without
having kerberos libraries configured or installed.
Makefile.am | 2 +-
src/daemon/goadaemon.c | 9 +++++++++
src/goabackend/Makefile.am | 11 +++++++++--
src/goabackend/goaprovider.c | 5 ++++-
4 files changed, 23 insertions(+), 4 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 4329dc7..b4403e6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,6 +4,6 @@ NULL =
SUBDIRS = data src doc po
# introspection and docs doesn't work with src != build
-DISTCHECK_CONFIGURE_FLAGS=--disable-introspection --disable-gtk-doc --enable-kerberos
+DISTCHECK_CONFIGURE_FLAGS=--disable-introspection --disable-gtk-doc
-include $(top_srcdir)/git.mk
diff --git a/src/daemon/goadaemon.c b/src/daemon/goadaemon.c
index b4ca4bc..1224fd9 100644
--- a/src/daemon/goadaemon.c
+++ b/src/daemon/goadaemon.c
@@ -30,7 +30,9 @@
#include "goadaemon.h"
#include "goabackend/goabackend.h"
#include "goabackend/goautils.h"
+#ifdef GOA_KERBEROS_ENABLED
#include "goaidentity/goaidentityservice.h"
+#endif
struct _GoaDaemon
{
@@ -46,7 +48,10 @@ struct _GoaDaemon
GoaManager *manager;
+#ifdef GOA_KERBEROS_ENABLED
GoaIdentityService *identity_service;
+#endif
+
NotifyNotification *notification;
guint config_timeout_id;
@@ -128,7 +133,9 @@ goa_daemon_finalize (GObject *object)
g_object_unref (daemon->object_manager);
g_object_unref (daemon->connection);
+#ifdef GOA_KERBEROS_ENABLED
g_clear_object (&daemon->identity_service);
+#endif
G_OBJECT_CLASS (goa_daemon_parent_class)->finalize (object);
}
@@ -241,6 +248,7 @@ goa_daemon_init (GoaDaemon *daemon)
/* Export objects */
g_dbus_object_manager_server_set_connection (daemon->object_manager, daemon->connection);
+#ifdef GOA_KERBEROS_ENABLED
daemon->identity_service = goa_identity_service_new ();
if (!goa_identity_service_activate (daemon->identity_service,
&error))
@@ -249,6 +257,7 @@ goa_daemon_init (GoaDaemon *daemon)
g_error_free (error);
g_clear_object (&daemon->identity_service);
}
+#endif
}
static void
diff --git a/src/goabackend/Makefile.am b/src/goabackend/Makefile.am
index 34b9db9..91d2332 100644
--- a/src/goabackend/Makefile.am
+++ b/src/goabackend/Makefile.am
@@ -51,7 +51,6 @@ libgoa_backend_1_0_la_HEADERS = \
goaeditablelabel.h \
goaprovider.h \
goaexchangeprovider.h \
- goakerberosprovider.h \
goagoogleprovider.h \
goafacebookprovider.h \
goayahooprovider.h \
@@ -59,6 +58,10 @@ libgoa_backend_1_0_la_HEADERS = \
goawindowsliveprovider.h \
$(NULL)
+if BUILD_KERBEROS
+libgoa_backend_1_0_la_HEADERS += goakerberosprovider.h
+endif
+
libgoa_backend_1_0_la_SOURCES = \
goabackend.h \
goabackendtypes.h \
@@ -68,7 +71,6 @@ libgoa_backend_1_0_la_SOURCES = \
goaewsclient.h goaewsclient.c \
goaprovider.h goaprovider.c \
goaexchangeprovider.h goaexchangeprovider.c \
- goakerberosprovider.h goakerberosprovider.c \
goalogging.h goalogging.c \
goaoauthprovider.h goaoauthprovider.c \
goaoauth2provider.h goaoauth2provider.c \
@@ -83,6 +85,11 @@ libgoa_backend_1_0_la_SOURCES = \
$(top_srcdir)/src/goaidentity/org.gnome.Identity.c \
$(NULL)
+if BUILD_KERBEROS
+libgoa_backend_1_0_la_SOURCES += \
+ goakerberosprovider.h goakerberosprovider.c
+endif
+
libgoa_backend_1_0_la_CPPFLAGS = \
-DG_LOG_DOMAIN=\"GoaBackend\" \
$(NULL)
diff --git a/src/goabackend/goaprovider.c b/src/goabackend/goaprovider.c
index 95dac35..acfdd1a 100644
--- a/src/goabackend/goaprovider.c
+++ b/src/goabackend/goaprovider.c
@@ -28,13 +28,16 @@
#include "goalogging.h"
#include "goaprovider.h"
#include "goaexchangeprovider.h"
-#include "goakerberosprovider.h"
#include "goagoogleprovider.h"
#include "goafacebookprovider.h"
#include "goayahooprovider.h"
#include "goatwitterprovider.h"
#include "goawindowsliveprovider.h"
+#ifdef GOA_KERBEROS_ENABLED
+#include "goakerberosprovider.h"
+#endif
+
#include "goaeditablelabel.h"
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]