# -*- autoconf -*-
-# Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc.
+# Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
AC_MSG_RESULT([$kversion])
if test "$version" -ge 4; then
- if test "$version" = 4 && test "$patchlevel" -le 9; then
+ if test "$version" = 4 && test "$patchlevel" -le 11; then
: # Linux 4.x
else
- AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.9.x is not supported (please refer to the FAQ for advice)])
+ AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.11.x is not supported (please refer to the FAQ for advice)])
fi
elif test "$version" = 3 && test "$patchlevel" -ge 10; then
: # Linux 3.x
OVS_FIND_PARAM_IFELSE([$KSRC/include/linux/netdevice.h],
[netdev_master_upper_dev_link], [upper_priv],
[OVS_DEFINE([HAVE_NETDEV_MASTER_UPPER_DEV_LINK_PRIV])])
+ OVS_FIND_FIELD_IFELSE([$KSRC/include/linux/netdevice.h], [net_device],
+ [max_mtu])
OVS_GREP_IFELSE([$KSRC/include/linux/netfilter.h], [nf_hook_state])
OVS_GREP_IFELSE([$KSRC/include/linux/netfilter.h], [nf_register_net_hook])
OVS_FIND_FIELD_IFELSE([$KSRC/include/linux/netfilter_ipv6.h], [nf_ipv6_ops],
[fragment.*sock], [OVS_DEFINE([HAVE_NF_IPV6_OPS_FRAGMENT])])
+ OVS_FIND_FIELD_IFELSE([$KSRC/include/net/netfilter/nf_conntrack.h],
+ [nf_conn], [struct timer_list[[ \t]]*timeout],
+ [OVS_DEFINE([HAVE_NF_CONN_TIMER])])
+ OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack.h],
+ [nf_ct_delete(], [OVS_DEFINE([HAVE_NF_CT_DELETE])])
+
OVS_FIND_PARAM_IFELSE([$KSRC/include/net/netfilter/nf_conntrack.h],
[nf_ct_tmpl_alloc], [nf_conntrack_zone],
[OVS_DEFINE([HAVE_NF_CT_TMPL_ALLOC_TAKES_STRUCT_ZONE])])
OVS_FIND_PARAM_IFELSE([$KSRC/include/net/netfilter/nf_conntrack.h],
[nf_ct_get_tuplepr], [struct.net],
[OVS_DEFINE([HAVE_NF_CT_GET_TUPLEPR_TAKES_STRUCT_NET])])
+ OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack.h],
+ [nf_ct_set])
OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_zones.h],
[nf_ct_zone_init])
OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_labels.h],
[OVS_DEFINE([HAVE_NF_CONNLABELS_GET_TAKES_BIT])])
OVS_FIND_FIELD_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_labels.h],
[nf_conn_labels], [words])
- OVS_GREP_IFELSE([$KSRC/include/net/netfilter/ipv6/nf_defrag_ipv6.h],
- [nf_ct_frag6_consume_orig])
- OVS_GREP_IFELSE([$KSRC/include/net/netfilter/ipv6/nf_defrag_ipv6.h],
- [nf_ct_frag6_output])
OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_nat.h], [nf_ct_nat_ext_add])
OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_nat.h], [nf_nat_alloc_null_binding])
OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_seqadj.h], [nf_ct_seq_adjust])
[OVS_DEFINE([HAVE_L4_RXHASH])])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_ensure_writable])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_vlan_pop])
+ OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [__skb_vlan_pop])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_vlan_push])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_clear_hash_if_not_l4])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_postpush_rcsum])
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [lco_csum])
+ OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_nfct])
OVS_GREP_IFELSE([$KSRC/include/linux/types.h], [bool],
[OVS_DEFINE([HAVE_BOOL_TYPE])])
OVS_GREP_IFELSE([$KSRC/include/linux/if_vlan.h], [vlan_insert_tag_set_proto])
OVS_GREP_IFELSE([$KSRC/include/linux/if_vlan.h], [__vlan_insert_tag])
OVS_GREP_IFELSE([$KSRC/include/linux/if_vlan.h], [vlan_get_protocol])
+ OVS_GREP_IFELSE([$KSRC/include/linux/if_vlan.h], [skb_vlan_tagged])
+ OVS_GREP_IFELSE([$KSRC/include/linux/if_vlan.h], [eth_type_vlan])
OVS_GREP_IFELSE([$KSRC/include/linux/u64_stats_sync.h], [u64_stats_fetch_begin_irq])
;;
esac])
-dnl OVS_MAKE_HAS_IF([if-true], [if-false])
-dnl
-dnl Checks whether make has the GNU make $(if condition,then,else) extension.
-dnl Runs 'if-true' if so, 'if-false' otherwise.
-AC_DEFUN([OVS_CHECK_MAKE_IF],
- [AC_CACHE_CHECK(
- [whether ${MAKE-make} has GNU make \$(if) extension],
- [ovs_cv_gnu_make_if],
- [cat <<'EOF' > conftest.mk
-conftest.out:
- echo $(if x,y,z) > conftest.out
-.PHONY: all
-EOF
- rm -f conftest.out
- AS_ECHO(["$as_me:$LINENO: invoking ${MAKE-make} -f conftest.mk all:"]) >&AS_MESSAGE_LOG_FD 2>&1
- ${MAKE-make} -f conftest.mk conftest.out >&AS_MESSAGE_LOG_FD 2>&1
- AS_ECHO(["$as_me:$LINENO: conftest.out contains:"]) >&AS_MESSAGE_LOG_FD 2>&1
- cat conftest.out >&AS_MESSAGE_LOG_FD 2>&1
- result=`cat conftest.out`
- rm -f conftest.mk conftest.out
- if test "X$result" = "Xy"; then
- ovs_cv_gnu_make_if=yes
- else
- ovs_cv_gnu_make_if=no
- fi])])
-
-dnl OVS_CHECK_GNU_MAKE
-dnl
-dnl Checks whether make is GNU make (because Linux kernel Makefiles
-dnl only work with GNU make).
-AC_DEFUN([OVS_CHECK_GNU_MAKE],
- [AC_CACHE_CHECK(
- [whether ${MAKE-make} is GNU make],
- [ovs_cv_gnu_make],
- [rm -f conftest.out
- AS_ECHO(["$as_me:$LINENO: invoking ${MAKE-make} --version:"]) >&AS_MESSAGE_LOG_FD 2>&1
- ${MAKE-make} --version >conftest.out 2>&1
- cat conftest.out >&AS_MESSAGE_LOG_FD 2>&1
- result=`cat conftest.out`
- rm -f conftest.mk conftest.out
-
- case $result in # (
- GNU*) ovs_cv_gnu_make=yes ;; # (
- *) ovs_cv_gnu_make=no ;;
- esac])
- AM_CONDITIONAL([GNU_MAKE], [test $ovs_cv_gnu_make = yes])])
-
dnl OVS_CHECK_SPARSE_TARGET
dnl
dnl The "cgcc" script from "sparse" isn't very good at detecting the
dnl OVS_ENABLE_SPARSE
AC_DEFUN([OVS_ENABLE_SPARSE],
[AC_REQUIRE([OVS_CHECK_SPARSE_TARGET])
- AC_REQUIRE([OVS_CHECK_MAKE_IF])
AC_REQUIRE([OVS_SPARSE_EXTRA_INCLUDES])
: ${SPARSE=sparse}
AC_SUBST([SPARSE])
AC_CONFIG_COMMANDS_PRE(
- [if test $ovs_cv_gnu_make_if = yes; then
- CC='$(if $(C),env REAL_CC="'"$CC"'" CHECK="$(SPARSE) -I $(top_srcdir)/include/sparse $(SPARSEFLAGS) $(SPARSE_EXTRA_INCLUDES) " cgcc $(CGCCFLAGS),'"$CC"')'
- fi])])
+ [CC='$(if $(C),env REAL_CC="'"$CC"'" CHECK="$(SPARSE) -I $(top_srcdir)/include/sparse $(SPARSEFLAGS) $(SPARSE_EXTRA_INCLUDES) " cgcc $(CGCCFLAGS),'"$CC"')'])])
dnl OVS_PTHREAD_SET_NAME
dnl