drivers: add reasons for components being disabled
[dpdk.git] / drivers / net / mlx5 / meson.build
index a4c684e..22ddd54 100644 (file)
@@ -13,15 +13,19 @@ if pmd_dlopen
                '-DMLX5_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION),
        ]
 endif
-libs = [
-       dependency('libmnl', required:false),
-       dependency('libmlx5', required:false),
-       dependency('libibverbs', required:false),
-]
+libnames = [ 'mnl', 'mlx5', 'ibverbs' ]
+libs = []
 build = true
-foreach lib:libs
+foreach libname:libnames
+       lib = dependency('lib' + libname, required:false)
        if not lib.found()
+               lib = cc.find_library(libname, required:false)
+       endif
+       if lib.found()
+               libs += [ lib ]
+       else
                build = false
+               reason = 'missing dependency, "' + libname + '"'
        endif
 endforeach
 if build
@@ -111,6 +115,10 @@ if build
                'mlx5dv_devx_obj_create' ],
                [ 'HAVE_IBV_FLOW_DEVX_COUNTERS', 'infiniband/mlx5dv.h',
                'MLX5DV_FLOW_ACTION_COUNTERS_DEVX' ],
+               [ 'HAVE_MLX5DV_DR', 'infiniband/mlx5dv.h',
+               'MLX5DV_DR_DOMAIN_TYPE_NIC_RX' ],
+               [ 'HAVE_MLX5DV_DR_ESWITCH', 'infiniband/mlx5dv.h',
+               'MLX5DV_DR_DOMAIN_TYPE_FDB' ],
                [ 'HAVE_SUPPORTED_40000baseKR4_Full', 'linux/ethtool.h',
                'SUPPORTED_40000baseKR4_Full' ],
                [ 'HAVE_SUPPORTED_40000baseCR4_Full', 'linux/ethtool.h',