After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 682346 - build: Make telepathy backend optional
build: Make telepathy backend optional
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: general
git master
Other All
: Normal normal
: Unset
Assigned To: folks-maint
folks-maint
Depends on:
Blocks:
 
 
Reported: 2012-08-21 11:18 UTC by Arun Raghavan
Modified: 2012-08-25 04:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Make telepathy backend optional (5.09 KB, patch)
2012-08-21 11:18 UTC, Arun Raghavan
needs-work Details | Review
build: Make telepathy backend optional (updated) (5.84 KB, patch)
2012-08-24 17:57 UTC, Arun Raghavan
committed Details | Review
build: Make telepathy backend optional (5.84 KB, patch)
2012-08-25 04:56 UTC, Arun Raghavan
committed Details | Review

Description Arun Raghavan 2012-08-21 11:18:07 UTC
This might be useful for people who don't want to install bleeding edge
telepathy-glib or a full jhbuild environment to make a quick patch for folks.
The default behaviour should be unmodified.
Comment 1 Arun Raghavan 2012-08-21 11:18:09 UTC
Created attachment 221981 [details] [review]
build: Make telepathy backend optional

This is handy for while developing for those who don't always have
bleeding edge telepathy-glib. As a side-effect, tests are also made
optional (but on by default).
Comment 2 Philip Withnall 2012-08-22 23:11:18 UTC
Review of attachment 221981 [details] [review]:

::: Makefile.am
@@ +10,3 @@
+if ENABLE_TESTS
+SUBDIRS += tests
+endif

Shouldn’t ‘--enable-tests’ and ‘--enable-telepathy-backend’ be added to DISTCHECK_CONFIGURE_FLAGS? That way, they’re guaranteed to appear in the tarball.

They should probably all be listed in DIST_SUBDIRS as well, though, just to be safe (and for consistency with other Makefile.ams).

::: configure.ac
@@ +107,3 @@
+        enable_telepathy_backend=yes )
+
+if test "x$enable_telepathy_backend" = "xyes"; then

This should use AS_IF. See: http://git.gnome.org/browse/glib/commit/?id=ddfcfa66ae602c11ce9c4bfc426a79d668653278 (which I recently found out about).

@@ +108,3 @@
+
+if test "x$enable_telepathy_backend" = "xyes"; then
+        AC_DEFINE(HAVE_TELEPATHY, [1], [Define as 1 if you have the telepathy backend])

s/telepathy/Telepathy/

@@ +110,3 @@
+        AC_DEFINE(HAVE_TELEPATHY, [1], [Define as 1 if you have the telepathy backend])
+else
+        AC_DEFINE(HAVE_TELEPATHY, [0], [Define as 1 if you have the eds backend])

s/eds/Telepathy/

@@ +194,3 @@
+        PKG_CHECK_MODULES([TP_GLIB], [telepathy-glib >= $TP_GLIB_REQUIRED])
+        PKG_CHECK_MODULES([ZEITGEIST], [zeitgeist-1.0 >= $ZEITGEIST_REQUIRED])
+

Extraneous new line. This block should also use AS_IF.
Comment 3 Philip Withnall 2012-08-24 06:24:48 UTC
Oh, and you should also add the results of --enable-telepathy-backend and --enable-tests to the “Configure summary” in configure.ac.
Comment 4 Arun Raghavan 2012-08-24 17:57:34 UTC
Created attachment 222355 [details] [review]
build: Make telepathy backend optional (updated)

Thanks for the detailed review! I've incorporated all the changes you
requested. The only one that I've left out is the AS_IF bit, for consistency,
since all the bits use a plain 'if'.
Comment 5 Philip Withnall 2012-08-24 21:01:52 UTC
Review of attachment 222355 [details] [review]:

Looks good to me. Please commit to master, and don’t forget to update the NEWS file with your commit to mark this bug as resolved. Thanks!
Comment 6 Philip Withnall 2012-08-24 21:02:23 UTC
(In reply to comment #4)
> The only one that I've left out is the AS_IF bit, for consistency,
> since all the bits use a plain 'if'.

I’ll go through and fix all those up once you’ve pushed your patch.
Comment 7 Arun Raghavan 2012-08-25 04:56:37 UTC
The following fix has been pushed:
855803a build: Make telepathy backend optional
Comment 8 Arun Raghavan 2012-08-25 04:56:44 UTC
Created attachment 222375 [details] [review]
build: Make telepathy backend optional

This is handy for while developing for those who don't always have
bleeding edge telepathy-glib. As a side-effect, tests are also made
optional (but on by default).