# check for libraries used in multiple places in DPDK
has_libnuma = 0
-numa_dep = cc.find_library('numa', required: false)
-if numa_dep.found() and cc.has_header('numaif.h')
- dpdk_conf.set10('RTE_HAS_LIBNUMA', true)
- has_libnuma = 1
- add_project_link_arguments('-lnuma', language: 'c')
- dpdk_extra_ldflags += '-lnuma'
+find_libnuma = true
+if meson.is_cross_build() and not meson.get_cross_property('numa', true)
+ # don't look for libnuma if explicitly disabled in cross build
+ find_libnuma = false
+endif
+if find_libnuma
+ numa_dep = cc.find_library('numa', required: false)
+ if numa_dep.found() and cc.has_header('numaif.h')
+ dpdk_conf.set10('RTE_HAS_LIBNUMA', true)
+ has_libnuma = 1
+ add_project_link_arguments('-lnuma', language: 'c')
+ dpdk_extra_ldflags += '-lnuma'
+ endif
endif
has_libfdt = 0
endif
# check for libbsd
-libbsd = dependency('libbsd', required: false)
+libbsd = dependency('libbsd', required: false, method: 'pkg-config')
if libbsd.found()
dpdk_conf.set('RTE_USE_LIBBSD', 1)
endif
# set the install path for the drivers
dpdk_conf.set_quoted('RTE_EAL_PMD_PATH', eal_pmd_path)
-install_headers(['rte_config.h', 'rte_compatibility_defines.h'],
+install_headers(['rte_config.h'],
subdir: get_option('include_subdir_arch'))
# enable VFIO only if it is linux OS
add_project_link_arguments('-Wno-lto-type-mismatch', language: 'c')
endif
endif
+
+if get_option('default_library') == 'both'
+ error( '''
+ Unsupported value "both" for "default_library" option.
+
+ NOTE: DPDK always builds both shared and static libraries. Please set
+ "default_library" to either "static" or "shared" to select default linkage
+ for apps and any examples.''')
+endif