aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/m4/odp_pcap.m4
diff options
context:
space:
mode:
authorMaxim Uvarov <maxim.uvarov@linaro.org>2015-10-26 16:48:07 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-10-26 17:29:47 +0300
commit05e6b05273ba07ee3ab8e48f55a2cc972287cb2c (patch)
tree666ab0d0b1c850b525806ecec3a35b9292f22455 /platform/linux-generic/m4/odp_pcap.m4
parent00af9c28e62d8eeea4f769c9e4b4a74184616086 (diff)
parent78872639460a3f454fa69a72f7ea5ab4c547a2b8 (diff)
Merge branch 'master' into api-next
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: example/classifier/odp_classifier.c include/odp/api/config.h include/odp/api/cpu.h include/odp/api/cpumask.h include/odp/api/packet_io.h platform/linux-generic/Makefile.am platform/linux-generic/arch/linux/odp_cpu_cycles.c test/performance/odp_scheduling.c test/validation/classification/odp_classification_testsuites.h test/validation/system/system.c
Diffstat (limited to 'platform/linux-generic/m4/odp_pcap.m4')
-rw-r--r--platform/linux-generic/m4/odp_pcap.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/platform/linux-generic/m4/odp_pcap.m4 b/platform/linux-generic/m4/odp_pcap.m4
new file mode 100644
index 000000000..734b79005
--- /dev/null
+++ b/platform/linux-generic/m4/odp_pcap.m4
@@ -0,0 +1,15 @@
+#########################################################################
+# Check for libpcap availability
+#########################################################################
+have_pcap=no
+AC_CHECK_HEADER(pcap/pcap.h,
+ [AC_CHECK_HEADER(pcap/bpf.h,
+ [AC_CHECK_LIB(pcap, pcap_open_offline, have_pcap=yes, [])],
+ [])],
+[])
+
+AM_CONDITIONAL([HAVE_PCAP], [test $have_pcap = yes])
+if test $have_pcap == yes; then
+ AM_CFLAGS="$AM_CFLAGS -DHAVE_PCAP"
+ LIBS="$LIBS -lpcap"
+fi