diff options
author | Siraj Razick <siraj.razick@collabora.co.uk> | 2012-02-17 19:55:58 -0500 |
---|---|---|
committer | Olli Salli <olli.salli@collabora.co.uk> | 2012-02-22 20:43:52 +0200 |
commit | b94f06b6b1f1a16ea574b5eebc019206d448a028 (patch) | |
tree | 438414aa40a0b22f7dc51196e00d313e9b2e6508 /configure.ac | |
parent | ff906d265400a20a53b4c9f0cc5ac8b3740747e4 (diff) | |
download | telepathy-salut-b94f06b6b1f1a16ea574b5eebc019206d448a028.tar.gz |
configure.ac: Add --with-backend option to choose the backend
Add --with-backend=avahi and no option to configure script
and define USE_BACKEND_AVAHI/DUMMY so we can selectivly
include the headers and protect the code as needed. Using
--without-backend is equlant to using --with-backend=no
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index d1039a4f..fc8204ca 100644 --- a/configure.ac +++ b/configure.ac @@ -142,7 +142,6 @@ AM_CONDITIONAL(ENABLE_OLPC, test "x$enable_olpc" = "xyes") AC_SUBST(ENABLE_OLPC) - AC_HEADER_STDC([]) AC_C_INLINE @@ -200,10 +199,28 @@ PKG_CHECK_MODULES(TELEPATHY_GLIB, [telepathy-glib >= 0.17.1]) AC_SUBST(TELEPATHY_GLIB_CFLAGS) AC_SUBST(TELEPATHY_GLIB_LIBS) +dnl check the backend to use +AC_ARG_WITH(backend, + AC_HELP_STRING([--with-backend=[avahi/no]], + [Zeroconf backend to use]), + [], [with_backend=avahi]) + +AM_CONDITIONAL(USE_BACKEND_DUMMY, [test "x$with_backend" = "xno"]) +AM_CONDITIONAL(USE_BACKEND_AVAHI, [test "x$with_backend" = "xavahi"]) + dnl Check for Avahi -PKG_CHECK_MODULES(AVAHI, [avahi-gobject, avahi-client]) -AC_SUBST(AVAHI_CFLAGS) -AC_SUBST(AVAHI_LIBS) +if test x$with_backend = xavahi; then + PKG_CHECK_MODULES(AVAHI, [avahi-gobject, avahi-client]) + AC_DEFINE(USE_BACKEND_AVAHI, [], [Use Avahi backend]) + AC_SUBST(AVAHI_CFLAGS) + AC_SUBST(AVAHI_LIBS) + AC_SUBST(USE_BACKEND_AVAHI) +fi + +if test x$with_backend = xno; then + AC_DEFINE(USE_BACKEND_DUMMY, [], [Use dummy backend]) + AC_SUBST(USE_BACKEND_DUMMY) +fi dnl Check for libsoup PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4]) |