acinclude: Include libmnl when needed
DPDK 18.11 uses libmnl when MLX5 PMD is enabled.
This commit makes OVS to link to libmnl when MLX5 PMD is enabled on
DPDK.
@@ -287,6 +287,19 @@ AC_DEFUN([OVS_CHECK_DPDK], [
[AC_DEFINE([DPDK_PDUMP], [1], [DPDK pdump enabled in OVS.])])
])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM(
+ [
+ #include <rte_config.h>
+#if RTE_LIBRTE_MLX5_PMD
+#error
+#endif
+ ], [])
+ ], [],
+ [AC_SEARCH_LIBS([mnl_attr_put],[mnl],[],[AC_MSG_ERROR([unable to find libmnl, install the dependency package])])
+ DPDK_EXTRA_LIB="-lmnl"
+ AC_DEFINE([DPDK_MNL], [1], [MLX5 PMD detected in DPDK.])])
+
# On some systems we have to add -ldl to link with dpdk
#
# This code, at first, tries to link without -ldl (""),
