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 <christian.ehrhardt@canonical.com>
if test "x$with_libdpdk" != "xno"; then
PKG_CHECK_MODULES([DPDK], [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"
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
fi
if test "x$LIBDPDK_LIBS" = "x"; then
if test "x$DPDK_LIBS" != "x"; then
LIBDPDK_LIBS="-ldpdk"
fi
fi
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"
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$LIBDPDK_CPPFLAGS $CPPFLAGS"
SAVE_CFLAGS="$CFLAGS"