dpdk: edit configure.ac to include DPDK compilation option

Add a build flag --enable-dpdk to support DPDK parts in the source code.
pull/6708/head
Lukas Sismis 4 years ago committed by Victor Julien
parent 142a579971
commit fcfee6994e

@ -1331,6 +1331,46 @@
[[#include <linux/net_tstamp.h>]])
])
# DPDK support
AC_ARG_ENABLE(dpdk,
AS_HELP_STRING([--enable-dpdk], [Enable DPDK support [default=no]]),
[enable_dpdk=$enableval],[enable_dpdk=no])
AS_IF([test "x$enable_dpdk" = "xyes"], [
AC_CHECK_LIB(numa, numa_available,, [numa_found="no"])
if test "$numa_found" = "no"; then
echo
echo " ERROR! libnuma not found by pkg-config, go get it"
echo " from http://github.com/numactl/numactl or your distribution:"
echo " Ubuntu: apt-get install libnuma-dev"
echo " Fedora: dnf install numactl-devel"
echo " CentOS/RHEL: yum install numactl-devel"
echo
exit 1
fi
AC_DEFINE([HAVE_DPDK],[1],(DPDK support enabled))
PKG_CHECK_EXISTS(libdpdk >= 20.11, [pkgconfig_libdpdk_above20=yes], )
if test "$pkgconfig_libdpdk_above20" = "yes"; then
AC_DEFINE([HAVE_STRLCAT],[1],[STRLCAT is predefined by DPDK 20.11+])
AC_DEFINE([HAVE_STRLCPY],[1],[STRLCPY is predefined by DPDK 20.11+])
fi
PKG_CHECK_EXISTS(libdpdk >= 19.11, , [with_pkgconfig_libdpdk=no])
if test "$with_pkgconfig_libdpdk" = "no"; then
echo
echo " ERROR! libdpdk >= 19.11 not found by pkg-config, go get it"
echo " from https://www.dpdk.org/ or your distribution:"
echo
echo " Ubuntu: apt-get install dpdk-dev"
echo " Fedora: dnf install dpdk-devel"
echo " CentOS/RHEL: yum install dpdk-devel"
echo
exit 1
fi
CFLAGS="${CFLAGS} `pkg-config --cflags libdpdk`"
LIBS="${LIBS} -Wl,-R,`pkg-config --libs-only-L libdpdk | cut -c 3-` -lnuma `pkg-config --libs libdpdk`"
])
# Netmap support
AC_ARG_ENABLE(netmap,
AS_HELP_STRING([--enable-netmap], [Enable Netmap support]),[enable_netmap=$enableval],[enable_netmap=no])
@ -2518,6 +2558,7 @@ AC_OUTPUT
SURICATA_BUILD_CONF="Suricata Configuration:
AF_PACKET support: ${enable_af_packet}
DPDK support: ${enable_dpdk}
eBPF support: ${enable_ebpf}
XDP support: ${have_xdp}
PF_RING support: ${enable_pfring}

Loading…
Cancel
Save