@@ -210,7 +210,6 @@ AC_SUBST([testdir])
# Set conditionals as computed within platform specific files
##########################################################################
AM_CONDITIONAL([netmap_support], [test x$netmap_support = xyes ])
-AM_CONDITIONAL([HAVE_PCAP], [test $have_pcap = yes])
AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"])
AM_CONDITIONAL([test_installdir], [test "$testdir" != ""])
AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ])
@@ -7,5 +7,5 @@ Name: libodp-linux
Description: The ODP packet processing engine
Version: @PKGCONFIG_VERSION@
Libs: -L${libdir} -lodp-linux @DPDK_LIBS@
-Libs.private: @OPENSSL_STATIC_LIBS@ @DPDK_PMDS@ @DPDK_LIBS@ -lpcap @PTHREAD_LIBS@ -lrt -lpthread @ATOMIC_LIBS@
+Libs.private: @OPENSSL_STATIC_LIBS@ @DPDK_PMDS@ @DPDK_LIBS@ @PCAP_LIBS@ @PTHREAD_LIBS@ -lrt -lpthread @ATOMIC_LIBS@
Cflags: -I${includedir}
@@ -260,6 +260,10 @@ __LIB__libodp_linux_la_LIBADD = $(ATOMIC_LIBS)
__LIB__libodp_linux_la_LIBADD += $(OPENSSL_LIBS)
__LIB__libodp_linux_la_LIBADD += $(DPDK_LIBS) $(DPDK_PMDS)
+if HAVE_PCAP
+__LIB__libodp_linux_la_LIBADD += $(PCAP_LIBS)
+endif
+
# Create symlink for ABI header files. Application does not need to use the arch
# specific include path for installed files.
install-data-hook:
@@ -9,6 +9,10 @@ AC_CHECK_HEADER(pcap/pcap.h,
[])
if test $have_pcap == yes; then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_PCAP"
- LIBS="$LIBS -lpcap"
+ ODP_CFLAGS="$AM_CFLAGS -DHAVE_PCAP"
+ PCAP_LIBS="-lpcap"
fi
+
+AC_SUBST([PCAP_LIBS])
+
+AM_CONDITIONAL([HAVE_PCAP], [test $have_pcap = yes])