[gnome-chess/chess-telepathy-networking-support-664946-rebase: 11/64] [Chess Networking] Depend on folks and folks-telepathy to fetch contacts



commit 0d9c43eb56fc24ecd12a6f7d444b900c5f1a3e18
Author: Chandni Verma <chandniverma2112 gmail com>
Date:   Thu May 17 22:10:26 2012 +0530

    [Chess Networking] Depend on folks and folks-telepathy to fetch contacts

 configure.ac    |   38 ++++++++++++++++++++++++++++++++++++++
 src/Makefile.am |    5 +++++
 2 files changed, 43 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ccc8995..892ab5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,6 +33,33 @@ PKG_CHECK_MODULES(TEST, [
 ])
 
 dnl ###########################################################################
+dnl Enable Networking
+dnl ###########################################################################
+
+AC_ARG_ENABLE([networking],
+    AS_HELP_STRING([--enable-networking=@<:@no/yes@:>@],
+        [build with Contacts and Telepathy networking support]),
+    [case "${enableval}" in
+        yes) networking=yes ;;
+         no) networking=no ;;
+          *) AC_MSG_ERROR([bad value ${enableval} for --enable-networking]) ;;
+     esac],
+    [networking=yes])
+
+if test "x$networking" = "xyes"; then
+    # Check for folks
+    FOLKS_REQUIRED=0.6.6
+
+    PKG_CHECK_MODULES([FOLKS],
+        [folks >= $FOLKS_REQUIRED
+         folks-telepathy >= $FOLKS_REQUIRED])
+    AC_SUBST([FOLKS_CFLAGS])
+    AC_SUBST([FOLKS_LIBS])
+fi
+AM_CONDITIONAL([ENABLE_NETWORKING], [test "x$networking" = "xyes"])
+
+
+dnl ###########################################################################
 dnl Internationalization
 dnl ###########################################################################
 
@@ -63,3 +90,14 @@ help/Makefile
 po/Makefile.in
 src/Makefile
 ])
+
+echo "
+Configuration:
+
+    Source code location:  ${srcdir}
+    Compiler:              ${CC}"
+
+echo "
+    Networking enabled:    ${networking}
+"
+
diff --git a/src/Makefile.am b/src/Makefile.am
index 4343a2f..bc5f8fd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -66,6 +66,11 @@ gnome_chess_VALAFLAGS = \
     --pkg posix \
     --pkg sqlite3
 
+if ENABLE_NETWORKING
+gnome_chess_CFLAGS += $(FOLKS_CFLAGS)
+gnome_chess_LDADD += $(FOLKS_LIBS)
+endif
+
 CLEANFILES = \
 	$(patsubst %.vala,%.c,$(filter %.vala, $(SOURCES))) \
 	*_vala.stamp



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]