diff options
author | Sebastien Estienne <sebastien.estienne@gmail.com> | 2005-10-12 22:52:51 +0000 |
---|---|---|
committer | Sebastien Estienne <sebastien.estienne@gmail.com> | 2005-10-12 22:52:51 +0000 |
commit | 4309f0c390af2dd6013c853f128295205faca4c3 (patch) | |
tree | 5fa08898df7cddbcddbfec3e40c601871b6b0f81 | |
parent | c722f4913cf03748a2f0937c6399dde3e1ac4abe (diff) |
* add autoconf support for checking ip_mreqn
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@749 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
-rw-r--r-- | configure.ac | 31 |
1 files changed, 31 insertions, 0 deletions
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]) @@ -97,6 +100,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 <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. # AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the Linux distribution to target: One of debian, gentoo, archlinux or none])) |