Bug #5480 » configure.ac.patch
| configure.ac 2022-08-04 14:05:36.300008482 -0400 | ||
|---|---|---|
|
LIBPFRING=""
|
||
|
AC_CHECK_LIB(pfring, pfring_open,, LIBPFRING="no", [-lpcap])
|
||
|
AC_CHECK_LIB(pfring, pfring_recv_chunk,, LIBPFRING="no", [-lpcap])
|
||
|
AC_DEFINE([HAVE_PF_RING_FLOW_OFFLOAD], [1], [PF_RING bypass support enabled])
|
||
|
if test "$LIBPFRING" != "no"; then
|
||
|
STORECFLAGS="${CFLAGS}"
|
||
|
CFLAGS="${CFLAGS} -Werror"
|
||
|
AC_COMPILE_IFELSE(
|
||
|
[AC_LANG_PROGRAM(
|
||
|
[
|
||
|
#include <pfring.h>
|
||
|
],
|
||
|
[
|
||
|
pfring_recv_chunk(NULL, NULL, 0, 0);
|
||
|
])],
|
||
|
[pfring_recv_chunk="yes"],
|
||
|
[pfring_recv_chunk="no"])
|
||
|
CFLAGS="${STORECFLAGS}"
|
||
|
if test "x$pfring_recv_chunk" != "xyes"; then
|
||
|
if test "x$enable_pfring" = "xyes"; then
|
||
|
echo
|
||
|
echo " ERROR! --enable-pfring was passed but the library version is < 6, go get it"
|
||
|
echo " from http://www.ntop.org/products/pf_ring/"
|
||
|
echo
|
||
|
exit 1
|
||
|
fi
|
||
|
fi
|
||
|
AC_COMPILE_IFELSE(
|
||
|
[AC_LANG_SOURCE([[
|
||
|
#include <pfring.h>
|
||
|
#ifndef PF_RING_FLOW_OFFLOAD
|
||
|
# error PF_RING_FLOW_OFFLOAD not defined
|
||
|
#endif
|
||
|
]])],
|
||
|
[
|
||
|
AC_DEFINE([HAVE_PF_RING_FLOW_OFFLOAD], [1], [PF_RING bypass support enabled])
|
||
|
],
|
||
|
[
|
||
|
echo
|
||
|
echo " Warning! Pfring hw bypass not supported by this library version < 7,"
|
||
|
echo " please upgrade to a newer version to use this feature."
|
||
|
echo
|
||
|
echo " Continuing for now with hw bypass support disabled..."
|
||
|
echo
|
||
|
])
|
||
|
echo " Found pfring, most likely :)"
|
||
|
else
|
||
|
if test "x$enable_pfring" = "xyes"; then
|
||
|
echo
|
||