[gnome-online-accounts] Fix up API key configuration
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] Fix up API key configuration
- Date: Tue, 14 Jun 2011 16:23:34 +0000 (UTC)
commit db89fc8d2aa2376393e3c60ad38f0bfd2e26b5db
Author: David Zeuthen <davidz redhat com>
Date: Tue Jun 14 12:22:16 2011 -0400
Fix up API key configuration
This makes
./configure --enable-facebook --with-facebook-client-id=XXX --with-facebook-client-secret=XXX --enable-twitter --with-twitter-consumer-key=XXX --with-twitter-consumer-secret=XXX --enable-yahoo --with-yahoo-consumer-key=XXX --with-yahoo-consumer-secret=XXX
work as expected.
Signed-off-by: David Zeuthen <davidz redhat com>
configure.ac | 68 +++++++++++++++++++++++++++++++++++----------------------
1 files changed, 42 insertions(+), 26 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a2bc451..c65e18d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -69,81 +69,97 @@ GOBJECT_INTROSPECTION_CHECK([0.6.2])
#
# Google
-with_google_consumer_key=anonymous
-AC_ARG_WITH([google-consumer-key=KEY],
+AC_ARG_ENABLE([google], [AS_HELP_STRING([--enable-google], [Enable Google provider])], [], [enable_google=yes])
+AC_ARG_WITH(google-consumer-key,
[AS_HELP_STRING([--with-google-consumer-key],
- [Google OAuth 1.0 consumer key (anonymous)])],
+ [Google OAuth 1.0 consumer key])],
[],
[])
-AC_DEFINE_UNQUOTED(GOA_GOOGLE_CONSUMER_KEY, ["$with_google_consumer_key"], [Google OAuth 1.0 consumer key])
-with_google_consumer_secret=anonymous
-AC_ARG_WITH([google-consumer-secret=SECRET],
+AC_ARG_WITH(google-consumer-secret,
[AS_HELP_STRING([--with-google-consumer-secret],
- [Google OAuth 1.0 consumer secret (anonymous)])],
+ [Google OAuth 1.0 consumer secret])],
[],
[])
+if test "$with_google_consumer_key" = ""; then
+ with_google_consumer_key=anonymous
+fi
+if test "$with_google_consumer_secret" = ""; then
+ with_google_consumer_secret=anonymous
+fi
+AC_DEFINE_UNQUOTED(GOA_GOOGLE_CONSUMER_KEY, ["$with_google_consumer_key"], [Google OAuth 1.0 consumer key])
AC_DEFINE_UNQUOTED(GOA_GOOGLE_CONSUMER_SECRET, ["$with_google_consumer_secret"], [Google OAuth 1.0 consumer secret])
-AC_ARG_ENABLE([google], [AS_HELP_STRING([--enable-google], [Enable Google provider])], [], [enable_google=yes])
if test "$enable_google" != "no"; then
AC_DEFINE(GOA_GOOGLE_ENABLED, 1, [Enable Google data provider])
fi
# Twitter
-with_twitter_consumer_key=not_set
-AC_ARG_WITH([twitter-consumer-key=KEY],
+AC_ARG_ENABLE([twitter], [AS_HELP_STRING([--enable-twitter], [Enable Twitter provider])], [], [enable_twitter=no])
+AC_ARG_WITH(twitter-consumer-key,
[AS_HELP_STRING([--with-twitter-consumer-key],
[Twitter OAuth 1.0 consumer key])],
[],
[])
-AC_DEFINE_UNQUOTED(GOA_TWITTER_CONSUMER_KEY, ["$with_twitter_consumer_key"], [Twitter OAuth 1.0 consumer key])
-with_twitter_consumer_secret=not_set
-AC_ARG_WITH([twitter-consumer-secret=SECRET],
+AC_ARG_WITH(twitter-consumer-secret,
[AS_HELP_STRING([--with-twitter-consumer-secret],
[Twitter OAuth 1.0 consumer secret])],
[],
[])
+if test "$with_twitter_consumer_key" = ""; then
+ with_twitter_consumer_key=not_set
+fi
+if test "$with_twitter_consumer_secret" = ""; then
+ with_twitter_consumer_secret=not_set
+fi
+AC_DEFINE_UNQUOTED(GOA_TWITTER_CONSUMER_KEY, ["$with_twitter_consumer_key"], [Twitter OAuth 1.0 consumer key])
AC_DEFINE_UNQUOTED(GOA_TWITTER_CONSUMER_SECRET, ["$with_twitter_consumer_secret"], [Twitter OAuth 1.0 consumer secret])
-AC_ARG_ENABLE([twitter], [AS_HELP_STRING([--enable-twitter], [Enable Twitter provider])], [], [enable_twitter=no])
if test "$enable_twitter" != "no"; then
AC_DEFINE(GOA_TWITTER_ENABLED, 1, [Enable Twitter data provider])
fi
# Yahoo
-with_yahoo_consumer_key=not_set
-AC_ARG_WITH([yahoo-consumer-key=KEY],
+AC_ARG_ENABLE([yahoo], [AS_HELP_STRING([--enable-yahoo], [Enable Yahoo provider])], [], [enable_yahoo=no])
+AC_ARG_WITH(yahoo-consumer-key,
[AS_HELP_STRING([--with-yahoo-consumer-key],
[Yahoo OAuth 1.0 consumer key])],
[],
[])
-AC_DEFINE_UNQUOTED(GOA_YAHOO_CONSUMER_KEY, ["$with_yahoo_consumer_key"], [Yahoo OAuth 1.0 consumer key])
-with_yahoo_consumer_secret=not_set
-AC_ARG_WITH([yahoo-consumer-secret=SECRET],
+AC_ARG_WITH(yahoo-consumer-secret,
[AS_HELP_STRING([--with-yahoo-consumer-secret],
[Yahoo OAuth 1.0 consumer secret])],
[],
[])
+if test "$with_yahoo_consumer_key" = ""; then
+ with_yahoo_consumer_key=not_set
+fi
+if test "$with_yahoo_consumer_secret" = ""; then
+ with_yahoo_consumer_secret=not_set
+fi
+AC_DEFINE_UNQUOTED(GOA_YAHOO_CONSUMER_KEY, ["$with_yahoo_consumer_key"], [Yahoo OAuth 1.0 consumer key])
AC_DEFINE_UNQUOTED(GOA_YAHOO_CONSUMER_SECRET, ["$with_yahoo_consumer_secret"], [Yahoo OAuth 1.0 consumer secret])
-AC_ARG_ENABLE([yahoo], [AS_HELP_STRING([--enable-yahoo], [Enable Yahoo provider])], [], [enable_yahoo=no])
if test "$enable_yahoo" != "no"; then
AC_DEFINE(GOA_YAHOO_ENABLED, 1, [Enable Yahoo data provider])
fi
# Facebook
-with_facebook_client_id=not_set
-AC_ARG_WITH([facebook-client-id=ID],
+AC_ARG_ENABLE([facebook], [AS_HELP_STRING([--enable-facebook], [Enable Facebook provider])], [], [enable_facebook=no])
+AC_ARG_WITH(facebook-client-id,
[AS_HELP_STRING([--with-facebook-client-id],
[Facebook OAuth 2.0 client id])],
[],
[])
-AC_DEFINE_UNQUOTED(GOA_FACEBOOK_CLIENT_ID, ["$with_facebook_client_id"], [Facebook OAuth 2.0 client id])
-with_facebook_client_secret=not_set
-AC_ARG_WITH([facebook-client-secret=SECRET],
+AC_ARG_WITH(facebook-client-secret,
[AS_HELP_STRING([--with-facebook-client-secret],
[Facebook OAuth 2.0 client secret])],
[],
[])
+if test "$with_facebook_client_id" = ""; then
+ with_facebook_client_id=not_set
+fi
+if test "$with_facebook_client_secret" = ""; then
+ with_facebook_client_secret=not_set
+fi
+AC_DEFINE_UNQUOTED(GOA_FACEBOOK_CLIENT_ID, ["$with_facebook_client_id"], [Facebook OAuth 2.0 client id])
AC_DEFINE_UNQUOTED(GOA_FACEBOOK_CLIENT_SECRET, ["$with_facebook_client_secret"], [Facebook OAuth 2.0 client secret])
-AC_ARG_ENABLE([facebook], [AS_HELP_STRING([--enable-facebook], [Enable Facebook provider])], [], [enable_facebook=no])
if test "$enable_facebook" != "no"; then
AC_DEFINE(GOA_FACEBOOK_ENABLED, 1, [Enable Facebook data provider])
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]