Commit 4367113c authored by Debarshi Ray's avatar Debarshi Ray
Browse files
parent c6c19446
...@@ -167,6 +167,43 @@ if test "$enable_exchange" != "no"; then ...@@ -167,6 +167,43 @@ if test "$enable_exchange" != "no"; then
AC_DEFINE(GOA_EXCHANGE_ENABLED, 1, [Enable Microsoft Exchange data provider]) AC_DEFINE(GOA_EXCHANGE_ENABLED, 1, [Enable Microsoft Exchange data provider])
fi fi
# Fedora
AC_DEFINE(GOA_FEDORA_NAME, ["fedora"], [ProviderType and extension point name])
AC_ARG_ENABLE([fedora],
[AS_HELP_STRING([--enable-fedora], [Enable Fedora Account System support])],
[enable_fedora=$enableval],
[enable_fedora=auto])
AC_PATH_PROG([KRB5_CONFIG], krb5-config, none, $PATH:/usr/kerberos/bin)
if test "x$KRB5_CONFIG" != "xnone"; then
KRB5_LIBS="`${KRB5_CONFIG} --libs krb5`"
KRB5_CFLAGS="`${KRB5_CONFIG} --cflags krb5`"
PKG_CHECK_MODULES(GCR, gcr-3, [have_fedora=yes], [have_fedora=no])
else
KRB5_LIBS=""
KRB5_CFLAGS=""
have_fedora=no
fi
AC_SUBST(KRB5_CFLAGS)
AC_SUBST(KRB5_LIBS)
if test "$enable_fedora" != "no"; then
if test "$enable_fedora" == "yes" &&
test "$have_fedora" == "no" ; then
AC_MSG_ERROR([Fedora Account System support requested, but not available])
fi
enable_fedora=$have_fedora
if test "$enable_fedora" == "yes"; then
AC_DEFINE(GCR_API_SUBJECT_TO_CHANGE, 1, [Define to use the GCR API])
AC_DEFINE(GOA_FEDORA_ENABLED, 1, [Enable Fedora Account System provider])
fi
else
enable_fedora=no
fi
AM_CONDITIONAL(BUILD_FEDORA, [test x$enable_fedora != xno])
# Flickr # Flickr
AC_DEFINE(GOA_FLICKR_NAME, ["flickr"], [ProviderType and extension point name]) AC_DEFINE(GOA_FLICKR_NAME, ["flickr"], [ProviderType and extension point name])
AC_ARG_ENABLE([flickr], AC_ARG_ENABLE([flickr],
...@@ -538,6 +575,7 @@ echo " ...@@ -538,6 +575,7 @@ echo "
introspection: ${found_introspection} introspection: ${found_introspection}
template file: ${with_template_file} template file: ${with_template_file}
Fedora Account System provider: ${enable_fedora}
Flickr provider: ${enable_flickr} (OAuth 1.0, key:${with_flickr_consumer_key} secret:${with_flickr_consumer_secret}) Flickr provider: ${enable_flickr} (OAuth 1.0, key:${with_flickr_consumer_key} secret:${with_flickr_consumer_secret})
Foursquare provider: ${enable_foursquare} (id:${with_foursquare_client_id}) Foursquare provider: ${enable_foursquare} (id:${with_foursquare_client_id})
Google provider: ${enable_google} (OAuth 2.0, id:${with_google_client_id} secret:${with_google_client_secret}) Google provider: ${enable_google} (OAuth 2.0, id:${with_google_client_id} secret:${with_google_client_secret})
......
...@@ -133,6 +133,18 @@ config_h.set_quoted('GOA_FACEBOOK_CLIENT_ID', facebook_client_id) ...@@ -133,6 +133,18 @@ config_h.set_quoted('GOA_FACEBOOK_CLIENT_ID', facebook_client_id)
enable_facebook = get_option('facebook') enable_facebook = get_option('facebook')
config_h.set('GOA_FACEBOOK_ENABLED', enable_facebook) config_h.set('GOA_FACEBOOK_ENABLED', enable_facebook)
# Fedora
config_h.set_quoted('GOA_FEDORA_NAME', 'fedora')
enable_fedora = get_option('fedora')
if enable_fedora
gcr_dep = dependency('gcr-3')
krb5_dep = dependency('krb5')
config_h.set('GCR_API_SUBJECT_TO_CHANGE', true)
endif
config_h.set('GOA_FEDORA_ENABLED', enable_fedora)
# Flickr # Flickr
config_h.set_quoted('GOA_FLICKR_NAME', 'flickr') config_h.set_quoted('GOA_FLICKR_NAME', 'flickr')
...@@ -313,6 +325,7 @@ if enable_facebook ...@@ -313,6 +325,7 @@ if enable_facebook
output += ' (OAuth 2.0, id:@0@)'.format(facebook_client_id) output += ' (OAuth 2.0, id:@0@)'.format(facebook_client_id)
endif endif
output += '\n' output += '\n'
output += ' Fedora Account System provider: ' + enable_fedora.to_string() + '\n'
output += ' Flickr provider: ' + enable_flickr.to_string() output += ' Flickr provider: ' + enable_flickr.to_string()
if enable_flickr if enable_flickr
output += ' (OAuth 1.0, key:@0@)'.format(flickr_consumer_key) output += ' (OAuth 1.0, key:@0@)'.format(flickr_consumer_key)
......
...@@ -103,6 +103,11 @@ libgoa_backend_1_0_la_SOURCES = \ ...@@ -103,6 +103,11 @@ libgoa_backend_1_0_la_SOURCES = \
$(NULL) $(NULL)
if BUILD_KERBEROS if BUILD_KERBEROS
if BUILD_FEDORA
libgoa_backend_1_0_la_SOURCES += \
goafedoraprovider.h goafedoraprovider.c
endif
libgoa_backend_1_0_la_SOURCES += \ libgoa_backend_1_0_la_SOURCES += \
goakerberosprovider.h goakerberosprovider.c goakerberosprovider.h goakerberosprovider.c
endif endif
......
This diff is collapsed.
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright © 2019 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#if !defined (__GOA_BACKEND_INSIDE_GOA_BACKEND_H__) && !defined (GOA_BACKEND_COMPILATION)
#error "Only <goabackend/goabackend.h> can be included directly."
#endif
#ifndef __GOA_FEDORA_PROVIDER_H__
#define __GOA_FEDORA_PROVIDER_H__
#include <glib-object.h>
#include "goaprovider-priv.h"
G_BEGIN_DECLS
#define GOA_TYPE_FEDORA_PROVIDER (goa_fedora_provider_get_type ())
G_DECLARE_FINAL_TYPE (GoaFedoraProvider, goa_fedora_provider, GOA, FEDORA_PROVIDER, GoaProvider);
G_END_DECLS
#endif /* __GOA_FEDORA_PROVIDER_H__ */
...@@ -96,6 +96,10 @@ cflags = [ ...@@ -96,6 +96,10 @@ cflags = [
if enable_kerberos if enable_kerberos
sources += identity_dbus_sources + identity_manager_error_src + files('goakerberosprovider.c') sources += identity_dbus_sources + identity_manager_error_src + files('goakerberosprovider.c')
if enable_fedora
sources += files('goafedoraprovider.c')
endif
incs += goaidentity_inc incs += goaidentity_inc
deps += [gcr_dep] deps += [gcr_dep]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment