summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6e2f426)
raw | patch | inline | side by side (parent: 6e2f426)
author | Maryam Tahhan <maryam.tahhan@intel.com> | |
Mon, 2 May 2016 19:04:11 +0000 (20:04 +0100) | ||
committer | Kim Jones <kim-marie.jones@intel.com> | |
Thu, 28 Jul 2016 12:19:27 +0000 (13:19 +0100) |
Fix configuration.ac and src/Makefile based on comments from pull
request review.
* Removed unnecessary libs.
* Removed unnecessary compilation flags.
* Fixed indentation in configure.ac
* Remove duplicate AC_CHECK_LIB check.
* Compare FOUND_DPDK with xtrue explicitly.
* Change standalone instances of dpdk to libdpdk.
* Add BUILD_WITH_DPDK_LIBS to dpdkstat_la_LIBADD.
Change-Id: I27b0c888f81cac3219fdc97174e31770dbd5e746
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
request review.
* Removed unnecessary libs.
* Removed unnecessary compilation flags.
* Fixed indentation in configure.ac
* Remove duplicate AC_CHECK_LIB check.
* Compare FOUND_DPDK with xtrue explicitly.
* Change standalone instances of dpdk to libdpdk.
* Add BUILD_WITH_DPDK_LIBS to dpdkstat_la_LIBADD.
Change-Id: I27b0c888f81cac3219fdc97174e31770dbd5e746
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
configure.ac | patch | blob | history | |
src/Makefile.am | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index 94ed6e77444ad1fc06620a34ee2e9d351ae37b99..ab8135f08773d7453a1ade7cf400c877d33f85a4 100644 (file)
--- a/configure.ac
+++ b/configure.ac
# --with-libdpdk {{{
AC_ARG_WITH(libdpdk, [AS_HELP_STRING([--with-libdpdk@<:@=PREFIX@:>@], [Path to the DPDK build directory.])],
[
- if test "x$withval" != "xno" && test "x$withval" != "xyes"
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"
then
with_dpdk_path="$withval"
with_libdpdk="yes"
DPDK_INCLUDE="$RTE_BUILD/include/dpdk"
DPDK_LIB_DIR="$RTE_BUILD/lib"
DPDK_LIB="-ldpdk"
- DPDK_EXTRA_LIB="-ldl -lpthread -lrt -lm"
SAVE_CFLAGS="$CFLAGS"
SAVE_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$DPDK_LIB_DIR"
- CFLAGS="$CFLAGS -I$DPDK_INCLUDE -fpic"
+ CFLAGS="$CFLAGS -I$DPDK_INCLUDE"
FOUND_DPDK=false
SAVE_LIBS="$LIBS"
- LIBS="$LIBS $DPDK_LIB $DPDK_EXTRA_LIB"
- AC_CHECK_LIB(dpdk, rte_eal_init,
- [with_libdpdk="yes"],
- [with_libdpdk="no"])
+ LIBS="$LIBS $DPDK_LIB"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[
CFLAGS="$SAVE_CFLAGS"
LDFLAGS="$SAVE_LDFLAGS"
LIBS="$SAVE_LIBS"
- if $FOUND_DPDK; then :; else
- AC_MSG_ERROR([cannot link with dpdk])
+ if test "x$FOUND_DPDK" != "xtrue"
+ then
+ AC_MSG_ERROR([cannot link with dpdk])
fi
DPDK_LDFLAGS="-ldpdk"
- BUILD_WITH_DPDK_CFLAGS="-I$DPDK_INCLUDE -fPIC"
+ BUILD_WITH_DPDK_CFLAGS="-I$DPDK_INCLUDE"
BUILD_WITH_DPDK_LDFLAGS="-L$DPDK_LIB_DIR"
- BUILD_WITH_DPDK_LIBS="$DPDK_LDFLAGS -ldl -lpthread -lrt -lm"
+ BUILD_WITH_DPDK_LIBS="$DPDK_LDFLAGS"
AC_SUBST(BUILD_WITH_DPDK_CFLAGS)
AC_SUBST(BUILD_WITH_DPDK_LDFLAGS)
AC_SUBST(BUILD_WITH_DPDK_LIBS)
- AC_DEFINE_UNQUOTED(DPDK, [1], [System uses DPDK.])
fi
# }}}
AC_MSG_RESULT([ YACC . . . . . . . . $YACC])
AC_MSG_RESULT([ YFLAGS . . . . . . . $YFLAGS])
AC_MSG_RESULT()
- dpdk . . . . . . . . $with_libdpdk
AC_MSG_RESULT([ Libraries:])
AC_MSG_RESULT([ intel mic . . . . . . $with_mic])
AC_MSG_RESULT([ libaquaero5 . . . . . $with_libaquaero5])
AC_MSG_RESULT([ libatasmart . . . . . $with_libatasmart])
AC_MSG_RESULT([ libcurl . . . . . . . $with_libcurl])
AC_MSG_RESULT([ libdbi . . . . . . . $with_libdbi])
+ libdpdk . . . . . . . $with_libdpdk
AC_MSG_RESULT([ libesmtp . . . . . . $with_libesmtp])
AC_MSG_RESULT([ libganglia . . . . . $with_libganglia])
AC_MSG_RESULT([ libgcrypt . . . . . . $with_libgcrypt])
diff --git a/src/Makefile.am b/src/Makefile.am
index 8d9016f012aecfc6021fe11134ce334ace6b8979..1b56c11f02146baef00898f900b4ef88b999a995 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
pkglib_LTLIBRARIES += dpdkstat.la
dpdkstat_la_SOURCES = dpdkstat.c
dpdkstat_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_DPDK_CFLAGS)
-dpdkstat_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_DPDK_LDFLAGS) $(BUILD_WITH_DPDK_LIBS)
-dpdkstat_la_LIBADD = -ldl -lpthread -lrt -lm
+dpdkstat_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_DPDK_LDFLAGS)
+dpdkstat_la_LIBADD = $(BUILD_WITH_DPDK_LIBS)
endif
if BUILD_PLUGIN_DRBD