GNOME Bugzilla – Bug 682346
build: Make telepathy backend optional
Last modified: 2012-08-25 04:56:44 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.
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).
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.
Oh, and you should also add the results of --enable-telepathy-backend and --enable-tests to the “Configure summary” in configure.ac.
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'.
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!
(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.
The following fix has been pushed: 855803a build: Make telepathy backend optional
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).