diff mbox series

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

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

Commit Message

Github ODP bot June 30, 2017, 11 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: ceeab69f3af67701adb524c7b9757d19cefb1110
 ** Merge commit sha: bc5ee5a9b895a630b180cd264a55c8e4817de750
 **/
 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 d3059ffb..e4903c7a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,7 +209,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 dff10980..40385a7e 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 ])