fi
# }}}
+# --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"
+ then
+ with_dpdk_path="$withval"
+ with_libdpdk="yes"
+ else
+ if test "x$withval" = "xno"
+ then
+ with_libdpdk="no (disabled)"
+ fi
+ fi
+], [with_libdpdk="no"])
+
+if test "x$with_libdpdk" = "xyes"
+then
+ RTE_BUILD="$with_dpdk_path"
+ DPDK_INCLUDE="$RTE_BUILD/include"
+ AC_CHECK_FILE([$DPDK_INCLUDE/rte_config.h], [LOCAL_DPDK_INSTALL=true],
+ [AC_CHECK_FILE([$DPDK_INCLUDE/dpdk/rte_config.h],
+ [DPDK_INCLUDE=$DPDK_INCLUDE/dpdk], [])])
+ DPDK_LIB_DIR="$RTE_BUILD/lib"
+ DPDK_EXTRA_LIB=""
+
+ SAVE_CFLAGS="$CFLAGS"
+ SAVE_LDFLAGS="$LDFLAGS"
+ CFLAGS="$CFLAGS -mavx -I$DPDK_INCLUDE"
+ if test "x$LOCAL_DPDK_INSTALL" != "xtrue"
+ then
+ LDFLAGS="$LDFLAGS -L$DPDK_LIB_DIR"
+ fi
+ FOUND_DPDK=false
+ SAVE_LIBS="$LIBS"
+ LIBS="$DPDK_LIB $LIBS"
+ AC_CHECK_LIB(dpdk, rte_eal_init,
+ [FOUND_DPDK=true],
+ [AC_MSG_ERROR([did not find dpdk libs ])])
+
+ CFLAGS="$SAVE_CFLAGS"
+ LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
+ if test "x$FOUND_DPDK" != "xtrue"
+ then
+ AC_MSG_ERROR([cannot link with dpdk in $DPDK_LIB_DIR])
+ fi
+ BUILD_WITH_DPDK_CFLAGS=""
+ AC_MSG_NOTICE([Checking for avx instructions])
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+[[
+#include <immintrin.h>
+]],
+[[
+__m128i zero = _mm_setzero_si128();
+]]
+ )],
+ [HAVE_AVX=true], [HAVE_AVX=false])
+ if test "x$HAVE_AVX" = "xtrue"
+ then
+ BUILD_WITH_DPDK_CFLAGS="-mavx "
+ AC_MSG_NOTICE([avx instructions supported])
+ fi
+
+ BUILD_WITH_DPDK_CFLAGS+="-fPIC -I$DPDK_INCLUDE"
+ if test "x$LOCAL_DPDK_INSTALL" != "xtrue"
+ then
+ BUILD_WITH_DPDK_LDFLAGS="-Wl,--no-as-needed"
+ else
+ BUILD_WITH_DPDK_LDFLAGS="-L$DPDK_LIB_DIR -Wl,--no-as-needed"
+ fi
+ BUILD_WITH_DPDK_LIBS="-Wl,-ldpdk"
+ AC_SUBST(BUILD_WITH_DPDK_CFLAGS)
+ AC_SUBST(BUILD_WITH_DPDK_LDFLAGS)
+ AC_SUBST(BUILD_WITH_DPDK_LIBS)
+fi
+# }}}
+
# --with-java {{{
with_java_home="$JAVA_HOME"
if test "x$with_java_home" = "x"
plugin_df="no"
plugin_disk="no"
plugin_drbd="no"
+plugin_dpdk="no"
plugin_entropy="no"
plugin_ethstat="no"
plugin_fhcount="no"
AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
+AC_PLUGIN([dpdkstat], [$with_libdpdk], [Stats & Status from DPDK])
AC_PLUGIN([drbd], [$plugin_drbd], [DRBD statistics])
AC_PLUGIN([email], [yes], [EMail statistics])
AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
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])
AC_MSG_RESULT([ curl_json . . . . . . $enable_curl_json])
AC_MSG_RESULT([ curl_xml . . . . . . $enable_curl_xml])
AC_MSG_RESULT([ dbi . . . . . . . . . $enable_dbi])
+ dpdkstat . . . . . . .$enable_dpdkstat
AC_MSG_RESULT([ df . . . . . . . . . $enable_df])
AC_MSG_RESULT([ disk . . . . . . . . $enable_disk])
AC_MSG_RESULT([ dns . . . . . . . . . $enable_dns])