diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-01-31 04:17:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-01-31 04:17:04 +0000 |
commit | 7e691c813bdf26bf9c51f03ee926818c00cc6e39 (patch) | |
tree | 1ecdb0c04700e31585faf09a0a868cf63814fc51 /meson.build | |
parent | Releasing debian version 1.2-3. (diff) | |
download | libnvme-7e691c813bdf26bf9c51f03ee926818c00cc6e39.tar.xz libnvme-7e691c813bdf26bf9c51f03ee926818c00cc6e39.zip |
Merging upstream version 1.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 62 |
1 files changed, 36 insertions, 26 deletions
diff --git a/meson.build b/meson.build index 5c2e73a..d389cbf 100644 --- a/meson.build +++ b/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 */') |