summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorCiara Loftus <ciara.loftus@intel.com>2016-08-04 11:44:40 +0100
committerDaniele Di Proietto <diproiettod@vmware.com>2016-08-04 17:01:42 -0700
commit435aadddc8167d6b5551c2884510776bca574ea6 (patch)
treeef8a5f015d227825072b995628322221dd21bf43 /acinclude.m4
parent8d38823bdf8b3fd4a71c5ab8c709899c9ef27edf (diff)
downloadopenvswitch-435aadddc8167d6b5551c2884510776bca574ea6.tar.gz
netdev-dpdk: Make libnuma dependencies optional
Prior to this patch, OVS with DPDK required the libnuma packages to build. This patch removes this dependency, making it only a requirement when the CONFIG_RTE_LIBRTE_VHOST_NUMA option is detected as enabled in the DPDK build. Signed-off-by: Ciara Loftus <ciara.loftus@intel.com> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m414
1 files changed, 12 insertions, 2 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index f02166d7d..bbbad238a 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -209,7 +209,17 @@ AC_DEFUN([OVS_CHECK_DPDK], [
[AC_DEFINE([VHOST_CUSE], [1], [DPDK vhost-cuse support enabled, vhost-user disabled.])
DPDK_EXTRA_LIB="-lfuse"])
- AC_SEARCH_LIBS([get_mempolicy],[numa],[],[AC_MSG_ERROR([unable to find libnuma, install the dependency package])])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM(
+ [
+ #include <rte_config.h>
+#if RTE_LIBRTE_VHOST_NUMA
+#error
+#endif
+ ], [])
+ ], [],
+ [AC_SEARCH_LIBS([get_mempolicy],[numa],[],[AC_MSG_ERROR([unable to find libnuma, install the dependency package])])
+ DPDK_EXTRA_LIB="-lnuma"])
# On some systems we have to add -ldl to link with dpdk
#
@@ -221,7 +231,7 @@ AC_DEFUN([OVS_CHECK_DPDK], [
DPDKLIB_FOUND=false
save_LIBS=$LIBS
for extras in "" "-ldl"; do
- LIBS="$DPDK_LIB $extras $save_LIBS $DPDK_EXTRA_LIB -lnuma"
+ LIBS="$DPDK_LIB $extras $save_LIBS $DPDK_EXTRA_LIB"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <rte_config.h>
#include <rte_eal.h>],