X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=configure.ac;h=98542038829ab6df85572aa463723376ee1e60ed;hb=7d9e6001da776dafdbfdbea0a3cb601f9f80d1b0;hp=72138ac9a08e7d6134491c26b9c4a5b4f3f8ed55;hpb=c26e445b409215cd2fa380c8ba8e6c8f6115aec5;p=catta diff --git a/configure.ac b/configure.ac index 72138ac..9854203 100644 --- a/configure.ac +++ b/configure.ac @@ -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 +#include +]) + +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 ], [ + 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 ], [ + 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. # @@ -556,6 +628,7 @@ tests/Makefile service-type-database/Makefile avahi-sharp/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} "