1 dnl Copyright (C) 2009 Sun Microsystems
2 dnl This file is free software; Sun Microsystems
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
6 AC_DEFUN([_PANDORA_SEARCH_LIBAVAHI],[
7 AC_REQUIRE([AC_LIB_PREFIX])
9 dnl --------------------------------------------------------------------
10 dnl Check for libavahi
11 dnl --------------------------------------------------------------------
13 AC_ARG_ENABLE([libavahi],
14 [AS_HELP_STRING([--disable-libavahi],
15 [Build with libavahi support @<:@default=on@:>@])],
16 [ac_enable_libavahi="$enableval"],
17 [ac_enable_libavahi="yes"])
19 AS_IF([test "x$ac_enable_libavahi" = "xyes"],[
20 AC_LIB_HAVE_LINKFLAGS(avahi-client,avahi-common,[
21 #include <avahi-client/client.h>
22 #include <avahi-common/simple-watch.h>
24 AvahiSimplePoll *simple_poll= avahi_simple_poll_new();
30 AM_CONDITIONAL(HAVE_LIBAVAHI, [test "x${ac_cv_libavahi}" = "xyes"])
33 AC_DEFUN([PANDORA_HAVE_LIBAVAHI],[
34 AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI])
37 AC_DEFUN([PANDORA_REQUIRE_LIBAVAHI],[
38 AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI])
39 AS_IF([test "x${ac_cv_libavahi}" = "xno"],
40 AC_MSG_ERROR([libavahi is required for ${PACKAGE}]))