diff options
author | Matias Elo <matias.elo@nokia.com> | 2019-05-16 12:56:48 +0300 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2019-05-28 10:53:12 +0300 |
commit | 78364dc1d53a1a4c4918ce0a82d02fe56f0abb54 (patch) | |
tree | 212bffe465b2a894ffde1fac84bb1717764405d9 /platform/linux-generic/m4 | |
parent | 9bdd6ed64a1603f15c869be637093abb88f196a8 (diff) |
configure: add option to disable pcap pktio support
Add '--without-pcap' option to explicitly build ODP without PCAP pktio
regardless of if the library is available on the build host.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Suggested-by: Risto Reittinen <risto.teittinen@nokia-bell-labs.com>
Diffstat (limited to 'platform/linux-generic/m4')
-rw-r--r-- | platform/linux-generic/m4/configure.m4 | 11 | ||||
-rw-r--r-- | platform/linux-generic/m4/odp_pcap.m4 | 20 |
2 files changed, 10 insertions, 21 deletions
diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index 1dd14cd4d..3ab01f2b7 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -13,8 +13,17 @@ AC_ARG_WITH([openssl], AS_IF([test "$with_openssl" != "no"], [ODP_OPENSSL]) AM_CONDITIONAL([WITH_OPENSSL], [test x$with_openssl != xno]) + +AC_ARG_WITH([pcap], + [AS_HELP_STRING([--without-pcap], + [compile without PCAP])], + [], + [with_pcap=yes]) +AS_IF([test "x$with_pcap" != xno], + [ODP_PCAP([with_pcap=yes]‚[with_pcap=no])]) +AM_CONDITIONAL([HAVE_PCAP], [test x$have_pcap = xyes]) + ODP_LIBCONFIG([linux-generic]) -m4_include([platform/linux-generic/m4/odp_pcap.m4]) m4_include([platform/linux-generic/m4/odp_pcapng.m4]) m4_include([platform/linux-generic/m4/odp_netmap.m4]) m4_include([platform/linux-generic/m4/odp_dpdk.m4]) diff --git a/platform/linux-generic/m4/odp_pcap.m4 b/platform/linux-generic/m4/odp_pcap.m4 deleted file mode 100644 index 0a8f35186..000000000 --- a/platform/linux-generic/m4/odp_pcap.m4 +++ /dev/null @@ -1,20 +0,0 @@ -######################################################################### -# 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, [])], - [])], -[]) - -if test "$have_pcap" = "yes"; then - AC_DEFINE([HAVE_PCAP], 1, [Define to 1 if you have pcap library]) - PCAP_LIBS="-lpcap" -fi - -AC_SUBST([PCAP_LIBS]) - -AC_CONFIG_COMMANDS_PRE([dnl -AM_CONDITIONAL([HAVE_PCAP], [test x$have_pcap = xyes]) -]) |