From 5668f55e9eab2cb6cde91ba8a620d5d7a816fc71 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Thu, 17 Aug 2017 15:01:27 +0200 Subject: [PATCH] configure.ac: dpdk: append DPDK_CFLAGS to LIBDPDK_CPPFLAGS In some way it is bad naming in pkg-config - it is always some sort of conflated ldflags + libs and cppflags + cxxflags + cflags. Due to that to work correctly we append DPDK_CFLAGS (if defined by pkg-config) to LIBDPDK_CPPFLAGS as well. This intentionally does not add those CFLAGS specified by a user to allow full override and fully separated CLFAGS/CPPFLAGS if needed. Signed-off-by: Christian Ehrhardt --- configure.ac | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 667e944b..13e63404 100644 --- a/configure.ac +++ b/configure.ac @@ -2361,8 +2361,12 @@ AC_ARG_WITH([libdpdk], if test "x$with_libdpdk" != "xno"; then PKG_CHECK_MODULES([DPDK], [libdpdk]) + if test "x$LIBDPDK_CPPFLAGS" = "x"; then + LIBDPDK_CPPFLAGS="-I/usr/include/dpdk" + fi if test "x$LIBDPDK_CFLAGS" = "x"; then LIBDPDK_CFLAGS="$DPDK_CFLAGS" + LIBDPDK_CPPFLAGS="$LIBDPDK_CPPFLAGS $DPDK_CFLAGS" fi if test "x$LIBDPDK_LIBS" = "x"; then if test "x$DPDK_LIBS" != "x"; then @@ -2371,9 +2375,6 @@ if test "x$with_libdpdk" != "xno"; then LIBDPDK_LIBS="-ldpdk" fi fi - if test "x$LIBDPDK_CPPFLAGS" = "x"; then - LIBDPDK_CPPFLAGS="-I/usr/include/dpdk" - fi SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$LIBDPDK_CPPFLAGS $CPPFLAGS" SAVE_CFLAGS="$CFLAGS" -- 2.11.0