[v5,17/25] configure: AC_DEFINE(ODP_PKTIO_DPDK)/AC_DEFINE(ODP_DPDK_ZERO_COPY)

Message ID 1503396009-8350-18-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • [v5,1/25] configure: move configure header to include dir
Related show

Commit Message

Github ODP bot Aug. 22, 2017, 10 a.m.
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Use Autoconf macros instead of defining macro by hand.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 127 (lumag:improve-build)
 ** https://github.com/Linaro/odp/pull/127
 ** Patch: https://github.com/Linaro/odp/pull/127.patch
 ** Base sha: aecb3c7a442b426761f1e6f43308a1e9ea709ef3
 ** Merge commit sha: 86e036501e05c61e5570d0908af382a61c2d4e89
 **/
 platform/linux-generic/m4/odp_dpdk.m4 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch

diff --git a/platform/linux-generic/m4/odp_dpdk.m4 b/platform/linux-generic/m4/odp_dpdk.m4
index cebf1028..b6554165 100644
--- a/platform/linux-generic/m4/odp_dpdk.m4
+++ b/platform/linux-generic/m4/odp_dpdk.m4
@@ -47,7 +47,11 @@  then
     done
     AS_VAR_APPEND([DPDK_PMDS], [--no-whole-archive])
 
-    ODP_CFLAGS="$ODP_CFLAGS -DODP_PKTIO_DPDK -DODP_DPDK_ZERO_COPY=$zero_copy"
+    AC_DEFINE([ODP_PKTIO_DPDK], [1],
+	      [Define to 1 to enable DPDK packet I/O support])
+    AC_DEFINE_UNQUOTED([ODP_DPDK_ZERO_COPY], [$zero_copy],
+	      [Define to 1 to enable DPDK zero copy support])
+
     DPDK_LIBS="-L$DPDK_PATH/lib -ldpdk -lpthread -ldl -lpcap -lm"
     AC_SUBST([DPDK_CPPFLAGS])
     AC_SUBST([DPDK_LIBS])