summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorTimothy Redaelli <tredaelli@redhat.com>2018-12-14 11:45:20 +0100
committerIan Stokes <ian.stokes@intel.com>2018-12-17 10:22:10 +0000
commitfc3b425fa02f7f9159916410df1ea89939f33204 (patch)
tree116568973d0cabd904554e9e3a8bd4749869abcb /acinclude.m4
parent789aecd84041576cc6b7bb73cd337071ce0db0c6 (diff)
downloadopenvswitch-fc3b425fa02f7f9159916410df1ea89939f33204.tar.gz
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. Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m413
1 files changed, 13 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 92b4d6cbf..de457f956 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -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 (""),