[folks] Check for telepathy-glib Vala bindings by compilation success, not specific file.
- From: Travis Reitter <treitter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Check for telepathy-glib Vala bindings by compilation success, not specific file.
- Date: Tue, 10 Aug 2010 22:29:15 +0000 (UTC)
commit 5a521af28f1361e1a00ba5bfa1475e798bdc3809
Author: Travis Reitter <travis reitter collabora co uk>
Date: Tue Aug 10 15:28:23 2010 -0700
Check for telepathy-glib Vala bindings by compilation success, not specific file.
configure.ac | 8 ++++++--
telepathy-check.vala | 6 ++++++
2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ccde791..088dd2a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -116,8 +116,12 @@ PKG_CHECK_MODULES(TP_GLIB, telepathy-glib >= $TP_GLIB_REQUIRED)
AC_SUBST(TP_GLIB_CFLAGS)
AC_SUBST(TP_GLIB_LIBS)
-AS_IF([test ! -e "$VAPIDIR/telepathy-glib.vapi"],
- [AC_MSG_ERROR([missing telepathy-glib Vala bindings])])
+# check for tp-glib vala bindings by compiling a trivial program
+AC_MSG_CHECKING([Telepathy Vala bindings])
+AS_IF(! [$VALAC $VALACFLAGS $VALAFLAGS --vapidir=$VAPIDIR --pkg telepathy-glib \
+ -o /dev/null telepathy-check.vala],
+ [AC_MSG_ERROR([Missing telepathy-glib Vala bindings])])
+AC_MSG_RESULT([yes])
# -----------------------------------------------------------
# Backends
diff --git a/telepathy-check.vala b/telepathy-check.vala
new file mode 100644
index 0000000..fefea19
--- /dev/null
+++ b/telepathy-check.vala
@@ -0,0 +1,6 @@
+using TelepathyGLib;
+void main (string[] args)
+{
+ var manager = AccountManager.dup ();
+ stdout.printf ("got account manager %p\n", manager);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]