diff mbox series

[v2,8/9] linux-gen: stop poisoning CPPFLAGS with Netmap flags

Message ID 1497391207-13288-9-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [v2,1/9] pkgconfig: provide minimal proper static linking flags | expand

Commit Message

Github ODP bot June 13, 2017, 10 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Instead of poisoning global AM_CPPFLAGS with Netmap flags,
use fine-grained controls for compiling with Netmap.

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

---
/** Email created from pull request 45 (lumag:m4)
 ** https://github.com/Linaro/odp/pull/45
 ** Patch: https://github.com/Linaro/odp/pull/45.patch
 ** Base sha: 7cf390d11e69f6b677e6fbfd6414944737406fc3
 ** Merge commit sha: 3808f2b5af9d034f6157eb2c7eec543ee8055fbf
 **/
 configure.ac                            | 1 -
 platform/linux-generic/Makefile.am      | 1 +
 platform/linux-generic/m4/odp_netmap.m4 | 7 +++++--
 3 files changed, 6 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index cf824d3c..56761f9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -208,7 +208,6 @@  AC_SUBST([testdir])
 ##########################################################################
 # Set conditionals as computed within platform specific files
 ##########################################################################
-AM_CONDITIONAL([netmap_support], [test x$netmap_support = xyes ])
 AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"])
 AM_CONDITIONAL([test_installdir], [test "$testdir" != ""])
 AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ])
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 7928f54a..b0fac238 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -13,6 +13,7 @@  AM_CFLAGS +=  -D_ODP_PKTIO_IPC
 
 AM_CPPFLAGS +=  $(OPENSSL_CPPFLAGS)
 AM_CPPFLAGS +=  $(DPDK_CPPFLAGS)
+AM_CPPFLAGS +=  $(NETMAP_CPPFLAGS)
 
 include_HEADERS = \
 		  $(top_srcdir)/include/odp.h \
diff --git a/platform/linux-generic/m4/odp_netmap.m4 b/platform/linux-generic/m4/odp_netmap.m4
index 880e9d58..dea80626 100644
--- a/platform/linux-generic/m4/odp_netmap.m4
+++ b/platform/linux-generic/m4/odp_netmap.m4
@@ -15,14 +15,14 @@  AC_ARG_WITH([netmap-path],
 AC_HELP_STRING([--with-netmap-path=DIR   path to netmap root directory],
                [(or in the default path if not specified).]),
     [NETMAP_PATH=$withval
-    AM_CPPFLAGS="$AM_CPPFLAGS -isystem $NETMAP_PATH/sys"
+    NETMAP_CPPFLAGS="-isystem $NETMAP_PATH/sys"
     netmap_support=yes],[])
 
 ##########################################################################
 # Save and set temporary compilation flags
 ##########################################################################
 OLD_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
+CPPFLAGS="$NETMAP_CPPFLAGS $CPPFLAGS"
 
 ##########################################################################
 # Check for netmap availability
@@ -32,6 +32,7 @@  then
     AC_CHECK_HEADERS([net/netmap_user.h], [],
         [AC_MSG_FAILURE(["can't find netmap header"])])
     ODP_CFLAGS="$ODP_CFLAGS -DODP_NETMAP"
+    AC_SUBST([NETMAP_CPPFLAGS])
 else
     netmap_support=no
 fi
@@ -40,3 +41,5 @@  fi
 # Restore old saved variables
 ##########################################################################
 CPPFLAGS=$OLD_CPPFLAGS
+
+AM_CONDITIONAL([netmap_support], [test x$netmap_support = xyes ])