node: fix missing header include
[dpdk.git] / config / meson.build
index 19c7430..9abb30c 100644 (file)
@@ -142,12 +142,19 @@ endif
 
 # 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
@@ -271,7 +278,7 @@ 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
@@ -323,3 +330,12 @@ if get_option('b_lto')
                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