summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorpaul <paul>2005-05-07 02:22:51 +0000
committerpaul <paul>2005-05-07 02:22:51 +0000
commit18275fff9a5530a4446f822d04ce37754739b9ce (patch)
treea0d9841bf389e0cbe60c42b2b48f4f35b4a7b4e1 /configure.ac
parent57db8593ffb5fdd357689388320cdb2dadb6621b (diff)
downloadquagga-18275fff9a5530a4446f822d04ce37754739b9ce.tar.bz2
quagga-18275fff9a5530a4446f822d04ce37754739b9ce.tar.xz
2005-05-07 Yar Tikhiy <yar@comp.chem.msu.su>
* configure.ac: Check for OSes which support passing ifindex in struct ip_mreq. * lib/sockopt.c: Add support for BSD style ifindex in ip_mreq. * ospfd/ospf_network.c: Log ifindex on multicast membership leave/join events.
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac26
1 files changed, 22 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index e156a4f5..beb3422c 100755
--- a/configure.ac
+++ b/configure.ac
@@ -321,7 +321,7 @@ AC_HEADER_STDC
AC_CHECK_HEADERS([string.h stropts.h sys/conf.h sys/ksym.h sys/time.h \
sys/times.h sys/select.h sys/sysctl.h sys/sockio.h \
sys/types.h linux/version.h kvm.h netdb.h asm/types.h \
- libutil.h limits.h])
+ sys/param.h libutil.h limits.h])
AC_CHECK_HEADERS([sys/socket.h netinet/in_systm.h netinet/in.h \
net/if_dl.h net/netopt.h inet/nd.h net/route.h \
@@ -371,9 +371,6 @@ case "$host" in
AC_CHECK_LIB(nsl, gethostbyname)
AC_CHECK_LIB(socket, socket)
;;
- *-freebsd3.2)
- AC_DEFINE(FREEBSD_32,,FreeBSD 3.2)
- ;;
*-openbsd*)
opsys=openbsd
AC_DEFINE(OPEN_BSD,,OpenBSD)
@@ -648,6 +645,27 @@ fi
AC_SUBST(IF_METHOD)
AC_SUBST(IOCTL_METHOD)
+dnl ---------------------------------------------------------------
+dnl figure out how to specify an interface in multicast sockets API
+dnl ---------------------------------------------------------------
+AC_CHECK_MEMBERS([struct ip_mreqn.imr_ifindex],,,[#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif])
+
+AC_MSG_CHECKING([for BSD struct ip_mreq hack])
+AC_TRY_COMPILE([#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif],[#if (defined(__FreeBSD__) && (__FreeBSD_version >= 500022 || (__FreeBSD_version < 500000 && __FreeBSD_version >= 440000))) || (defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 106010000)
+ return (0);
+#else
+ #error No support for BSD struct ip_mreq hack detected
+#endif],[AC_MSG_RESULT(yes)
+AC_DEFINE(HAVE_BSD_STRUCT_IP_MREQ_HACK,,[Can pass ifindex in struct ip_mreq])],
+AC_MSG_RESULT(no))
+
dnl -----------------------
dnl check proc file system.
dnl -----------------------