]> git.proxmox.com Git - mirror_ovs.git/commit - acinclude.m4
acinclude: Transparent checking for DPDK dependencies.
authorIlya Maximets <i.maximets@samsung.com>
Thu, 11 Apr 2019 07:29:42 +0000 (10:29 +0300)
committerBen Pfaff <blp@ovn.org>
Fri, 12 Apr 2019 17:51:32 +0000 (10:51 -0700)
commitf0d1ead8b140ddbd181459cc0418e4a3a917a553
tree9a5a50494920ca945c280d221147343ba3a8edcf
parent34378ae4bd4b5737d008635b371a731033a5b294
acinclude: Transparent checking for DPDK dependencies.

'AC_CHECK_DECL' makes almost same thing as 'AC_COMPILE_IFELSE', but
looks more pretty. Additionally it prints checking results in a
user-visible way making it easy to understand which configs checked
and why we need one or another dependency.

For exmaple, with this patch, configure log may look like this:

  checking whether dpdk datapath is enabled... yes
  checking for rte_config.h... yes
  checking whether RTE_LIBRTE_VHOST_NUMA is declared... no
  checking whether RTE_EAL_NUMA_AWARE_HUGEPAGES is declared... yes
  checking for library containing get_mempolicy... -lnuma
  checking whether RTE_LIBRTE_VHOST_NUMA is declared... (cached) no
  checking whether RTE_LIBRTE_PMD_PCAP is declared... yes
  checking for library containing pcap_dump... -lpcap
  checking whether RTE_LIBRTE_PDUMP is declared... yes
  checking whether RTE_LIBRTE_MLX5_PMD is declared... no
  checking whether RTE_LIBRTE_MLX4_PMD is declared... yes
  checking whether RTE_LIBRTE_MLX4_DLOPEN_DEPS is declared... yes

Instead of just:

  checking whether dpdk datapath is enabled... yes
  checking for rte_config.h... yes
  checking for library containing get_mempolicy... -lnuma
  checking for library containing pcap_dump... -lpcap

Anyway, code looks more clean and easier to understand. Also, with
this change we're defining VHOST_NUMA only if RTE_LIBRTE_VHOST_NUMA
defined. This costs nothing as all the checks with 'AC_CHECK_DECL'
are cached.

Acked-by: Flavio Leitner <fbl@sysclose.org>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
acinclude.m4