X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=configure.ac;h=2ed9a8a1e7df62f528590c25d4afc6403f674963;hb=2be556032ed87b7627a135174339c5e5a0e8fc44;hp=50f46bc3b4f5601273ec6eb782aec9c04c587824;hpb=a6327238b8776378a5954d096d72337b2966eeac;p=catta diff --git a/configure.ac b/configure.ac index 50f46bc..2ed9a8a 100644 --- a/configure.ac +++ b/configure.ac @@ -34,7 +34,9 @@ AC_SUBST(LIBAVAHI_CLIENT_VERSION_INFO, [2:0:1]) 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_BONJOUR_VERSION_INFO, [1:0:0]) +AC_SUBST(LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO, [1:0:0]) +AC_SUBST(LIBAVAHI_COMPAT_HOWL_VERSION_INFO, [0:0:0]) +AC_SUBST(HOWL_COMPAT_VERSION, [0.9.8]) 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 +58,90 @@ 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 net/route.h +# +AC_CHECK_HEADER(net/route.h, +HAVE_PF_ROUTE=yes +AC_DEFINE([HAVE_PF_ROUTE],[],[Support for PF_ROUTE]) +, [], [ +#include +#include +]) + +AM_CONDITIONAL(HAVE_PF_ROUTE, [ test x"$HAVE_PF_ROUTE" = 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. # @@ -555,7 +641,9 @@ man/Makefile tests/Makefile service-type-database/Makefile avahi-sharp/Makefile -compat-bonjour/Makefile +avahi-compat-libdns_sd/Makefile +avahi-compat-howl/Makefile +avahi-compat-howl/samples/Makefile ]) AC_OUTPUT @@ -617,4 +705,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} "