diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-07-22 18:17:04 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-07-22 18:17:04 (GMT) |
commit | c4660f404c9a0dbf1c00a20baacfc738d93eaff5 (patch) | |
tree | 33d8532adaa535786f7e7910e334118f927f204f /autoconf | |
parent | 3b7107fb14663c4e83d4829c6ddec7af84c796bb (diff) | |
download | swift-c4660f404c9a0dbf1c00a20baacfc738d93eaff5.zip swift-c4660f404c9a0dbf1c00a20baacfc738d93eaff5.tar.bz2 |
Add Avahi detection in configure script.
Diffstat (limited to 'autoconf')
-rw-r--r-- | autoconf/ax_avahi.m4 | 28 |
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 +]) |