blob: 96bbc5b06a4d4f496ba6c09be0319818ffec2e07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
##########################################################################
# Enable DPDK support
##########################################################################
AC_ARG_ENABLE([dpdk_support],
[ --enable-dpdk-support include dpdk IO support],
[if test x$enableval = xyes; then
pktio_dpdk_support=yes
fi])
##########################################################################
# Set optional DPDK path
##########################################################################
AC_ARG_WITH([dpdk-path],
AC_HELP_STRING([--with-dpdk-path=DIR path to dpdk build directory],
[(or in the default path if not specified).]),
[DPDK_PATH=$withval
AM_CPPFLAGS="$AM_CPPFLAGS -msse4.2 -isystem $DPDK_PATH/include"
AM_LDFLAGS="$AM_LDFLAGS -L$DPDK_PATH/lib"
LIBS="$LIBS -ldpdk -ldl -lpcap"
pktio_dpdk_support=yes],[])
##########################################################################
# Save and set temporary compilation flags
##########################################################################
OLD_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
##########################################################################
# Check for DPDK availability
##########################################################################
if test x$pktio_dpdk_support = xyes
then
AC_CHECK_HEADERS([rte_config.h], [],
[AC_MSG_FAILURE(["can't find DPDK header"])])
ODP_CFLAGS="$ODP_CFLAGS -DODP_PKTIO_DPDK"
else
pktio_dpdk_support=no
fi
##########################################################################
# Restore old saved variables
##########################################################################
CPPFLAGS=$OLD_CPPFLAGS
|