From 81577dc22887debaf9b19bf1034a2887fb9069c7 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Fri, 20 Jun 2014 19:45:45 -0400 Subject: missing.h: add various network enums We used to check if e.g. IFLA_BOND_MAX is defined and provide fallback values in missing.h is it wasn't. But over time, various kernel versions added IFLA_* defines, so checking for IFLA_BOND_MAX is not enough if the kernel is new enough to have some of them but too old to have all. In case we detect that the latest known enum value is missing, #define most of them. https://bugs.freedesktop.org/show_bug.cgi?id=80095 --- configure.ac | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index a87a02656a..18e934c382 100644 --- a/configure.ac +++ b/configure.ac @@ -278,12 +278,33 @@ LIBS="$save_LIBS" AC_CHECK_FUNCS([fanotify_init fanotify_mark]) AC_CHECK_FUNCS([__secure_getenv secure_getenv]) -AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, LO_FLAGS_PARTSCAN], [], [], [[#include +AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, LO_FLAGS_PARTSCAN], + [], [], [[ +#include #include #include #include #include -#include ]]) +#include +]]) + +AC_CHECK_DECLS([IFLA_PHYS_PORT_ID, + IFLA_BOND_AD_INFO, + IFLA_VLAN_PROTOCOL, + IFLA_VXLAN_LOCAL6, + IFLA_IPTUN_6RD_RELAY_PREFIXLEN, + IFLA_BRIDGE_VLAN_INFO], +[], [], [[ +#include +#include +#include +#include +#include +#include +#include +#include +#include +]]) # This makes sure pkg.m4 is available. m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config]) @@ -928,10 +949,10 @@ AC_SUBST(DNS_SERVERS) # ------------------------------------------------------------------------------ have_networkd=no AC_ARG_ENABLE(networkd, AS_HELP_STRING([--disable-networkd], [disable networkd])) -if test "x$enable_networkd" != "xno"; then +AS_IF([test "x$enable_networkd" != "xno"], [ AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled]) have_networkd=yes -fi +]) AM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"]) # ------------------------------------------------------------------------------ -- cgit v1.2.3-54-g00ecf