diff options
author | 2016-04-01 12:34:24 +0200 | |
---|---|---|
committer | 2016-04-01 16:38:33 +0200 | |
commit | aa04a0ff8ee9aa7779b30e936f7fe1304c613d57 (patch) | |
tree | 6df3e0c635db20a4569ad651e9cfdfb4be76b086 /vpp/configure.ac | |
parent | 102ec52bc41c630f011884250e0f20ea49ac6d33 (diff) |
Add option to link DPDK dynamically
Change-Id: Ie2b47f9020c8260b199d141103318a0261e16832
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vpp/configure.ac')
-rw-r--r-- | vpp/configure.ac | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/vpp/configure.ac b/vpp/configure.ac index 9a2d52e8..5b72eea6 100644 --- a/vpp/configure.ac +++ b/vpp/configure.ac @@ -11,6 +11,11 @@ AC_ARG_WITH(dpdk, [with_dpdk=1], [with_dpdk=0]) +AC_ARG_ENABLE(dpdk-shared, + AC_HELP_STRING([--enable-dpdk-shared],[Link with DPDK shared lib]), + [enable_dpdk_shared=1], + [enable_dpdk_shared=0]) + AC_ARG_WITH(ipsec, AC_HELP_STRING([--without-ipsec],[Disable ipsec]), [with_ipsec=0], @@ -27,7 +32,22 @@ AC_ARG_WITH(ipv6sr, [with_ipv6sr=1]) AM_CONDITIONAL(WITH_DPDK, test "$with_dpdk" = "1") -AC_SUBST(DPDK,[-DDPDK=${with_dpdk}]) +AM_CONDITIONAL(ENABLE_DPDK_SHARED, test "$enable_dpdk_shared" = "1") +AC_SUBST(DPDK,["-DDPDK=${with_dpdk} -DDPDK_SHARED_LIB=${enable_dpdk_shared}"]) + +AM_COND_IF( + [ENABLE_DPDK_SHARED], + [ + AC_CHECK_HEADERS( + [rte_config.h], + [], [AC_MSG_ERROR([DPDK header files not found])], + ) + AC_CHECK_LIB( + [dpdk], [rte_eal_init], + [], [AC_MSG_ERROR([DPDK shared library not found])], + ) + ], +) AM_CONDITIONAL(WITH_IPSEC, test "$with_ipsec" = "1") AC_SUBST(IPSEC,[-DIPSEC=${with_ipsec}]) |