diff mbox series

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

Message ID 1498888823-4065-9-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v4,1/9] pkgconfig: provide minimal proper static linking flags | expand

Commit Message

Github ODP bot July 1, 2017, 6 a.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: eee6b6add9a03184bf2f3198f07e983bb88c0e0a
 **/
 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 efe5777e..23d03ea3 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 ])