]> git.meshlink.io Git - catta/blobdiff - configure.ac
Do not fail if address cannot be parsed - it is probably AVAHI_LOOKUP_NO_ADDRESS...
[catta] / configure.ac
index 83a687bae5cc14cf4a2d548bec9d136c70f7f470..98542038829ab6df85572aa463723376ee1e60ed 100644 (file)
@@ -35,6 +35,7 @@ AC_SUBST(LIBAVAHI_GLIB_VERSION_INFO, [0:1:0])
 AC_SUBST(LIBAVAHI_QT3_VERSION_INFO, [0:0:0])
 AC_SUBST(LIBAVAHI_QT4_VERSION_INFO, [0:0:0])
 AC_SUBST(LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO, [1:0:0])
+AC_SUBST(LIBAVAHI_COMPAT_HOWL_VERSION_INFO, [0:0:0])
 
 if type -p stow > /dev/null && test -d /usr/local/stow ; then
     AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
@@ -56,6 +57,77 @@ AC_PROG_LIBTOOL
 
 ACX_PTHREAD(,AC_MSG_ERROR([Missing POSIX Threads support]))
 
+#
+# Host specific stuffs
+#
+case "$host" in
+  *-netbsd* | *-knetbsd*-gnu)
+    AC_DEFINE([NETBSD],[],[ Support for NetBSD])
+    avahi_platform=netbsd
+    ;;
+  *-openbsd*)
+    AC_DEFINE([OPENBSD],[],[ Support for OpenBSD])
+    avahi_platform=openbsd
+    ;;
+  *-solaris*)
+    AC_DEFINE([SOLARIS],[],[ Support for Sun Solaris])
+    avahi_platform=solaris
+    ;;
+  *-linux*)
+    AC_DEFINE([LINUX],[],[ Support for GNU/Linux])
+    avahi_platform=linux
+    ;;
+  *-freebsd* | *-kfreebsd*-gnu)
+    AC_DEFINE([FREEBSD],[],[ Support for FreeBSD])
+    avahi_platform=freebsd
+    ;;
+  *-apple-darwin*)
+    AC_DEFINE([DARWIN],[],[ Support for AppleDarwin])
+    avahi_platform=darwin
+    ;;
+esac
+
+#
+# Check for netlink.h
+#
+AC_CHECK_HEADER(linux/netlink.h, 
+HAVE_NETLINK=yes
+AC_DEFINE([HAVE_NETLINK],[],[Support for Linux netlink])
+, [], [
+#include <sys/socket.h>
+#include <asm/types.h>
+])
+
+AM_CONDITIONAL(HAVE_NETLINK, [ test x"$HAVE_NETLINK" = xyes ])
+
+#
+# Check for struct ip_mreqn
+#
+AC_MSG_CHECKING(for struct ip_mreqn)
+AC_TRY_COMPILE([#include <netinet/in.h>], [
+       struct ip_mreqn mreq;
+       mreq.imr_address.s_addr = 0;
+], [
+       # Yes, we have it...
+       AC_MSG_RESULT(yes)
+       AC_DEFINE([HAVE_STRUCT_IP_MREQN],[],[Support for struct ip_mreqn])
+], [
+       # We'll just have to try and use struct ip_mreq
+       AC_MSG_RESULT(no)
+       AC_MSG_CHECKING(for struct ip_mreq)
+       AC_TRY_COMPILE([#include <netinet/in.h>], [
+               struct ip_mreq mreq;
+               mreq.imr_interface.s_addr = 0;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE([HAVE_STRUCT_IP_MREQ],[],[Support for struct ip_mreq])
+       ], [
+               # No multicast support
+                       AC_MSG_RESULT(no)
+       ])
+])
+
 #
 # Detecting the linux distribution for specific things like init scripts.
 #
@@ -555,7 +627,8 @@ man/Makefile
 tests/Makefile
 service-type-database/Makefile
 avahi-sharp/Makefile
-compat-libdns_sd/Makefile
+avahi-compat-libdns_sd/Makefile
+avahi-compat-howl/Makefile
 ])
 AC_OUTPUT
 
@@ -617,4 +690,6 @@ echo "
     Building libavahi-qt3:              ${HAVE_QT3}
     Building libavahi-qt4:              ${HAVE_QT4}
     Building avahi-sharp:               ${HAVE_MONO}
+    Building avahi-compat-libdns_sd:    ${BUILD_CLIENT}
+    Building avahi-compat-howl:         ${BUILD_CLIENT}
 "