[evolution-data-server/uoa: 1/3] configure.ac: Add --enable-uoa option.



commit 5c76186ad6770b7e632b1e00f064ef336cb51456
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Oct 7 09:06:52 2012 -0400

    configure.ac: Add --enable-uoa option.
    
    Enables support for Ubuntu's own "Online Accounts" framework (using
    libaccounts-glib and libsignon-glib).
    
    Defines UOA_CFLAGS, UOA_LIBS, and a HAVE_UOA conditional.

 configure.ac |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0e992f1..edb5ddc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,6 +53,8 @@ m4_define([libical_minimum_version], [0.43])
 dnl Optional Packages
 m4_define([goa_minimum_version], [3.2])
 m4_define([gweather_minimum_version], [3.5.0])
+m4_define([libaccounts_glib_minimum_version], [1.4])
+m4_define([libsignon_glib_minimum_version], [1.6])	dnl XXX Just a Guess
 
 AC_SUBST([BASE_VERSION],[base_version])
 AC_SUBST([API_VERSION],[api_version])
@@ -394,6 +396,40 @@ if `$PKG_CONFIG --atleast-version=3.5 goa-1.0`; then
 	AC_DEFINE(HAVE_GOA_PASSWORD_BASED,1,[Have GoaPasswordBased in goa-1.0])
 fi
 
+dnl ********************************
+dnl Check for Ubuntu Online Accounts
+dnl ********************************
+AC_ARG_ENABLE([uoa],
+	[AS_HELP_STRING([--enable-uoa],
+	[enable Ubuntu Online Accounts support (default=yes)])],
+	[enable_uoa=$enableval], [enable_uoa=yes])
+AC_MSG_CHECKING([if Ubuntu Online Accounts support is enabled])
+AC_MSG_RESULT([$enable_uoa])
+if test "x$enable_uoa" = xyes; then
+	PKG_CHECK_MODULES([LIBACCOUNTS_GLIB],
+		[libaccounts-glib >= libaccounts_glib_minimum_version],,
+		[AC_MSG_ERROR([
+
+	libaccounts-glib not found (or version < libaccounts_glib_minimum_version)
+
+	If you want to disable Ubuntu Online Accounts support,
+	please append --disable-uoa to configure.
+	])])
+
+	PKG_CHECK_MODULES([LIBSIGNON_GLIB],
+		[libsignon-glib >= libsignon_glib_minimum_version],,
+		[AC_MSG_ERROR([
+
+	libsignon-glib not found (or version < libsignon_glib_minimum_version)
+
+	If you want to disable Ubuntu Online Accounts support,
+	please append --disable-uoa to configure.
+	])])
+
+	AC_DEFINE(HAVE_UOA, 1, [Have libaccounts-glib])
+fi
+AM_CONDITIONAL(HAVE_UOA, [test x$enable_uoa = xyes])
+
 dnl ***********************************
 dnl Check for GNOME Keyring.
 dnl ***********************************
@@ -1657,6 +1693,7 @@ echo "
 	Introspection:		$enable_introspection
 	Vala bindings:		$enable_vala_bindings
 	GNOME Online Accounts	$enable_goa
+	Ubuntu Online Accounts	$enable_uoa
 	Code coverage (gcov):	$enable_code_coverage
 	Strict building:	$enable_strict
 "



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]