telepathy: Fix build with --disable-zeitgeist
authorPhilip Withnall <philip@tecnocode.co.uk>
Fri, 5 Jul 2013 14:26:51 +0000 (15:26 +0100)
committerPhilip Withnall <philip@tecnocode.co.uk>
Fri, 5 Jul 2013 20:57:56 +0000 (21:57 +0100)
commit5867cda8e899a873e65796b9aa0492bfc32b95f0
tree7849e2fd4b21c1c8bd9c20159f5f07501b36280f
parent6afd8a4f4d2a8f799aee98ba72d3b5e4ea4d3bb4
telepathy: Fix build with --disable-zeitgeist

Vala doesn’t pass #if conditionals through to generated C code, so when
building folks from a tarball, the --[enable|disable]-zeitgeist option was
having no effect, and Zeitgeist was always being pulled into the build.

Fix this by separating the Zeitgeist code out into a small noinst shim
library and always generating C code for two versions of it: one with
Zeitgeist enabled, and one with it disabled. The correct one’s C code is
then compiled and linked into libfolks-telepathy.la when building from the
tarball.

This is a horrible, ugly fix, but the only better fix is to disable
distribution of generated C code. This was attempted, but thwarted by
automake’s Vala support.

Closes: https://bugzilla.gnome.org/show_bug.cgi?id=701099
backends/telepathy/lib/Makefile.am
backends/telepathy/lib/tp-zeitgeist-dummy.vala [new file with mode: 0644]
backends/telepathy/lib/tp-zeitgeist.vala [new file with mode: 0644]
backends/telepathy/lib/tpf-persona-store.vala
backends/telepathy/lib/tpf-persona.vala
configure.ac