summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorMaria Jan Matejka <mq@jmq.cz>2017-09-25 13:00:05 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2017-12-10 18:30:00 +0100
commit6b0f5f68a8ae35b05abb144cf998bf537dfa283b (patch)
treebf574113827de47f71b85fd273ea1aa2630a5db8 /aclocal.m4
parent67a2eb9177fe0b8a6854775a4fad1f7768f6a94a (diff)
Switchoff for MPLS in kernel.
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m435
1 files changed, 35 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 365bfa81..8160e539 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -31,6 +31,41 @@ AC_DEFUN([BIRD_CHECK_PTHREADS],
CFLAGS="$bird_tmp_cflags"
])
+AC_DEFUN([BIRD_CHECK_MPLS_KERNEL],
+[
+ AC_CACHE_CHECK(
+ [for Linux MPLS headers],
+ [bird_cv_mpls_kernel],
+ [
+ AC_COMPILE_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [
+ #include <linux/lwtunnel.h>
+ #include <linux/netlink.h>
+ #include <linux/rtnetlink.h>
+ #include <sys/socket.h>
+ void t(int arg);
+ ],
+ [
+ t(AF_MPLS);
+ t(RTA_VIA);
+ t(RTA_NEWDST);
+ t(RTA_ENCAP_TYPE);
+ t(RTA_ENCAP);
+ struct rtvia rtvia;
+ t(LWTUNNEL_ENCAP_MPLS);
+ ]
+ )
+ ],
+ [bird_cv_mpls_kernel=yes],
+ [bird_cv_mpls_kernel=no]
+ )
+ ]
+ )
+])
+
+
AC_DEFUN([BIRD_CHECK_GCC_OPTION],
[
bird_tmp_cflags="$CFLAGS"