Current ./configure script shows misleading errors in case of wrong
DPDK path:

  # ./configure --with-dpdk=/wrong/path
  ...
  checking whether dpdk datapath is enabled... yes
  checking for library containing get_mempolicy... -lnuma
  checking for library containing pcap_dump... -lpcap
  checking for library containing mnl_attr_put... no
  configure: error: unable to find libmnl, install the dependency package

This happens because we're not checking for headers before checking
for dependencies. All the compile attempts fails and script thinks
that we need more dependencies.

With this change script will check for 'rte_config.h' availability
and produce sane error message:

  # ./configure --with-dpdk=/wrong/path
  ...
  checking for rte_config.h... no
  configure: error: unable to find rte_config.h in /wrong/path

'AC_INCLUDES_DEFAULT' passed explicitly to avoid preprocessor test.

Signed-off-by: Ilya Maximets <[email protected]>
---
 acinclude.m4 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/acinclude.m4 b/acinclude.m4
index e2af4ee16..88d80522c 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -250,6 +250,10 @@ AC_DEFUN([OVS_CHECK_DPDK], [
       LDFLAGS="$LDFLAGS -L${DPDK_LIB_DIR}"
     fi
 
+    AC_CHECK_HEADERS([rte_config.h], [], [
+      AC_MSG_ERROR([unable to find rte_config.h in $with_dpdk])
+    ], [AC_INCLUDES_DEFAULT])
+
     AC_COMPILE_IFELSE([
       AC_LANG_PROGRAM(
         [
-- 
2.17.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to