From 4f398f8354d5b786b7f4a199f4c3962778a4c8c4 Mon Sep 17 00:00:00 2001 From: Siraj Razick Date: Sat, 3 Mar 2012 20:01:39 -0500 Subject: build: Introduce libdns_sd backend for --with-backend switch Check for libdns_sd when configured with backend option "bonjour" --- configure.ac | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8b671643..9dd9354a 100644 --- a/configure.ac +++ b/configure.ac @@ -205,13 +205,21 @@ AC_SUBST(TELEPATHY_GLIB_CFLAGS) AC_SUBST(TELEPATHY_GLIB_LIBS) dnl check the backend to use +if test "$platform" = "win32"; then AC_ARG_WITH(backend, - AC_HELP_STRING([--with-backend=[avahi/no]], + AC_HELP_STRING([--with-backend=[bonjour/no]], + [Zeroconf backend to use]), + [], [with_backend=bonjour]) +else +AC_ARG_WITH(backend, + AC_HELP_STRING([--with-backend=[avahi/bonjour/no]], [Zeroconf backend to use]), [], [with_backend=avahi]) +fi -AM_CONDITIONAL(USE_BACKEND_DUMMY, [test "x$with_backend" = "xno"]) AM_CONDITIONAL(USE_BACKEND_AVAHI, [test "x$with_backend" = "xavahi"]) +AM_CONDITIONAL(USE_BACKEND_BONJOUR, [test "x$with_backend" = "xbonjour"]) +AM_CONDITIONAL(USE_BACKEND_DUMMY, [test "x$with_backend" = "xno"]) dnl Check for Avahi if test x$with_backend = xavahi; then @@ -222,6 +230,15 @@ if test x$with_backend = xavahi; then AC_SUBST(USE_BACKEND_AVAHI) fi +dnl Check for Bonjour Client Library libdns_sd +if test x$with_backend = xbonjour; then + PKG_CHECK_MODULES(BONJOUR, [libdns_sd]) + AC_DEFINE(USE_BACKEND_BONJOUR, [], [Use Bonjour backend]) + AC_SUBST(BONJOUR_CFLAGS) + AC_SUBST(BONJOUR_LIBS) + AC_SUBST(USE_BACKEND_BONJOUR) +fi + if test x$with_backend = xno; then AC_DEFINE(USE_BACKEND_DUMMY, [], [Use dummy backend]) AC_SUBST(USE_BACKEND_DUMMY) -- cgit v1.2.1