[grilo-plugins] build: add option --enable-goa



commit 3929f808c6c51a136b1fcb0a7626975b27a1ce26
Author: Marek Chalupa <mchalupa redhat com>
Date:   Mon Apr 29 15:04:30 2013 +0200

    build: add option --enable-goa
    
    When this option is on, macro GOA_ENABLED is defined to 1 if GOA is
    present in the system. Otherwise error message is raised.
    
    Default: auto
    
    https://bugzilla.gnome.org/show_bug.cgi?id=697565

 configure.ac |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d2c95a7..f847c5f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -133,6 +133,8 @@ PKG_CHECK_MODULES(GTHREAD, gthread-2.0, HAVE_GTHREAD=yes, HAVE_GTHREAD=no)
 
 PKG_CHECK_MODULES(OAUTH, oauth, HAVE_OAUTH=yes, HAVE_OAUTH=no)
 
+PKG_CHECK_MODULES(GOA, [goa-1.0 >= 3.7.1], HAVE_GOA=yes, HAVE_GOA=no)
+
 PKG_CHECK_MODULES(TOTEM_PL_PARSER, totem-plparser >= 3.4.1, HAVE_TOTEM_PL_PARSER=yes, 
HAVE_TOTEM_PL_PARSER=no)
 
 PKG_CHECK_MODULES([JSON], [json-glib-1.0], HAVE_JSON_GLIB=yes, HAVE_JSON_GLIB=no)
@@ -156,6 +158,34 @@ PKG_CHECK_MODULES([TRACKER_SPARQL], [ ${trackerpkg} ],
 
 AM_PATH_LIBGCRYPT(,HAVE_GCRYPT=yes, HAVE_GCRYPT=no)
 
+
+# ----------------------------------------------------------
+# CHECK GOA
+# ----------------------------------------------------------
+AC_ARG_ENABLE(goa,
+        AC_HELP_STRING([--enable-goa],
+                [enable Gnome Online Accounts support (default: auto)]),
+        [
+                case "$enableval" in
+                     yes)
+                        if test "x$HAVE_GOA" = "xno"; then
+                           AC_MSG_ERROR([goa >= 3.7.1 not found, install it or use --disable-goa])
+                        fi
+                        ;;
+                esac
+        ],
+        [
+                if test "x$HAVE_GOA" = "xyes"; then
+                   enable_goa=yes
+                else
+                   enable_goa=no
+                fi
+        ])
+
+if test "x$enable_goa" = "xyes"; then
+        AC_DEFINE(GOA_ENABLED, 1, [Let plugins use goa])
+fi
+
 # ----------------------------------------------------------
 # GDATA VERSION
 # ----------------------------------------------------------


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