timer: clarify error if subsystem already initialized
[dpdk.git] / config / meson.build
index f3d61b1..66a2edc 100644 (file)
@@ -125,11 +125,8 @@ if cc.find_library('m', required : false).found()
        dpdk_extra_ldflags += '-lm'
 endif
 
-# for linux link against dl, for bsd execinfo
 if is_linux
        link_lib = 'dl'
-elif is_freebsd
-       link_lib = 'execinfo'
 else
        link_lib = ''
 endif
@@ -166,8 +163,14 @@ if fdt_dep.found() and cc.has_header('fdt.h')
        dpdk_extra_ldflags += '-lfdt'
 endif
 
+libexecinfo = cc.find_library('libexecinfo', required: false)
+if libexecinfo.found() and cc.has_header('execinfo.h')
+       add_project_link_arguments('-lexecinfo', language: 'c')
+       dpdk_extra_ldflags += '-lexecinfo'
+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
@@ -278,7 +281,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
@@ -330,3 +333,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