diff options
author | Mathias Hasselmann <hasselmm@gnome.org> | 2010-01-10 00:43:02 +0100 |
---|---|---|
committer | Mathias Hasselmann <hasselmm@gnome.org> | 2010-01-10 00:43:03 +0100 |
commit | 9f8ee8d8bb0fde950650560d77f79aec1e81512a (patch) | |
tree | d1a7196906915b84255d4a037542355908f03b39 /m4 | |
parent | bcea784a38f6bb23b51c83066eff1c5e222279ee (diff) |
Add a browser extension which provides a D-Bus interface for accessing
Faceboook without violating their terms of service.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/facebook.m4 | 58 | ||||
-rw-r--r-- | m4/mozilla.m4 | 28 |
2 files changed, 60 insertions, 26 deletions
diff --git a/m4/facebook.m4 b/m4/facebook.m4 index 4a2fca1..150793b 100644 --- a/m4/facebook.m4 +++ b/m4/facebook.m4 @@ -1,32 +1,38 @@ -AC_DEFUN([FACEBOOK_APPKEY],[ +AC_DEFUN([GRUSCHLER_CHECK_FACEBOOK], +[ + AC_REQUIRE([AC_PROG_SED]) -AC_MSG_CHECKING([Facebook keys]) - -if ! test -r "facebook.conf"; then - AC_MSG_ERROR([facebook.conf not found]) -fi - -facebook_apikey=`sed -ne 's/^apikey=//p' facebook.conf` -facebook_secret=`sed -ne 's/^secret=//p' facebook.conf` -facebook_email=`sed -ne 's/^email=//p' facebook.conf` -facebook_password=`sed -ne 's/^password=//p' facebook.conf` + AC_MSG_CHECKING([for Facebook settings]) -if ! test -n "$facebook_apikey"; then - AC_MSG_ERROR([API key not found]) -fi + if ! test -f "facebook.conf"; then + AC_MSG_ERROR([facebook.conf not found]) + fi -if ! test -n "$facebook_secret"; then - AC_MSG_ERROR([secret key not found]) -fi + gruschler_facebook_apikey=`$SED -ne s/^apikey=//p facebook.conf` + gruschler_facebook_secret=`$SED -ne "s/^secret=//p" facebook.conf` + gruschler_facebook_email=`$SED -ne "s/^email=//p" facebook.conf` + gruschler_facebook_password=`$SED -ne "s/^password=//p" facebook.conf` -AC_DEFINE_UNQUOTED([$1_FACEBOOK_APIKEY], ["$facebook_apikey"], - [The API key for accessing Facebook]) -AC_DEFINE_UNQUOTED([$1_FACEBOOK_SECRET], ["$facebook_secret"], - [The secret key for accessing Facebook]) -AC_DEFINE_UNQUOTED([$1_FACEBOOK_DEFAULT_EMAIL], ["$facebook_email"], - [Default email address for accessing Facebook]) -AC_DEFINE_UNQUOTED([$1_FACEBOOK_DEFAULT_PASSWORD], ["$facebook_password"], - [Default password for accessing Facebook]) + if ! test -n "$gruschler_facebook_apikey"; then + AC_MSG_ERROR(['apikey' setting not found]) + fi -AC_MSG_RESULT([$facebook_apikey]) + if ! test -n "$gruschler_facebook_secret"; then + AC_MSG_ERROR(['secret' setting not found]) + fi + + AC_MSG_RESULT([yes]) + + AC_DEFINE_UNQUOTED([GRUSCHLER_FACEBOOK_APIKEY], + ["$gruschler_facebook_apikey"], + [The API key for accessing Facebook]) + AC_DEFINE_UNQUOTED([GRUSCHLER_FACEBOOK_SECRET], + ["$gruschler_facebook_secret"], + [The secret key for accessing Facebook]) + AC_DEFINE_UNQUOTED([GRUSCHLER_FACEBOOK_DEFAULT_EMAIL], + ["$gruschler_facebook_email"], + [Default email address for accessing Facebook]) + AC_DEFINE_UNQUOTED([GRUSCHLER_FACEBOOK_DEFAULT_PASSWORD], + ["$gruschler_facebook_password"], + [Default password for accessing Facebook]) ]) diff --git a/m4/mozilla.m4 b/m4/mozilla.m4 new file mode 100644 index 0000000..7b1f4ff --- /dev/null +++ b/m4/mozilla.m4 @@ -0,0 +1,28 @@ +AC_DEFUN([GRUSCHLER_CHECK_MOZILLA], +[ + PKG_CHECK_MODULES([MOZILLA],[libxul >= 3.6]) + + mozilla_idldir=$($PKG_CONFIG --variable=idldir libxul) + mozilla_libdir=$($PKG_CONFIG --variable=libdir libxul) + mozilla_prefix=$($PKG_CONFIG --variable=prefix libxul) + + if test -z "$mozilla_libdir" + then + mozilla_libdir="$mozilla_prefix/lib/$(basename $mozilla_idldir)" + fi + + mozilla_comdir="$mozilla_libdir/components" + MOZILLA_XPIDL="$mozilla_libdir/xpidl" + + AC_CHECK_FILE([$mozilla_idldir/nsISupports.idl]) + AC_CHECK_FILE([$mozilla_libdir/libxpcom.so]) + AC_CHECK_FILE([$mozilla_comdir]) + AC_CHECK_FILE([$MOZILLA_XPIDL]) + + AC_SUBST([mozilla_idldir]) + AC_SUBST([mozilla_libdir]) + AC_SUBST([mozilla_comdir]) + AC_SUBST([MOZILLA_XPIDL]) + + AC_DEFINE([MOZILLA_STRICT_API],[1],[Only use strict Mozilla API]) +]) |