Commit 593f7aab authored by Tom Barbette's avatar Tom Barbette

Test if zlib is present before giving dpdk's -lz linked PMD

parent 750dbd90
Pipeline #560 passed with stage
in 14 minutes and 44 seconds
......@@ -662,6 +662,7 @@ XML2CLICK
PROPER_LIBS
PROPER_INCLUDES
HAVE_NETMAP_PACKET_POOL
HAVE_ZLIB
NETMAP_INCLUDES
NUMA_INCLUDES
PCAP_LIBS
......@@ -11035,6 +11036,54 @@ $as_echo "#define HAVE_NETMAP 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zError in -lz" >&5
$as_echo_n "checking for zError in -lz... " >&6; }
if ${ac_cv_lib_z_zError+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lz $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char zError ();
int
main ()
{
return zError ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_z_zError=yes
else
ac_cv_lib_z_zError=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_zError" >&5
$as_echo "$ac_cv_lib_z_zError" >&6; }
if test "x$ac_cv_lib_z_zError" = xyes; then :
ac_have_zlib=yes
else
ac_have_zlib=no
fi
if test "x$ac_have_zlib" = xyes; then
HAVE_ZLIB=y
fi
if test "$HAVE_PCAP" != yes -a "$HAVE_NETMAP" != yes -a "$ac_cv_under_linux" != yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
=========================================
......@@ -13774,19 +13823,18 @@ if test "x$enable_analysis" = xyes; then
provisions="$provisions analysis"
fi
if test "x$enable_dpdk" = xyes; then
provisions="$provisions dpdk"
if test "x$enable_auto_batch" = xyes; then
provisions="$provisions autobatch"
fi
if test "x$enable_batch" = xyes; then
provisions="$provisions batch"
fi
if test "x$enable_user_timestamp" = xyes; then
provisions="$provisions usertimestamp"
if test "x$enable_dpdk" = xyes; then
provisions="$provisions dpdk"
fi
if test "x$enable_experimental" = xyes; then
provisions="$provisions experimental"
fi
......@@ -13833,6 +13881,10 @@ if test "x$enable_user_multithread" = xyes; then
provisions="$provisions umultithread"
fi
if test "x$enable_user_timestamp" = xyes; then
provisions="$provisions usertimestamp"
fi
if test "x$enable_wifi" = xyes; then
provisions="$provisions wifi"
fi
......
......@@ -1311,6 +1311,7 @@ if test "$enable_userlevel" = yes; then
CLICK_CHECK_LIBPCAP
CLICK_CHECK_NUMA
CLICK_CHECK_NETMAP
CLICK_CHECK_ZLIB
if test "$HAVE_PCAP" != yes -a "$HAVE_NETMAP" != yes -a "$ac_cv_under_linux" != yes; then
AC_MSG_WARN([
......
......@@ -517,6 +517,19 @@ AC_DEFUN([CLICK_CHECK_NUMA], [
AC_SUBST(NUMA_INCLUDES)
])
dnl
dnl CLICK_CHECK_ZLIB
dnl Check if zlib is available.
dnl
AC_DEFUN([CLICK_CHECK_ZLIB], [
AC_CHECK_LIB(z, zError, [ac_have_zlib=yes], [ac_have_zlib=no])
if test "x$ac_have_zlib" = xyes; then
AC_SUBST([HAVE_ZLIB], [y])
fi
])
dnl
dnl CLICK_PROG_INSTALL
dnl Substitute both INSTALL and INSTALL_IF_CHANGED.
......
......@@ -108,6 +108,7 @@ RTE_VER_MAJOR = @RTE_VER_MAJOR@
RTE_VER_MINOR = @RTE_VER_MINOR@
RTE_VER_YEAR = @RTE_VER_YEAR@
RTE_VER_MONTH = @RTE_VER_MONTH@
HAVE_ZLIB = @HAVE_ZLIB@
include dpdk.mk
EXTRA_DRIVER_OBJS := dpdkdevice.o $(EXTRA_DRIVER_OBJS)
endif
......
......@@ -73,7 +73,9 @@ ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n)
_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lfuse
endif
ifeq ($(HAVE_ZLIB),y)
_LDLIBS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += -lz
endif
_LDLIBS-y += -Wl,--start-group
......@@ -113,7 +115,11 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += -lrte_pmd_virtio
else
_LDLIBS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += -lrte_pmd_virtio_uio
endif
ifeq ($(HAVE_ZLIB),y)
_LDLIBS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += -lrte_pmd_bnx2x -lz
endif
_LDLIBS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += -lrte_pmd_bnxt
_LDLIBS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += -lrte_pmd_cxgbe
_LDLIBS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += -lrte_pmd_enic
......@@ -125,7 +131,11 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += -lrte_pmd_ena
_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -lrte_pmd_mlx4 -libverbs
_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += -lrte_pmd_mlx5 -libverbs
_LDLIBS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD) += -lrte_pmd_mpipe -lgxio
ifeq ($(HAVE_ZLIB),y)
_LDLIBS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += -lrte_pmd_qede -lz
endif
_LDLIBS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += -lrte_pmd_thunderx_nicvf -lm
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += -lrte_pmd_szedata2
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_RING) += -lrte_pmd_ring
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment