summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/ax_avahi.m428
1 files changed, 28 insertions, 0 deletions
diff --git a/autoconf/ax_avahi.m4 b/autoconf/ax_avahi.m4
new file mode 100644
index 0000000..1ea3233
--- /dev/null
+++ b/autoconf/ax_avahi.m4
@@ -0,0 +1,28 @@
+# Author: Remko Tronçon
+
+AC_DEFUN([AX_AVAHI],
+[
+ AC_ARG_WITH(
+ [avahi],
+ AC_HELP_STRING([--with-avahi=@<:@ARG@:>@],[Path to Avahi installation]),
+ [
+ WITH_AVAHI="$withval"
+ if test "$withval" != "no" -a "$withval" != "yes"; then
+ AVAHI_CPPFLAGS="-I$withval/include"
+ AVAHI_LDFLAGS="-L$withval/lib"
+ CPPFLAGS="$CPPFLAGS $AVAHI_CPPFLAGS"
+ LDFLAGS="$LDFLAGS $AVAHI_LDFLAGS"
+ fi
+ ],
+ [WITH_AVAHI="yes"])
+
+ if test "$WITH_AVAHI" != "no"; then
+ AC_CHECK_HEADER(avahi-client/client.h,
+ [
+ HAVE_AVAHI=yes
+ # TODO: Check if this lib exists
+ AVAHI_LIBS="-lavahi-client"
+ ],
+ [])
+ fi
+])