[v1,1/1] odp_dpdk.m4: fix detection of system libraries

Message ID 1518807607-25131-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • odp_dpdk.m4: fix detection of system libraries
Related show

Commit Message

Github ODP bot Feb. 16, 2018, 7 p.m.
From: Josep Puigdemont <josep.puigdemont@linaro.org>


Signed-off-by: Josep Puigdemont <josep.puigdemont@linaro.org>

---
/** Email created from pull request 489 (joseppc:fix-config)
 ** https://github.com/Linaro/odp/pull/489
 ** Patch: https://github.com/Linaro/odp/pull/489.patch
 ** Base sha: 6e213fbae7f16558e572da39704927f107c01f80
 ** Merge commit sha: b46bb7c36a24023e14284075e146a5c15ea66b8b
 **/
 m4/odp_dpdk.m4 | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Patch

diff --git a/m4/odp_dpdk.m4 b/m4/odp_dpdk.m4
index bf3dfccfa..0050fc4b4 100644
--- a/m4/odp_dpdk.m4
+++ b/m4/odp_dpdk.m4
@@ -108,30 +108,30 @@  CPPFLAGS=$OLD_CPPFLAGS
 # Check for DPDK availability
 AC_DEFUN([ODP_DPDK], [dnl
 AS_IF([test "x$1" = "xsystem"], [dnl
-    DPDK_CPPFLAGS="-isystem/usr/include/dpdk"
+    DPDK_CPPFLAGS="-isystem /usr/include/dpdk"
     DPDK_LDFLAGS=""
     DPDK_LIB_PATH="`$CC --print-file-name=libdpdk.so`"
-    if test "x$DPDK_LIB_PATH" = "x" ; then
+    if test "$DPDK_LIB_PATH" = "libdpdk.so" ; then
 	DPDK_LIB_PATH="`$CC --print-file-name=libdpdk.a`"
+        AS_IF([test "$DPDK_LIB_PATH" = "libdpdk.a"],
+           [AC_MSG_FAILURE([Could not locate system DPDK library directory])])
     else
 	DPDK_SHARED=yes
     fi
-    AS_IF([test "x$DPDK_LIB_PATH" = "x"],
-	  [AC_MSG_FAILURE([Could not locate system DPDK library directory])])
-    DPDK_PMD_PATH=`AS_DIRNAME(["$DPDK_PMD_PATH"])`
+    DPDK_LIB_PATH=`AS_DIRNAME(["$DPDK_LIB_PATH"])`
 ], [dnl
     DPDK_CPPFLAGS="-isystem $1/include"
     DPDK_LIB_PATH="$1/lib"
     DPDK_LDFLAGS="-L$DPDK_LIB_PATH"
-    DPDK_PMD_PATH="$DPDK_LIB_PATH"
     if test -r "$DPDK_LIB_PATH"/libdpdk.so ; then
 	DPDK_RPATH="-Wl,-rpath,$DPDK_LIB_PATH"
 	DPDK_RPATH_LT="-R$DPDK_LIB_PATH"
 	DPDK_SHARED=yes
     fi
 ])
+DPDK_PMD_PATH="$DPDK_LIB_PATH"
 AS_IF([test "x$DPDK_SHARED" = "xyes"],
-      [AC_MSG_NOTICE([Using shared DPDK library found at $DPDK_PMD_PATH])],
-      [AC_MSG_NOTICE([Using static DPDK library found at $DPDK_PMD_PATH])])
+      [AC_MSG_NOTICE([Using shared DPDK library found at $DPDK_LIB_PATH])],
+      [AC_MSG_NOTICE([Using static DPDK library found at $DPDK_LIB_PATH])])
 _ODP_DPDK_CHECK([$DPDK_CPPFLAGS], [$DPDK_LDFLAGS], [$2], [$3])
 ])