From 4309f0c390af2dd6013c853f128295205faca4c3 Mon Sep 17 00:00:00 2001 From: Sebastien Estienne Date: Wed, 12 Oct 2005 22:52:51 +0000 Subject: [PATCH] * add autoconf support for checking ip_mreqn git-svn-id: file:///home/lennart/svn/public/avahi/trunk@749 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- configure.ac | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/configure.ac b/configure.ac index ba369a1..9627ab5 100644 --- a/configure.ac +++ b/configure.ac @@ -86,6 +86,9 @@ case "$host" in ;; esac +# +# Check for netlink.h +# AC_CHECK_HEADER(linux/netlink.h, HAVE_NETLINK=yes AC_DEFINE([HAVE_NETLINK],[],[Support for Linux netlink]) @@ -96,6 +99,34 @@ AC_DEFINE([HAVE_NETLINK],[],[Support for Linux netlink]) 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. # -- 2.39.5