@@ -13,16 +13,29 @@ AC_ARG_WITH([dpdk-path],
[DPDK_PATH="$withval"
pktio_dpdk_support=yes],[])
-AS_IF([test "x$DPDK_PATH" = "xsystem"],
- [DPDK_CPPFLAGS="-isystem/usr/include/dpdk"
- DPDK_LDFLAGS=""
- DPDK_PMD_PATH="`$CC --print-file-name=librte_pmd_null.a`"
- DPDK_PMD_PATH="`dirname "$DPDK_PMD_PATH"`"
- AS_IF([test "x$DPDK_PMD_PATH" = "x"],
- [AC_MSG_FAILURE([Could not locate system DPDK PMD directory])])],
- [DPDK_CPPFLAGS="-isystem $DPDK_PATH/include"
- DPDK_LDFLAGS="-L$DPDK_PATH/lib"
- DPDK_PMD_PATH="$DPDK_PATH/lib"])
+if test "x$DPDK_PATH" = "xsystem"; then
+ DPDK_CPPFLAGS="-isystem/usr/include/dpdk"
+ DPDK_LDFLAGS=""
+ DPDK_RPATH=""
+ DPDK_LIB_PATH="`$CC --print-file-name=libdpdk.so`"
+ if test "x$DPDK_LIB_PATH" = "x" ; then
+ DPDK_LIB_PATH="`$CC --print-file-name=libdpdk.a`"
+ else
+ DPDK_SHARED=yes
+ fi
+ AS_IF([test "x$DPDK_LIB_PATH" = "x"],
+ [AC_MSG_FAILURE([Could not locate system DPDK library directory])])
+ DPDK_PMD_PATH=`AS_DIRNAME(["$DPDK_PMD_PATH"])`
+else
+ DPDK_CPPFLAGS="-isystem $DPDK_PATH/include"
+ DPDK_LIB_PATH="$DPDK_PATH/lib"
+ DPDK_LDFLAGS="-L$DPDK_LIB_PATH"
+ DPDK_RPATH="-R$DPDK_LIB_PATH"
+ DPDK_PMD_PATH="$DPDK_LIB_PATH"
+ if test -r "$DPDK_LIB_PATH"/libdpdk.so ; then
+ DPDK_SHARED=yes
+ fi
+fi
##########################################################################
# Enable zero-copy DPDK pktio
@@ -45,7 +58,9 @@ then
ODP_DPDK_CHECK([$DPDK_CPPFLAGS], [$DPDK_LDFLAGS], [],
[AC_MSG_FAILURE([can't find DPDK])])
- ODP_DPDK_PMDS([$DPDK_PMD_PATH])
+ if test x$DPDK_SHARED != xyes ; then
+ ODP_DPDK_PMDS([$DPDK_PMD_PATH])
+ fi
AC_DEFINE([ODP_PKTIO_DPDK], [1],
[Define to 1 to enable DPDK packet I/O support])