Merging upstream version 1.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
34cf2bc5f8
commit
ae07fb4ed6
803 changed files with 4523 additions and 1325 deletions
62
meson.build
62
meson.build
|
@ -7,14 +7,14 @@
|
|||
#
|
||||
project(
|
||||
'libnvme', ['c'],
|
||||
meson_version: '>= 0.48.0',
|
||||
version: '1.2',
|
||||
meson_version: '>= 0.50.0',
|
||||
version: '1.3',
|
||||
license: 'LGPL-2.1-or-later',
|
||||
default_options: [
|
||||
'c_std=gnu99',
|
||||
'warning_level=1',
|
||||
'buildtype=release',
|
||||
'prefix=/usr',
|
||||
'buildtype=debug',
|
||||
'prefix=/usr/local',
|
||||
]
|
||||
)
|
||||
|
||||
|
@ -33,8 +33,6 @@ mandir = join_paths(prefixdir, get_option('mandir'))
|
|||
bindir = join_paths(prefixdir, get_option('bindir'))
|
||||
sysconfdir = join_paths(prefixdir, get_option('sysconfdir'))
|
||||
|
||||
pkgconfiglibdir = get_option('pkgconfiglibdir') == '' ? join_paths(libdir, 'pkgconfig') : get_option('pkgconfiglibdir')
|
||||
|
||||
################################################################################
|
||||
conf = configuration_data()
|
||||
|
||||
|
@ -91,9 +89,25 @@ if openssl_dep.found()
|
|||
description: 'OpenSSL/LibreSSL API version @0@'.format(api_version))
|
||||
endif
|
||||
|
||||
# Check for libsystemd availability. Optional, only required for MCTP dbus scan
|
||||
libsystemd_dep = dependency('libsystemd', version: '>219', required: false)
|
||||
conf.set('CONFIG_LIBSYSTEMD', libsystemd_dep.found(), description: 'Is libsystemd(>219) available?')
|
||||
if get_option('libdbus').disabled()
|
||||
libdbus_dep = dependency('', required: false)
|
||||
else
|
||||
# Check for libdus availability. Optional, only required for MCTP dbus scan
|
||||
libdbus_dep = dependency(
|
||||
'dbus-1',
|
||||
required: true,
|
||||
fallback: ['dbus', 'libdbus_dep'],
|
||||
default_options: [
|
||||
'default_library=static',
|
||||
'embedded_tests=false',
|
||||
'message_bus=false',
|
||||
'modular_tests=disabled',
|
||||
'tools=false',
|
||||
],
|
||||
)
|
||||
endif
|
||||
|
||||
conf.set('CONFIG_DBUS', libdbus_dep.found(), description: 'Enable dbus support?')
|
||||
|
||||
# local (cross-compilable) implementations of ccan configure steps
|
||||
conf.set10(
|
||||
|
@ -182,24 +196,20 @@ conf.set10(
|
|||
description: 'Is linux/mctp.h include-able?'
|
||||
)
|
||||
|
||||
if meson.version().version_compare('>= 0.48')
|
||||
has_fallthrough = cc.has_function_attribute('fallthrough')
|
||||
else
|
||||
has_fallthrough = cc.compiles(
|
||||
'''int main(int argc, char **argv) {
|
||||
switch(argc) {
|
||||
case 0:
|
||||
__attribute__((__fallthrough__));
|
||||
case 1:
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
''',
|
||||
name: 'has fallthrough')
|
||||
endif
|
||||
conf.set(
|
||||
'HAVE_LIBNSS',
|
||||
cc.links(
|
||||
'''int main(int argc, char **argv) {
|
||||
struct addrinfo hints, *result;
|
||||
return getaddrinfo(argv[1], argv[2], &hints, &result);
|
||||
}
|
||||
''',
|
||||
name: 'libnss',
|
||||
),
|
||||
description: 'Is network address and service translation available'
|
||||
)
|
||||
|
||||
if has_fallthrough
|
||||
if cc.has_function_attribute('fallthrough')
|
||||
conf.set('fallthrough', '__attribute__((__fallthrough__))')
|
||||
else
|
||||
conf.set('fallthrough', 'do {} while (0) /* fallthrough */')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue